aboutsummaryrefslogtreecommitdiff
path: root/rdf-documentation/dump-publication.md
diff options
context:
space:
mode:
authorMunyoki Kilyungi2023-08-15 21:15:11 +0300
committerMunyoki Kilyungi2023-08-15 21:15:11 +0300
commitbe450b02198f08363986aecfd5227752d2e4ca72 (patch)
treebdcd718c86fc7366a5cfa0b234ff307f0c15c052 /rdf-documentation/dump-publication.md
parenta9472810f601b48c643724c9186ec44721732fa7 (diff)
downloadgn-docs-be450b02198f08363986aecfd5227752d2e4ca72.tar.gz
Update auto-generated docs
Signed-off-by: Munyoki Kilyungi <me@bonfacemunyoki.com>
Diffstat (limited to 'rdf-documentation/dump-publication.md')
-rw-r--r--rdf-documentation/dump-publication.md37
1 files changed, 20 insertions, 17 deletions
diff --git a/rdf-documentation/dump-publication.md b/rdf-documentation/dump-publication.md
index 90a366c..708e47f 100644
--- a/rdf-documentation/dump-publication.md
+++ b/rdf-documentation/dump-publication.md
@@ -1,40 +1,44 @@
# Publications Metadata
## 'dump-publication'
-
## Generated Triples:
The following SQL query was executed:
```sql
-SELECT IF(Publication.PubMed_ID IS NULL, '', CONVERT(Publication.PubMed_Id, INT)) AS pmid, Publication.Id, IFNULL(PubMed_ID, '') AS pubmedId, Publication.Title, Publication.Journal, Publication.Volume, Publication.Pages, Publication.Month, Publication.Year, Publication.Authors, CAST(CONVERT(BINARY CONVERT(Publication.Abstract USING latin1) USING utf8) AS VARCHAR(100)) AS Abstract FROM Publication
+SELECT IF(Publication.PubMed_ID IS NULL, '', CONVERT(Publication.PubMed_Id, INT)) AS pmid, Publication.Id, IFNULL(PubMed_ID, '') AS pubmedId, Publication.Title, Publication.Journal, Publication.Volume, Publication.Pages, Publication.Month, IF(Publication.Year = 0, NULL, Publication.Year) AS Year, Publication.Authors, Publication.Abstract FROM Publication
```
The above query results to triples that have the form:
```text
-pubmed:pmid -> rdf:type -> gn:publication
-pubmed:pmid -> gn-term:pubMedId -> pubmed:pubmedId
-pubmed:pmid -> gn-term:title -> Publication(Title)
-pubmed:pmid -> gn-term:journal -> Publication(Journal)
-pubmed:pmid -> gn-term:volume -> Publication(Volume)
-pubmed:pmid -> gn-term:pages -> Publication(Pages)
-pubmed:pmid -> gn-term:month -> Publication(Month)
-pubmed:pmid -> gn-term:year -> Publication(Year)
-pubmed:pmid -> gn:abstract -> Abstract
-pubmed:pmid -> gn:author -> PublicationAuthors
+pubmed:pmid -> rdf:type -> fabio:ResearchPaper
+pubmed:pmid -> fabio:hasPubMedId -> pubmed:pubmedId
+pubmed:pmid -> dct:title -> Publication(Title)
+pubmed:pmid -> fabio:Journal -> Publication(Journal)
+pubmed:pmid -> prism:volume -> Publication(Volume)
+pubmed:pmid -> fabio:page -> Publication(Pages)
+pubmed:pmid -> prism:publicationDate -> "Publication(Month)"^^xsd:gMonth
+pubmed:pmid -> fabio:hasPublicationYear -> "Year"^^xsd:gYear
+pubmed:pmid -> dct:abstract -> PublicationAbstract
+pubmed:pmid -> dct:creator -> PublicationAuthors
```
Here's an example query:
```sparql
-PREFIX gn-term: <http://genenetwork.org/terms/>
+PREFIX gnt: <http://genenetwork.org/terms/>
+PREFIX fabio: <http://purl.org/spar/fabio/>
+PREFIX dct: <http://purl.org/dc/terms/>
+PREFIX prism: <http://prismstandard.org/namespaces/basic/2.0/>
PREFIX gn: <http://genenetwork.org/id/>
+PREFIX gnc: <http://genenetwork.org/category/>
PREFIX pubmed: <http://rdf.ncbi.nlm.nih.gov/pubmed/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
+PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
-SELECT ?s ?p ?o WHERE {
- ?s rdf:type gn:publication .
+SELECT * WHERE {
+ ?s rdf:type fabio:ResearchPaper .
?s ?p ?o .
}
```
@@ -42,7 +46,6 @@ SELECT ?s ?p ?o WHERE {
Expected Result:
```rdf
-gn:unpublished_1 rdf:type gn:publication .
-gn:unpublished_1 gn-term:year "0" .
+gn:unpublished_1 rdf:type fabio:ResearchPaper .
```