@base <http://data.europa.eu/esco/flow> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix : <#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix owl2xml: <http://www.w3.org/2006/12/owl2-xml#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix skos-xl: <http://www.w3.org/2008/05/skos-xl#> .
@prefix skos: <http://www.w3.org/2004/02/skos/core#> .

<>
    a owl:Ontology ;
    owl:imports <http://www.w3.org/2004/02/skos/core>, <http://www.w3.org/2008/05/skos-xl> ;
    owl:versionInfo "1.0"^^xsd:string .

:Export
    a owl:Class ;
    rdfs:comment """A utility class capturing the publication characteristics of the exported ESCO thesaurus release.

The export details are provided by a back-office export from the ESCO thesaurus management system."""@en ;
    rdfs:isDefinedBy "http://data.europa.eu/esco/flow"^^xsd:anyURI ;
    rdfs:label "current thesaurus export"@en ;
    rdfs:subClassOf owl:Thing, [
        a owl:Restriction ;
        owl:cardinality "1"^^xsd:nonNegativeInteger ;
        owl:onProperty :exportedThesaurus
    ], [
        a owl:Restriction ;
        owl:onDataRange xsd:dateTime ;
        owl:onProperty :exportDate ;
        owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger
    ], [
        a owl:Restriction ;
        owl:onDataRange xsd:string ;
        owl:onProperty :exportVersion ;
        owl:qualifiedCardinality "1"^^xsd:nonNegativeInteger
    ] .

:approvedForRelease
    a owl:DatatypeProperty ;
    rdfs:comment """The value provides the expected  release number for the official release of a new or modified  concept.
The property will only be present in intermediate maintenance releases.
In general, a maintenance release is not published."""@en ;
    rdfs:domain [
        a owl:Class ;
        owl:unionOf (skos:Concept
            skos:ConceptScheme
            skos:Collection
            skos-xl:Label
        )
    ] ;
    rdfs:isDefinedBy <> ;
    rdfs:label "approved for release"@en ;
    rdfs:range xsd:string ;
    rdfs:seeAlso "http://data.europa.eu/esco/flow#exportVersion"^^xsd:anyURI, "http://data.europa.eu/esco/flow#status"^^xsd:anyURI .

:editable
    a owl:DatatypeProperty ;
    rdfs:comment """indicates if Concepts belonging to the Concept Scheme are editable or read-only (used or inherited) in the ESCO context.
The default value is 'true'. 
However, in the case of 'false' skos-xl:Label(s) still can be changed to be more adapted to the ESCO audience."""^^xsd:string ;
    rdfs:domain skos:ConceptScheme ;
    rdfs:isDefinedBy <> ;
    rdfs:label "editable"@en ;
    rdfs:range xsd:boolean .

:exportDate
    a owl:DatatypeProperty, owl:FunctionalProperty ;
    rdfs:comment "The system date and time at which the described  thesaurus release is published."@en ;
    rdfs:domain :Export ;
    rdfs:isDefinedBy <> ;
    rdfs:label "export date"@en ;
    rdfs:range xsd:dateTime .

:exportVersion
    a owl:DatatypeProperty, owl:FunctionalProperty ;
    rdfs:comment "The release number is the version identier of the published thesaurus."@en ;
    rdfs:domain :Export ;
    rdfs:isDefinedBy <> ;
    rdfs:label "exported thesaurus release number"@en ;
    rdfs:range xsd:string .

:exportedThesaurus
    a owl:ObjectProperty ;
    rdfs:comment "The referenced subject provides the publishing details of the thesaurus denoted by the object value."@en ;
    rdfs:domain :Export ;
    rdfs:isDefinedBy <> ;
    rdfs:label "published theasurus"@en ;
    rdfs:range skos:ConceptScheme .

:identifier
    a owl:DatatypeProperty, owl:FunctionalProperty ;
    rdfs:comment "ITM identifier is generated by a sequence, portable from an ITM installation to another, whereas topic id is linked to a specific ITM data base."@en ;
    rdfs:isDefinedBy <> ;
    rdfs:label "ITM identifier"@en ;
    rdfs:range xsd:string .

:intermediateRelease
    a owl:DatatypeProperty ;
    rdfs:comment """true: Indicates this is a realease including the terms and concepts that were approved in the ESCO back-office maintenace workspace.
Not present or false indicate this is a release of the publishing ESCO back-office workspace."""@en ;
    rdfs:domain :Export ;
    rdfs:isDefinedBy <> ;
    rdfs:label "intermediate release"@en ;
    rdfs:range xsd:boolean .

:releasedWithVersion
    a owl:DatatypeProperty ;
    rdfs:comment """The release number in which the term was added.
The fixed string 'n/a' indicates the historic release number is not available."""@en ;
    rdfs:domain [
        a owl:Class ;
        owl:unionOf (skos:Concept
            skos:ConceptScheme
            skos:Collection
            skos-xl:Label
        )
    ] ;
    rdfs:isDefinedBy <> ;
    rdfs:label "released with version"@en ;
    rdfs:range xsd:string ;
    rdfs:seeAlso "http://data.europa.eu/esco/flow#exportVersion"^^xsd:anyURI .

:status
    a owl:DatatypeProperty ;
    rdfs:comment """The position or state of the concept or label (term) with respect to the back-office maintenance workflow.
Three states are relevant for a publication:
- 'valid': for released terms and concepts
- 'to be translated': A term requiring further translation
  look at ev:toBeTranslated to find the outstanding translations
- 'in maintenance': a concept or term in maintenance.
  look at ev:approvedForRelease to know for which version the approval holds.

If the property is not present, 'valid' must be assumed.

The property is typically set on a maintenance release only."""@en ;
    rdfs:domain [
        a owl:Class ;
        owl:unionOf (skos:Concept
            skos-xl:Label
        )
    ] ;
    rdfs:isDefinedBy <> ;
    rdfs:label "status"^^xsd:string ;
    rdfs:range [
        a rdfs:Datatype ;
        owl:oneOf ("in maintenance"^^xsd:string
            "to be translated"^^xsd:string
            "valid"^^xsd:string
        )
    ] .

:toBeTranslated
    a owl:DatatypeProperty ;
    rdfs:comment """The range value must have
- language (the language for which translatioin is required)
- for a term this must be the language of the term
- for a microthesaurus or domain this may be a comma seperated list of languages.

The format is:
<lang> [ ,'<lang> ]*"""@en ;
    rdfs:domain [
        a owl:Class ;
        owl:unionOf (skos:ConceptScheme
            skos-xl:Label
        )
    ] ;
    rdfs:isDefinedBy <> ;
    rdfs:label "to be translated"^^xsd:string .

owl:Thing
    a owl:Class .

skos:Concept
    a owl:Class .

skos:ConceptScheme
    a owl:Class .

skos-xl:Label
    a owl:Class .

