Vocabularies#

In RDF, a vocabulary is a set of predefined terms, that is used to describe resources. These terms are defined in a way that allows them to be used consistently across different datasets. In the case of JOLux, vocabularies are specifically used only on the object position of RDF triples.

Fedlex defines and makes use of multiple vocabularies. This sub-page lists an overview and the main vocabularies and its associated properties that are used in describing the legislative resources.

Available Vocabularies#

As all vocabularies are modelled as having the class skos:ConceptScheme, the metadata viewer can give all the vocabularies as incoming relations to skos:ConceptScheme and therefore serves as an overview on all available vocabularies.

In addition, the following SPARQL query shows all vocabularies with its name in English, German and French. The name is either dcterms:title where available and otherwise rdfs:label or empty if there is neither:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT DISTINCT ?vocabulary ?name_en ?name_de ?name_fr WHERE {
    ?vocabulary a skos:ConceptScheme.
  
  # English title
  OPTIONAL {
    ?vocabulary dcterms:title ?title_en .
    FILTER(LANG(?title_en) = "en")
  }
  
  # German title
  OPTIONAL {
    ?vocabulary dcterms:title ?title_de .
    FILTER(LANG(?title_de) = "de")
  }
  
  # French title
  OPTIONAL {
    ?vocabulary dcterms:title ?title_fr .
    FILTER(LANG(?title_fr) = "fr")
  }
  
  # English label
  OPTIONAL {
    ?vocabulary rdfs:label ?label_en .
    FILTER(LANG(?label_en) = "en")
  }
  
  # German label
  OPTIONAL {
    ?vocabulary rdfs:label ?label_de .
    FILTER(LANG(?label_de) = "de")
  }
  
  # French label
  OPTIONAL {
    ?vocabulary rdfs:label ?label_fr .
    FILTER(LANG(?label_fr) = "fr")
  }
  
  # Use ?title if available and otherwise ?label
  BIND(COALESCE(?title_en, ?label_en) AS ?name_en)
  BIND(COALESCE(?title_de, ?label_de) AS ?name_de)
  BIND(COALESCE(?title_fr, ?label_fr) AS ?name_fr)
}

Hierarchical Vocabularies#

Some vocabularies are modelled as hierarchy or taxonomy of entries. The following SPARQL query lists all vocabularies that use a hierarchy:

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
SELECT DISTINCT ?vocabulary ?name_en WHERE {
    ?vocabulary a skos:ConceptScheme;
                skos:hasTopConcept ?top_concept.
  ?top_concept skos:narrower ?narrow.
  
  # English title
  OPTIONAL {
    ?vocabulary dcterms:title ?title_en .
    FILTER(LANG(?title_en) = "en")
  }
  
  # English label
  OPTIONAL {
    ?vocabulary rdfs:label ?label_en .
    FILTER(LANG(?label_en) = "en")
  }
  
  # Use ?title if available and otherwise ?label
  BIND(COALESCE(?title_en, ?label_en) AS ?name_en)
}

Act Types#

Act Types

The following SPARQL query shows all the entries of this vocabulary with its labels:

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX jolux: <http://data.legilux.public.lu/resource/ontology/jolux#>
SELECT DISTINCT ?term ?label WHERE {
    ?term a skos:Concept;
        skos:inScheme <https://fedlex.data.admin.ch/vocabulary/legal-resource-genre>;
        skos:prefLabel ?label.
    FILTER (lang(?label) = "en")
}

Consultation Status#

Consultation Status

The following SPARQL query shows all the entries of this vocabulary with its labels:

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX jolux: <http://data.legilux.public.lu/resource/ontology/jolux#>
SELECT DISTINCT ?term ?label WHERE {
    ?term a skos:Concept;
        skos:inScheme <https://fedlex.data.admin.ch/vocabulary/consultation-status>;
        skos:prefLabel ?label.
    FILTER (lang(?label) = "en")
}

Countries#

Countries

The following SPARQL query shows all the entries of this vocabulary with its labels:

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX jolux: <http://data.legilux.public.lu/resource/ontology/jolux#>
SELECT DISTINCT ?term ?label WHERE {
    ?term a skos:Concept;
        skos:inScheme <https://fedlex.data.admin.ch/vocabulary/country>;
        skos:prefLabel ?label.
    FILTER (lang(?label) = "en")
}

Draft Document Types#

Draft Document Types

The following SPARQL query shows all the entries of this vocabulary with its labels:

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX jolux: <http://data.legilux.public.lu/resource/ontology/jolux#>
SELECT DISTINCT ?term ?label WHERE {
    ?term a skos:Concept;
        skos:inScheme <https://fedlex.data.admin.ch/vocabulary/draft-document-type>;
        skos:prefLabel ?label.
    FILTER (lang(?label) = "de")
}

As this is a hierarchical vocabulary, the following SPARQL query shows the hierarchy of the entries:

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>

SELECT (GROUP_CONCAT(CONCAT(STR(?endpoint_level), ": ", STR(?endpoint_label)); separator = " <---- ") AS ?hierarchy) WHERE {
    SELECT * WHERE {
        ?endpoint skos:narrower* ?intermediate;
            skos:prefLabel ?endpoint_label.
        FILTER(lang(?endpoint_label) = "de")
        {
            SELECT ?endpoint (COUNT(?endpoint) as ?endpoint_level) WHERE {
                BIND (<https://fedlex.data.admin.ch/vocabulary/draft-document-type> as ?root)
                ?root skos:hasTopConcept/skos:narrower* ?intermediate.
                ?intermediate skos:narrower* ?endpoint.
            } GROUP BY ?endpoint ORDER BY ?endpoint_level
        }
    } ORDER BY ?intermediate ?endpoint_level
} GROUP BY ?intermediate ORDER BY ?hierarchy

Enforcement Status#

Enforcement Status

The following SPARQL query shows all the entries of this vocabulary with its labels:

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX jolux: <http://data.legilux.public.lu/resource/ontology/jolux#>
SELECT DISTINCT ?term ?label WHERE {
    ?term a skos:Concept;
        skos:inScheme <https://fedlex.data.admin.ch/vocabulary/enforcement-status>;
        skos:prefLabel ?label.
    FILTER (lang(?label) = "en")
}

Impact Types#

Impact Types

The following SPARQL query shows all the entries of this vocabulary with its labels:

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX jolux: <http://data.legilux.public.lu/resource/ontology/jolux#>
SELECT DISTINCT ?term ?label WHERE {
    ?term a skos:Concept;
        skos:inScheme <https://fedlex.data.admin.ch/vocabulary/impact-type>;
        skos:prefLabel ?label.
    FILTER (lang(?label) = "en")
}

Information Sources#

Information Sources

The following SPARQL query shows all the entries of this vocabulary with its labels:

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX jolux: <http://data.legilux.public.lu/resource/ontology/jolux#>
SELECT DISTINCT ?term ?label WHERE {
    ?term a skos:Concept;
        skos:inScheme <https://fedlex.data.admin.ch/vocabulary/information-source>;
        skos:prefLabel ?label.
    FILTER (lang(?label) = "en")
}

There is a special case where the predicate jolux:informationSource is used with a predicate that is not in the vocabulary. The following SPARQL query shows the first 100 entries with this object:

PREFIX jolux: <http://data.legilux.public.lu/resource/ontology/jolux#>
SELECT DISTINCT * {
    ?act jolux:informationSource <https://fedlex.data.admin.ch/vocabulary/information-source/data-from-ff-excel> .
} LIMIT 100

Procedure Types#

Procedure Types

The following SPARQL query shows all the entries of this vocabulary with its labels:

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX jolux: <http://data.legilux.public.lu/resource/ontology/jolux#>
SELECT DISTINCT ?term ?label WHERE {
    ?term a skos:Concept;
        skos:inScheme <https://fedlex.data.admin.ch/vocabulary/type-procedure>;
        skos:prefLabel ?label.
    FILTER (lang(?label) = "en")
}

Subdivision Types#

Subdivision Types

The following SPARQL query shows all the entries of this vocabulary with its labels:

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX jolux: <http://data.legilux.public.lu/resource/ontology/jolux#>
SELECT DISTINCT ?term ?label WHERE {
    ?term a skos:Concept;
        skos:inScheme <https://fedlex.data.admin.ch/vocabulary/subdivision-type>;
        skos:prefLabel ?label.
    FILTER (lang(?label) = "en")
}

As this is a hierarchical vocabulary, the following SPARQL query shows the hierarchy of the entries:

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>

SELECT (GROUP_CONCAT(CONCAT(STR(?endpoint_level), ": ", STR(?endpoint_label)); separator = " <---- ") AS ?hierarchy) WHERE {
    SELECT * WHERE {
        ?endpoint skos:narrower* ?intermediate;
            skos:prefLabel ?endpoint_label.
        FILTER(lang(?endpoint_label) = "de")
        {
            SELECT ?endpoint (COUNT(?endpoint) as ?endpoint_level) WHERE {
                BIND (<https://fedlex.data.admin.ch/vocabulary/subdivision-type> as ?root)
                ?root skos:hasTopConcept/skos:narrower* ?intermediate.
                ?intermediate skos:narrower* ?endpoint.
            } GROUP BY ?endpoint ORDER BY ?endpoint_level
        }
    } ORDER BY ?intermediate ?endpoint_level
} GROUP BY ?intermediate ORDER BY ?hierarchy

Text Types#

Text Types

The following SPARQL query shows all the entries of this vocabulary with its labels:

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX jolux: <http://data.legilux.public.lu/resource/ontology/jolux#>
SELECT DISTINCT ?term ?label WHERE {
    ?term a skos:Concept;
        skos:inScheme <https://fedlex.data.admin.ch/vocabulary/resource-type>;
        skos:prefLabel ?label.
    FILTER (lang(?label) = "en")
}

As this is a hierarchical vocabulary, the following SPARQL query shows the hierarchy of the entries:

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>

SELECT (GROUP_CONCAT(CONCAT(STR(?endpoint_level), ": ", STR(?endpoint_label)); separator = " <---- ") AS ?hierarchy) WHERE {
    SELECT * WHERE {
        ?endpoint skos:narrower* ?intermediate;
            skos:prefLabel ?endpoint_label.
        FILTER(lang(?endpoint_label) = "de")
        {
            SELECT ?endpoint (COUNT(?endpoint) as ?endpoint_level) WHERE {
                BIND (<https://fedlex.data.admin.ch/vocabulary/resource-type> as ?root)
                ?root skos:hasTopConcept/skos:narrower* ?intermediate.
                ?intermediate skos:narrower* ?endpoint.
            } GROUP BY ?endpoint ORDER BY ?endpoint_level
        }
    } ORDER BY ?intermediate ?endpoint_level
} GROUP BY ?intermediate ORDER BY ?hierarchy

Treaty Subject Themes#

Treaty Subject Themes

The following SPARQL query shows all the entries of this vocabulary with its labels (only in German because there are no English labels):

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX jolux: <http://data.legilux.public.lu/resource/ontology/jolux#>
SELECT DISTINCT ?term ?label WHERE {
    ?term a skos:Concept;
        skos:inScheme <https://fedlex.data.admin.ch/vocabulary/treaty-subject-theme>;
        skos:prefLabel ?label.
    FILTER (lang(?label) = "de")
}

Treaty Types#

Treaty Types

The following SPARQL query shows all the entries of this vocabulary with its labels (only in German because there are no English labels):

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX jolux: <http://data.legilux.public.lu/resource/ontology/jolux#>
SELECT DISTINCT ?term ?label WHERE {
    ?term a skos:Concept;
        skos:inScheme <https://fedlex.data.admin.ch/vocabulary/treaty-type>;
        skos:prefLabel ?label.
    FILTER (lang(?label) = "de")
}

User Formats#

User Formats

The following SPARQL query shows all the entries of this vocabulary with its labels (only in German because there are no English labels):

PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX jolux: <http://data.legilux.public.lu/resource/ontology/jolux#>
SELECT DISTINCT ?term ?label WHERE {
    ?term a skos:Concept;
        skos:inScheme <https://fedlex.data.admin.ch/vocabulary/user-format>;
        skos:prefLabel ?label.
    FILTER (lang(?label) = "de")
}