diff --git a/bin/fetch-mesh-xml.sh b/bin/fetch-mesh-xml.sh index 19301370..7caeb928 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 @@ -8,18 +19,18 @@ 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} -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..9e83af1b 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 @@ -42,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" diff --git a/meta/vocabulary.ttl b/meta/vocabulary.ttl index bd32e205..85ac6e56 100644 --- a/meta/vocabulary.ttl +++ b/meta/vocabulary.ttl @@ -9,7 +9,7 @@ rdf:type :Ontology ; - :versionInfo "0.9" . + :versionInfo "0.9.3" . ################################################################# @@ -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 MeSH objects indicating whether they still appear in the current version of 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 "lastActiveYear" ; + + 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:string . + + + ### http://id.nlm.nih.gov/mesh/vocab#lexicalTag rdf:type :DatatypeProperty ; @@ -428,6 +452,18 @@ 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)."; + + rdfs:range xsd:string . + + + ### http://id.nlm.nih.gov/mesh/vocab#note rdf:type :DatatypeProperty ; diff --git a/meta/void.ttl b/meta/void.ttl index 5b8dd4bd..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" . + owl:versionInfo "0.9.3" . # Metadata description of the Dataset @@ -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 . diff --git a/xslt/desc.xsl b/xslt/desc.xsl index a1811c09..3b6072de 100755 --- a/xslt/desc.xsl +++ b/xslt/desc.xsl @@ -18,6 +18,7 @@ + + + + Provide a name for the AllowedDescriptorQualifierPair + + + + label + + + + + + @@ -157,7 +174,25 @@ - + + + + + + Each descriptor may have an NLMClassificationNumber. + + + + nlmClassificationNumber + + + + + + + @@ -176,7 +211,7 @@ - + @@ -200,6 +235,22 @@ + + + + Provide a label for the DisallowedDescriptorQualifierPair. + + + + label + + + + +