Hopp til hovedinnholdet.

Søk i valgte vokabularer

Tilgjengelige vokabularer og ontologier

Welcome to the METNO Vocabulary Server

The included vocabularies are used within the MET Norway Metadata Format Specification. The MMD vocabulary consists of several collections used for dataset discovery. The METNO - Climate and Forecast Standard Names Vocabulary and the METNO - GCMD Earth Science keywords vocabulary are local copies of the Climate and Forecast (CF) standard names and the Global Change Master Directory (GCMD) Earth Science Keywords vocabularies which have been mapped to each other. The mapping is coming from internal processes, as well as external mapping through the NERC Vocabulary and community efforts through the ENVRI-FAIR project.

Overview

The METNO Vocabulary Server (METNOVS) is managed by the Norwegian Meteorological Insitute. Controlled vocabularies are used by data creators and data managers to standardise information. They are used for indexing and annotating data and associated information (metadata) in database and data files. They facilitate searching for data in web portals. They also enable records to be interpreted by computers. This opens up data sets to a whole world of possibilities for automated data workflows, computer aided manipulation, distribution, interoperability, and long-term reuse.

Vocabularies

METNOVS makes use of the World Wide Web Consortium's (W3C) Simple Knowledge Organization System (SKOS) to represent knowledge in a format understandable by computers. SKOS organises concepts into collections. A SKOS concept can be viewed as an idea or notion; a unit of thought. The notion of a SKOS concept is useful when describing the conceptual or intellectual structure of a knowledge organization system, and when referring to specific ideas or meanings established within that system. A concept collection is useful where a group of concepts shares something in common, and it is convenient to group them under a common label. In the METNOVS, concept collections are synonymous with controlled vocabularies or code lists.

Sparql queries to METNOVS

Direct queries from the command line

The sparql endpoint for this vocabulary is:

https://vocab.met.no/skosmos/sparql

If you would like to query the vocabulary directly you can query the above sparql endpoint using:

https://vocab.met.no/skosmos/sparql?query={YOUR_QUERY_URL_ENCODED}

To do so you can use curl and your encoded sparql query. To encode the sparql query you can use any url encoder. For example, the following SPARQL query:

prefix skos: <http://www.w3.org/2004/02/skos/core#>
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

select distinct ?collection ?definition 
from  
WHERE {
  ?collection rdf:type skos:Collection .
  ?collection skos:definition ?definition .
} 

will be encoded, i.e. replaced the spaces "%20" and other character replacements, as:

prefix%20skos%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore%23%3E%0Aprefix%20rdf%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0A%0Aselect%20distinct%20%3Fcollection%20%3Fdefinition%20%0Afrom%20%3Chttps%3A%2F%2Fvocab.met.no%2Fmmd%3E%20%0AWHERE%20%7B%0A%20%20%3Fcollection%20rdf%3Atype%20skos%3ACollection%20.%0A%20%20%3Fcollection%20skos%3Adefinition%20%3Fdefinition%20.%0A%7D%20

You can the use the above string as {YOUR_QUERY_URL_ENCODED} to query the endpoint, using the HTTP Accept header for the type of response you would like (in this case -H 'Accept: application/sparql-results+json'), as:

curl https://vocab.met.no/skosmos/sparql?query=prefix%20skos%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F2004%2F02%2Fskos%2Fcore%23%3E%0Aprefix%20rdf%3A%20%3Chttp%3A%2F%2Fwww.w3.org%2F1999%2F02%2F22-rdf-syntax-ns%23%3E%0A%0Aselect%20distinct%20%3Fcollection%20%3Fdefinition%20%0Afrom%20%3Chttps%3A%2F%2Fvocab.met.no%2Fmmd%3E%20%0AWHERE%20%7B%0A%20%20%3Fcollection%20rdf%3Atype%20skos%3ACollection%20.%0A%20%20%3Fcollection%20skos%3Adefinition%20%3Fdefinition%20.%0A%7D%20 -H 'Accept: application/sparql-results+json'

The response you get in this case is:

{
  "head": {
    "vars": [ "collection" , "definition" ]
  } ,
  "results": {
    "bindings": [
      {
        "collection": { "type": "uri" , "value": "https://vocab.met.no/mmd/Keywords_Vocabulary" } ,
        "definition": { "type": "literal" , "xml:lang": "en" , "value": "The vocabulary where the keyword is fetched from." }
      } ,
      {
        "collection": { "type": "uri" , "value": "https://vocab.met.no/mmd/Use_Constraint" } ,
        "definition": { "type": "literal" , "xml:lang": "en" , "value": "A controlled vocabulary to be used to describe constraints on the usage of metadata and/or data. Ideally as little constraints as possible is defined. The definitions below relate to Creative Commons." }
      } ,
      {
        "collection": { "type": "uri" , "value": "https://vocab.met.no/mmd/Dataset_Production_Status" } ,
        "definition": { "type": "literal" , "xml:lang": "en" , "value": "Production status for the dataset." }
      } ,

.....

Acceptable headers are:

  1. application/sparql-results+json
  2. text/csv
  3. text/tab-separated-values

If you save your sparql query in a file (query.rq), you can also directly query the endpoint as:

curl --data-urlencode "query@query.rq" https://vocab.met.no/skosmos/sparql -H 'Accept: application/sparql-results+json'

Material and Info

Additional Material and Info:

  1. SPARQL protocols