From c6db0364c1b1ee1d1313a7c9628c0d310c3313e9 Mon Sep 17 00:00:00 2001 From: Daniel Davis Date: Wed, 16 Sep 2015 14:21:07 -0400 Subject: [PATCH 01/12] Change version back to 0.9.1-dev --- meta/vocabulary.ttl | 2 +- meta/void.ttl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/vocabulary.ttl b/meta/vocabulary.ttl index bd32e205..f1680283 100644 --- a/meta/vocabulary.ttl +++ b/meta/vocabulary.ttl @@ -9,7 +9,7 @@ rdf:type :Ontology ; - :versionInfo "0.9" . + :versionInfo "0.9.1-dev" . ################################################################# diff --git a/meta/void.ttl b/meta/void.ttl index 5b8dd4bd..797fb84e 100644 --- a/meta/void.ttl +++ b/meta/void.ttl @@ -15,7 +15,7 @@ dcterms:creator "U.S. National Library of Medicine" ; dcterms:date "2014-11-01"^^xsd:date ; foaf:primaryTopic ; - owl:versionInfo "0.9" . + owl:versionInfo "0.9.1-dev" . # Metadata description of the Dataset From 223850ecd936e2ca81a3c1673315efd29f9f7f5b Mon Sep 17 00:00:00 2001 From: Daniel Davis Date: Tue, 13 Oct 2015 13:31:51 -0400 Subject: [PATCH 02/12] Update scripts for MeSH 2016 --- bin/fetch-mesh-xml.sh | 23 +++++++++++++++++------ bin/mesh-xml2rdf.sh | 11 +++++++++++ 2 files changed, 28 insertions(+), 6 deletions(-) diff --git a/bin/fetch-mesh-xml.sh b/bin/fetch-mesh-xml.sh index 19301370..cf818b83 100755 --- a/bin/fetch-mesh-xml.sh +++ b/bin/fetch-mesh-xml.sh @@ -1,4 +1,15 @@ -#!/bin/sh -e +#!/bin/bash + + +while getopts "h:y:u:" opt; do + case $opt in + h) export MESHRDF_HOME=$OPTARG ;; + y) export MESHRDF_YEAR=$OPTARG ;; + u) export MESHRDF_URI=$OPTARG ;; + *) echo "Usage: $0 [-h meshrdf-home] [-y year] [-u uri] [-i]" 1>&2 ; exit 1 ;; + esac +done +shift $(($OPTIND - 1)) if [ -z "$MESHRDF_HOME" ]; then echo "Please define MESHRDF_HOME environment variable" 1>&2 @@ -13,13 +24,13 @@ YEAR=${MESHRDF_YEAR:-2015} # Can override default URI with MESHRDF_URI environment variable URI=${MESHRDF_URI:-ftp://ftp.nlm.nih.gov/online/mesh/$YEAR} -wget "$URI/desc$YEAR.dtd" -O "$MESHRDF_HOME/data/desc$YEAR.dtd" wget "$URI/desc$YEAR.xml" -O "$MESHRDF_HOME/data/desc$YEAR.xml" -wget "$URI/pa$YEAR.dtd" -O "$MESHRDF_HOME/data/pa$YEAR.dtd" -wget "$URI/pa$YEAR.xml" -O "$MESHRDF_HOME/data/pa$YEAR.xml" -wget "$URI/qual$YEAR.dtd" -O "$MESHRDF_HOME/data/qual$YEAR.dtd" wget "$URI/qual$YEAR.xml" -O "$MESHRDF_HOME/data/qual$YEAR.xml" -wget "$URI/supp$YEAR.dtd" -O "$MESHRDF_HOME/data/supp$YEAR.dtd" wget "$URI/supp$YEAR.xml" -O "$MESHRDF_HOME/data/supp$YEAR.xml" +if [ $YEAR -le 2015 ]; then + wget "$URI/desc$YEAR.dtd" -O "$MESHRDF_HOME/data/desc$YEAR.dtd" + wget "$URI/qual$YEAR.dtd" -O "$MESHRDF_HOME/data/qual$YEAR.dtd" + wget "$URI/supp$YEAR.dtd" -O "$MESHRDF_HOME/data/supp$YEAR.dtd" +fi diff --git a/bin/mesh-xml2rdf.sh b/bin/mesh-xml2rdf.sh index e964b5fc..8a2c39b1 100755 --- a/bin/mesh-xml2rdf.sh +++ b/bin/mesh-xml2rdf.sh @@ -30,6 +30,17 @@ else fi cd $($READLINK -e `dirname $0`/..) +while getopts "h:j:y:u" opt; do + case $opt in + h) export MESHRDF_HOME=$OPTARG ;; + j) export SAXON_JAR=$OPTARG ;; + y) export MESHRDF_YEAR=$OPTARG ;; + u) export MESHRDF_URI_YEAR="yes" ;; + *) echo "Usage: $0 [-h mesh-rdf-home] [-j saxon-jar-path] [-y year ]" 1>&2 ; exit 1 ;; + esac +done +shift $(($OPTIND - 1)) + # Check for some needed environment variables if [ -z "$MESHRDF_HOME" ]; then echo "Please define MESHRDF_HOME environment variable" 1>&2 From ece5da915302dc4264511c5e0956f57f7aee1136 Mon Sep 17 00:00:00 2001 From: Daniel Davis Date: Fri, 16 Oct 2015 14:16:20 -0400 Subject: [PATCH 03/12] Provide an rdfs:label for descriptor qualifier pairs --- xslt/desc.xsl | 37 +++++++++++++++++++++++++++++++++++-- 1 file changed, 35 insertions(+), 2 deletions(-) diff --git a/xslt/desc.xsl b/xslt/desc.xsl index a1811c09..6cd2619e 100755 --- a/xslt/desc.xsl +++ b/xslt/desc.xsl @@ -18,6 +18,7 @@ + + + + Provide a name for the AllowedDescriptorQualifierPair + + + + label + + + + + + @@ -200,6 +217,22 @@ + + + + Provide a label for the DisallowedDescriptorQualifierPair. + + + + label + + + + + From c10d40165655c424a0f211fda00594f2adcd5f3c Mon Sep 17 00:00:00 2001 From: Daniel Davis Date: Mon, 19 Oct 2015 11:01:36 -0400 Subject: [PATCH 04/12] Convert to meshv:nlmClassificationNumber - This addresses #HHS/mesh-rdf/198. --- xslt/desc.xsl | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) diff --git a/xslt/desc.xsl b/xslt/desc.xsl index 6cd2619e..3b6072de 100755 --- a/xslt/desc.xsl +++ b/xslt/desc.xsl @@ -174,7 +174,25 @@ - + + + + + + Each descriptor may have an NLMClassificationNumber. + + + + nlmClassificationNumber + + + + + + + @@ -193,7 +211,7 @@ - + From 233c28b20ac16d27978d9d126c369c77256fd439 Mon Sep 17 00:00:00 2001 From: Daniel Davis Date: Mon, 19 Oct 2015 11:09:05 -0400 Subject: [PATCH 05/12] Bump version to 0.9.2-dev in preperation for work on nlmClassificationNumber --- meta/vocabulary.ttl | 2 +- meta/void.ttl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/vocabulary.ttl b/meta/vocabulary.ttl index f1680283..db6b8197 100644 --- a/meta/vocabulary.ttl +++ b/meta/vocabulary.ttl @@ -9,7 +9,7 @@ rdf:type :Ontology ; - :versionInfo "0.9.1-dev" . + :versionInfo "0.9.2-dev" . ################################################################# diff --git a/meta/void.ttl b/meta/void.ttl index 797fb84e..38ee8e07 100644 --- a/meta/void.ttl +++ b/meta/void.ttl @@ -15,7 +15,7 @@ dcterms:creator "U.S. National Library of Medicine" ; dcterms:date "2014-11-01"^^xsd:date ; foaf:primaryTopic ; - owl:versionInfo "0.9.1-dev" . + owl:versionInfo "0.9.2-dev" . # Metadata description of the Dataset From feea77e3dc65f018270220c5a68c0bc949769f51 Mon Sep 17 00:00:00 2001 From: Daniel Davis Date: Mon, 19 Oct 2015 11:19:31 -0400 Subject: [PATCH 06/12] Need to bump version to 0.9.3-dev since we've already released a 0.9.2 release --- meta/vocabulary.ttl | 2 +- meta/void.ttl | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/meta/vocabulary.ttl b/meta/vocabulary.ttl index db6b8197..90335ae8 100644 --- a/meta/vocabulary.ttl +++ b/meta/vocabulary.ttl @@ -9,7 +9,7 @@ rdf:type :Ontology ; - :versionInfo "0.9.2-dev" . + :versionInfo "0.9.3-dev" . ################################################################# diff --git a/meta/void.ttl b/meta/void.ttl index 38ee8e07..6da48531 100644 --- a/meta/void.ttl +++ b/meta/void.ttl @@ -15,7 +15,7 @@ dcterms:creator "U.S. National Library of Medicine" ; dcterms:date "2014-11-01"^^xsd:date ; foaf:primaryTopic ; - owl:versionInfo "0.9.2-dev" . + owl:versionInfo "0.9.3-dev" . # Metadata description of the Dataset From 398ba54c9a043e9834bfe15cf93aa4dd60b2d801 Mon Sep 17 00:00:00 2001 From: Dan Davis Date: Mon, 19 Oct 2015 13:55:13 -0400 Subject: [PATCH 07/12] Add DatatypeProperty statements for meshv:active, meshv:lastActive, and meshv:nlmClassificationNumber --- meta/vocabulary.ttl | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/meta/vocabulary.ttl b/meta/vocabulary.ttl index 90335ae8..22791248 100644 --- a/meta/vocabulary.ttl +++ b/meta/vocabulary.ttl @@ -304,6 +304,18 @@ dct:description rdf:type :AnnotationProperty . +### http://id.nlm.nih.gov/mesh/vocab#active + + rdf:type :DatatypeProperty ; + + rdfs:label "active" ; + + dct:description "A property of things indicating whether they still appear in the most recently released MeSH year" ; + + rdfs:range xsd:boolean . + + + ### http://id.nlm.nih.gov/mesh/vocab#altLabel rdf:type :DatatypeProperty ; @@ -418,6 +430,18 @@ dct:description rdf:type :AnnotationProperty . +### http://id.nlm.nih.gov/mesh/vocab#lastActive + + rdf:type :DatatypeProperty ; + + rdfs:label "lastActive" ; + + dct:description "The lastActive property value is the IRI for the last years graph that contained the hierarchy." ; + + rdfs:range xsd:anyURI . + + + ### http://id.nlm.nih.gov/mesh/vocab#lexicalTag rdf:type :DatatypeProperty ; @@ -428,6 +452,16 @@ dct:description rdf:type :AnnotationProperty . +### http://id.nlm.nih.gov/mesh/vocab#nlmClassificationNumber + + rdf:type :DatatypeProperty ; + + rdfs:label "nlmClassificationNumber" ; + + dct:description "Each MeSH Descriptor has a corresponding class number in the NLM Classification. This classification is similar to the Library of Congress Classification (LCC)." . + + + ### http://id.nlm.nih.gov/mesh/vocab#note rdf:type :DatatypeProperty ; From 5e8ec2311e1042990b6cae1379578be2debf24e9 Mon Sep 17 00:00:00 2001 From: Daniel Davis Date: Thu, 12 Nov 2015 15:20:00 -0500 Subject: [PATCH 08/12] Update fetch-mesh-xml.sh and mesh-xml2rdf.sh to use 2016 by default. --- bin/fetch-mesh-xml.sh | 2 +- bin/mesh-xml2rdf.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/fetch-mesh-xml.sh b/bin/fetch-mesh-xml.sh index cf818b83..7caeb928 100755 --- a/bin/fetch-mesh-xml.sh +++ b/bin/fetch-mesh-xml.sh @@ -19,7 +19,7 @@ fi mkdir -p "$MESHRDF_HOME/data" # CAn override default year with MESHRDF_YEAR environment variable -YEAR=${MESHRDF_YEAR:-2015} +YEAR=${MESHRDF_YEAR:-2016} # Can override default URI with MESHRDF_URI environment variable URI=${MESHRDF_URI:-ftp://ftp.nlm.nih.gov/online/mesh/$YEAR} diff --git a/bin/mesh-xml2rdf.sh b/bin/mesh-xml2rdf.sh index 8a2c39b1..9e83af1b 100755 --- a/bin/mesh-xml2rdf.sh +++ b/bin/mesh-xml2rdf.sh @@ -53,7 +53,7 @@ if [ -z "$SAXON_JAR" ]; then fi # Can override default year with MESHRDF_YEAR environment variable -YEAR=${MESHRDF_YEAR:-2015} +YEAR=${MESHRDF_YEAR:-2016} # Set the output file name, and the parameter that controls the RDF URIs, # according to whether or not MESHRDF_URI_YEAR is "yes" From a3c351dc5ec85ca7ed3b9336ecc0cee6cc446f5b Mon Sep 17 00:00:00 2001 From: Daniel Davis Date: Fri, 13 Nov 2015 12:22:11 -0500 Subject: [PATCH 09/12] Update the vocabulary.ttl to change meshv:lastActive to meshv:lastActiveYear --- meta/vocabulary.ttl | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/meta/vocabulary.ttl b/meta/vocabulary.ttl index 22791248..da641cf6 100644 --- a/meta/vocabulary.ttl +++ b/meta/vocabulary.ttl @@ -310,7 +310,7 @@ dct:description rdf:type :AnnotationProperty . rdfs:label "active" ; - dct:description "A property of things indicating whether they still appear in the most recently released MeSH year" ; + dct:description "A property of MeSH objects indicating whether they still appear in the current version of the most recently released MeSH year" ; rdfs:range xsd:boolean . @@ -432,13 +432,13 @@ dct:description rdf:type :AnnotationProperty . ### http://id.nlm.nih.gov/mesh/vocab#lastActive - rdf:type :DatatypeProperty ; + rdf:type :DatatypeProperty ; - rdfs:label "lastActive" ; + rdfs:label "lastActiveYear" ; - dct:description "The lastActive property value is the IRI for the last years graph that contained the hierarchy." ; + dct:description "The lastActiveYear property value is the year in which the subject last appeared. If that year is still hosted, a new URI can be constructed." ; - rdfs:range xsd:anyURI . + rdfs:range xsd:string . From f341214e4e14390ad32be8a03ae27e35f8e4bb5c Mon Sep 17 00:00:00 2001 From: Daniel Davis Date: Thu, 19 Nov 2015 14:10:36 -0500 Subject: [PATCH 10/12] Change the :versionInfo of vocabulary.ttl and void.ttl to 0.9.3 --- meta/vocabulary.ttl | 2 +- meta/void.ttl | 14 +++----------- 2 files changed, 4 insertions(+), 12 deletions(-) diff --git a/meta/vocabulary.ttl b/meta/vocabulary.ttl index da641cf6..6349c0f1 100644 --- a/meta/vocabulary.ttl +++ b/meta/vocabulary.ttl @@ -9,7 +9,7 @@ rdf:type :Ontology ; - :versionInfo "0.9.3-dev" . + :versionInfo "0.9.3" . ################################################################# diff --git a/meta/void.ttl b/meta/void.ttl index 6da48531..54e57cb1 100644 --- a/meta/void.ttl +++ b/meta/void.ttl @@ -57,15 +57,7 @@ void:exampleResource ; # FTP dump file - void:dataDump "ftp://ftp.nlm.nih.gov/online/mesh/2014/desc2014.nt" ; - void:dataDump "ftp://ftp.nlm.nih.gov/online/mesh/2014/qual2014.nt" ; - void:dataDump "ftp://ftp.nlm.nih.gov/online/mesh/2014/supp2014.nt" ; + void:dataDump "ftp://ftp.nlm.nih.gov/online/mesh/mesh.nt" ; + void:dataDump "ftp://ftp.nlm.nih.gov/online/mesh/2016/mesh2016.nt" ; + void:dataDump "ftp://ftp.nlm.nih.gov/online/mesh/2015/mesh2015.nt" . -# triple count - void:triples "16644674"^^xsd:long ; - -# entity count - void:entities "1925662"^^xsd:long ; - -# distinct subject - void:distinctSubjects "1925662"^^xsd:long . From db5cd6b2ff17c4cd3433fa2520b011cf226c8922 Mon Sep 17 00:00:00 2001 From: Daniel Davis Date: Thu, 19 Nov 2015 14:14:43 -0500 Subject: [PATCH 11/12] Forgot the 0.9.3 version when taking out counts of triples. --- meta/void.ttl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/meta/void.ttl b/meta/void.ttl index 54e57cb1..6b6a6c1b 100644 --- a/meta/void.ttl +++ b/meta/void.ttl @@ -15,7 +15,7 @@ dcterms:creator "U.S. National Library of Medicine" ; dcterms:date "2014-11-01"^^xsd:date ; foaf:primaryTopic ; - owl:versionInfo "0.9.3-dev" . + owl:versionInfo "0.9.3" . # Metadata description of the Dataset From cf68e98b86117f1897a4eda7c2514e56a30302d1 Mon Sep 17 00:00:00 2001 From: Daniel Davis Date: Thu, 19 Nov 2015 14:18:02 -0500 Subject: [PATCH 12/12] Noticed on review of pull request that meshv:nlmClassicifationNumber needed a range. --- meta/vocabulary.ttl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/meta/vocabulary.ttl b/meta/vocabulary.ttl index 6349c0f1..85ac6e56 100644 --- a/meta/vocabulary.ttl +++ b/meta/vocabulary.ttl @@ -458,7 +458,9 @@ dct:description rdf:type :AnnotationProperty . rdfs:label "nlmClassificationNumber" ; - dct:description "Each MeSH Descriptor has a corresponding class number in the NLM Classification. This classification is similar to the Library of Congress Classification (LCC)." . + dct:description "Each MeSH Descriptor has a corresponding class number in the NLM Classification. This classification is similar to the Library of Congress Classification (LCC)."; + + rdfs:range xsd:string .