Version 1.0 Vocabulary Server methods

Select from the following for more information on each method

The methods have been designed to satisfy the following use cases

          1. User wants to know what lists are available

          2. User wants the entire contents of a given list

          3. User wants all the entries from a given list that have been modified since a specified date

          4. User wants the term and definition for a given key in a given list

          5. User wants to know if a term or abbreviation is valid in a given list

          6. User wants the key for a specified term or abbreviation in a given list

          7. User wants the terms and definitions from a specified vocabulary that map to a specified Parameter Usage Vocabulary key

          8. User wants terms and definitions from a specified vocabulary that map to a specified Parameter Discovery Vocabulary key

          9. User wants a GML phenomenon dictionary entry for a specified Parameter Usage Vocabulary key

         10. User wants to know what categories are available for grouping sets of vocabulary lists

         11. User wants to group the available lists into categories

         12. User wants to search all the lists for a particular term

         13. User wants to search a given list for a particular term

         14. User wants all terms that have been mapped between two vocabularies

         15. User wants equivalent, broader or narrower terms from the mapping of two vocabularies (not yet implemented)

whatLists

Use Case: 1, 11

Input

Output

An array of strings separated by XML tags as follows:

<codeTableRecord>
           <listKey>unique key for a particular vocabulary list</listKey>
           <listLongName>vocabulary list full name</listLongName>
           <listShortName>vocabulary list abbreviated name</listShortName>
           <listDefinition>vocabulary list description</listDefinition>
           <listVersion>version number</listVersion>
           <listLastMod>vocabulary list date last modified "yyyy-mm-dd hh24:mi:ss GMT"</listLastMod>
</codeTableRecord>

Java method call

String[] lists = service.whatLists(catKey);

For example: whatLists("CL06") retrieves the details of all lists used for phenomenon descriptions and qualifications.

Notes

getList

Use cases: 2, 3, 4

Input

Output

An array of strings separated by XML tags as follows:

<codeTableRecord>
          <entryKey>unique identifier for a particular entry within a vocabulary list</entryKey>
          <entryTerm>vocabulary term full name</entryTerm>
          <entryTermAbbr>vocabulary term abbreviated name</entryTermAbbr>
          <entryTermDef>vocabulary term definition</entryTermDef>
          <entryTermLastMod>vocabulary term date last modified "yyyy-mm-dd hh24:mi:ss GMT"</entryTermLastMod>
</codeTableRecord>

Java method call

String[] vocabArray = service.getList(listKey, entryKey, datMod);

For example:

Notes

             <getList>
                     <codeTableRecord>...</codeTableRecord>
                     <codeTableRecord>...</codeTableRecord>
             </getList>

 

verifyTerm

Use cases: 5, 6

Input

Output

Entry key (string array)

Java method call

String[] vocabArray = service.verifyTerm(listKey, entryTerm, termType);

For example: verifyTerm("P021", "Salinity of the water column", "long") returns the unique reference key that corresponds to this term within the Parameter Discovery Vocabulary (PDV). If the term is not in the controlled vocabulary, "invalid" is returned.

Notes

pvMap

Use cases: 7, 8

Input

Output

An array of strings separated by XML tags as follows:

<codeTableRecord>
          <entryKey>unique identifier for a particular entry within a vocabulary list</entryKey>
          <entryTerm>vocabulary term full name</entryTerm>
          <entryTermAbbr>vocabulary term abbreviated name</entryTermAbbr>
          <entryTermDef>vocabulary term definition</entryTermDef>
          <entryTermLastMod>vocabulary term date last modified "yyyy-mm-dd hh24:mi:ss GMT"</entryTermLastMod>
</codeTableRecord>

Java method call

String vocabArray = service.pvMap(vocabEntryKey, vocabListID, mapVocabID)

For example: pvMap("PSAL", "P021", "P011") retrieves all P011 terms that are related to the P021 term that has entry key "PSAL". In this case all Parameter Usage Vocabulary terms relating to measurements of salinity are retrieved.

Notes

            <pvMap>
                     <codeTableRecord>...</codeTableRecord>
                     <codeTableRecord>...</codeTableRecord>
            </pvMap>

getPhenomDict

Use cases: 9

Input

Output

Parameter usage vocabulary entry marked up with GML tags


<gml:dictionaryEntry>
          <om:Phenomenon gml:id="puvKey">
                    <gml:description>PUV entry full name</gml:description>
                    <gml:name codespace="http://vocab.ndg.nerc.ac.uk?P011">PUV entry key</gml:name>
          </om:Phenomenon>
</gml:dictionaryEntry>

Example Java method call

String gml = service.getPhenomDict(puvKey);

For example, getPhenomDict("BLENOX01") returns the following:

<gml:dictionaryEntry>
  <om:Phenomenon gml:id="BLENOX01">
                            <gml:description>Length of Ammodytidae (ITIS 171670) by physical measurement</gml:description>
                  <gml:name codespace="http://vocab.ndg.nerc.ac.uk?P011">BLENOX01</gml:name>
              </om:Phenomenon>
 
</gml:dictionaryEntry>

whatListsCat

Use case: 10

Input

Output

 An array of strings separated by XML tags as follows:

<codeTableRecord>
<entryKey>unique identifier for a particular entry within a vocabulary list</entryKey>
          <entryTerm>vocabulary term full name</entryTerm>
<entryTermAbbr>vocabulary term abbreviated name</entryTermAbbr>
          <entryTermDef>vocabulary term definition</entryTermDef>
<entryTermLastMod>vocabulary term date last modified "yyyy-mm-dd hh24:mi:ss GMT"</entryTermLastMod>
</codeTableRecord>

Java method call

 String[] cats = service.whatListsCat();

Notes

            <whatListsCat>
                     <codeTableRecord>...</codeTableRecord>
                     <codeTableRecord>...</codeTableRecord>
            </whatListsCat>

searchVocab

Use cases: 12, 13

Input

Output

 <codeTableRecord>
<listKey>unique identifier for a controlled vocabulary</listKey>
          <entryKey>unique identifier for a particular entry within a vocabulary list</entryKey>
<entryTerm>vocabulary term full name</entryTerm>
          <entryTermAbbr>vocabulary term abbreviated name</entryTermAbbr>
<entryTermDef>vocabulary term definition</entryTermDef>
          <entryTermLastMod>vocabulary term date last modified "yyyy-mm-dd hh24:mi:ss GMT"</entryTermLastMod>
 
</codeTableRecord>

Java method call

String[] terms = service.searchVocab(listKey, searchTerm, termType);

For example: searchVocab("P011","salinity","long") returns all Parameter Usage Vocabulary entries with the word "salinity" in their full name.

Notes

            <searchVocab>
                     <codeTableRecord>...</codeTableRecord>
                     <codeTableRecord>...</codeTableRecord>
            </searchVocab>

getMap

Use cases: 14, (15)

Input

Output

 <mapRecord>

          <fromEntryKey>unique identifier for a particular entry within the ‘from’ vocabulary list </fromEntryKey>

          <fromTerm>’from’ vocabulary term full name</fromTerm>

          <toEntryKey> unique identifier for a particular entry within the ‘to’ vocabulary list </toEntryKey>

          <toTerm>’to’ vocabulary term full name</toTerm>

</mapRecord>

Java method call

String[] map = service.getMap(fromListKey, toListKey, null);

Notes

           <getMap>
                     <mapRecord>...</mapRecord>
                     <mapRecord>...</mapRecord>
           </getMap>

 


Related BODC pages

BODC Web Services        NERC Vocabulary Server
NERC DataGrid (NDG)    

 

Related external links

Open Geospatial Consortium, Inc (OGC)

 

NERC DataGrid NERC DataGrid NERC DataGrid