120 likes | 240 Views
Vocabulary Workshop, RAL, February 25, 2009. Vocabulary Server Access. Vocabulary Access. There are five ways to access the SeaDataNet vocabularies Term and list URLs HTTP-POX interface SOAP API BODC client interface SeaDataNet Vocabulary Portal. Vocabulary Access. Term and List URLs
E N D
Vocabulary Workshop, RAL, February 25, 2009 Vocabulary Server Access
Vocabulary Access • There are five ways to access the SeaDataNet vocabularies • Term and list URLs • HTTP-POX interface • SOAP API • BODC client interface • SeaDataNet Vocabulary Portal
Vocabulary Access • Term and List URLs • User input is a URL • Returns an XML document based on the SKOS standard • List documents include labels and definitions for all terms in the list • Term documents include labels, definition and mappings for the term
Vocabulary Access • URL syntax • Namespace base (http://vocab.ndg.nerc.ac.uk/) • ‘list’ or ‘term’ • List identifier (e.g. P021) • List version or ‘current’ • Term identifier for term URL (e.g. TEMP) • Examples • List (SeaDataNet Parameter Discovery Vocabulary) • http://vocab.ndg.nerc.ac.uk/list/P021/current/ • Term (CF Standard Name for sea temperature) • http://vocab.ndg.nerc.ac.uk/term/P071/current/CFSN0335
Vocabulary Access <?xml version="1.0" ?> - <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:dc="http://purl.org/dc/elements/1.1/"> - <skos:Concept rdf:about="http://vocab.ndg.nerc.ac.uk/term/P071/7/CFSN0335"> <skos:externalID>SDN:P071:7:CFSN0335</skos:externalID> <skos:prefLabel>sea_water_temperature</skos:prefLabel> <skos:altLabel /> <skos:definition /> <dc:date>2008-02-26T10:02:57.564+0000</dc:date> <skos:exactMatch rdf:resource="http://vocab.ndg.nerc.ac.uk/term/P041/4/G963" /> <skos:broadMatch rdf:resource="http://vocab.ndg.nerc.ac.uk/term/P021/24/TEMP" /> </skos:Concept> </rdf:RDF>
Vocabulary Access • In SeaDataNet data and metadata we use URNs, not URLs (in case the server namespace changes) • URN syntax is • Namespace base (SDN) • List identifier (e.g. P021) • List version or null field for ‘current’ • Term identifier (e.g. TEMP) • For example the URL http://vocab.ndg.nerc.ac.uk/list/P021/current/TEMP is represented by the URN SDN:P021::TEMP • URN to URL conversion is simple string slicing
Vocabulary Access HTTP-POX API • The API is documented at http://www.bodc.ac.uk/products/web_services/vocab/methods.html • User input is a URL • Returns an XML document based on a BODC-defined schema • Provides access to • List catalogue (names all accessible lists) http://vocab.ndg.nerc.ac.uk/axis2/services/vocab/whatLists • List contents (keys, terms, abbreviations, definitions, mappings) http://vocab.ndg.nerc.ac.uk/axis2/services/vocab/getList?recordKey=http://vocab.ndg.nerc.ac.uk/list/P021/current&earliestRecord=2007-09-01T00:00:00Z • Plaintext searches across lists http://vocab.ndg.nerc.ac.uk/axis2/services/vocab/searchVocab?listKey=http://vocab.ndg.nerc.ac.uk/list/P021/current&searchTerm=*emperature* • Term verification (abbreviation WC_Temp in P021) http://vocab.ndg.nerc.ac.uk/axis2/services/vocab/verifyTerm?listKey=http://vocab.ndg.nerc.ac.uk/list/P021/current/&entryTerm=WC_Temp&termType=short
Vocabulary Access • Provides access to • Mappings • Complete map between two vocabularies (P031/P021) http://vocab.ndg.nerc.ac.uk/axis2/services/vocab/getMap?subjectList=http://vocab.ndg.nerc.ac.uk/list/P031/current&predicate=2&objectList=http://vocab.ndg.nerc.ac.uk/list/P021/current&inference=false • Map of all terms in all vocabularies to one term http://vocab.ndg.nerc.ac.uk/axis2/services/vocab/getRelatedRecordByTerm?subjectTerm=http://vocab.ndg.nerc.ac.uk/term/P021/current/TEMP&predicate=255&inferences=true • Map of all terms in vocabulary (P211) mapped to terms in a vocabulary (P211) again containing a string (air temperature). Too big for PowerPoint. Needs to be copied and pasted http://vocab.ndg.nerc.ac.uk/axis2/services/vocab/getRelatedRecordByCriteria?subjectText=air%20temperature&caseSensitivity=false&partialMatch=true&predicate=255&inferences=false&subjectList=http://vocab.ndg.nerc.ac.uk/list/P211/current&objectList=http://vocab.ndg.nerc.ac.uk/list/P211/current
Vocabulary Access • SOAP API • User input is a programmatic service call from Java, Perl, PHP, Python, etc. application • Returns an XML document based on a BODC-defined schema • Provides access to • List catalogue • List contents (keys, terms, abbreviations, definitions, mappings) • Mappings • Plaintext searches across lists • Term verification • The API is documented at http://www.bodc.ac.uk/products/web_services/vocab/methods.html • The WSDL is available from http://vocab.ndg.nerc.ac.uk/
Vocabulary Access • BODC Clients • A range of clients are available from http://vocab.ndg.nerc.ac.uk • vocabServer.jsp • provides a catalogue of all lists available • One or more of these may be selected • ‘Get checked lists’ displays these in a table rendering • Allows term labels (full or abbreviated) to be verified against one or more vocabularies • Allows free text searches in labels or definitions of one or more vocabularies
Vocabulary Access • BODC clients • There are six ‘method call’ clients that give access to specific API method calls and a ‘semantic search’ client • Very basic • Primarily designed as a production system test harness • Some usage tips • listKeys are specified as list or term URLs • termType vocabulary is ‘short’, ‘long’, ‘definition’ • If unsure of required predicate set to 255 • Set inference to ‘true’ to include simple inverse relationships
Vocabulary Access • SeaDataNet Vocabulary Portal • User input through a web form at http://seadatanet.maris2.nl/v_bodc_vocab/welcome.aspx • Returns a human-readable table with key, term, abbreviation, definition and modification date columns • Table may be exported as a semicolon-delimited ‘CSV’ ASCII file • Only includes lists considered to be of interest to SeaDataNet