PREFIX st: PREFIX rdf: PREFIX owl: PREFIX dcterms: PREFIX dc: PREFIX fun: PREFIX rdfs: PREFIX skos: PREFIX obo: PREFIX foaf: PREFIX schema: BASE TEMPLATE ( ?versionIRI ) { TEMPLATE ( st:call-template(, ?onto ) , ?pathToStatic , true ) . """

{ st:call-template(, ?onto ) }

Latest version:
{?onto}
{ TEMPLATE { "
Permanent IRI for this version (" ?versionInfo ")
{?versionIRI}
" } WHERE { ?onto owl:versionInfo ?versionInfo ; owl:versionIRI ?versionIRI } . } { TEMPLATE { "
" fun:property(, 'previousversion') "
{?onto}
" } WHERE { ?onto owl:priorVersion ?o } . } { TEMPLATE { "
" fun:property(, 'etsiSource') "
" ?source "
" } WHERE { ?onto dcterms:source ?source } ORDER BY DESC(?source) . } { TEMPLATE { "
" fun:property(, 'publicationDate') "
" ?date "
" } WHERE { ?onto dcterms:issued ?date } ORDER BY DESC(?date) . } { TEMPLATE { "
" fun:property(, 'modificationDate') "
" ?date "
" } WHERE { ?onto dcterms:modified ?date } ORDER BY DESC(?date) . } { TEMPLATE ( ?onto ) . } { TEMPLATE ( ?onto ) . }
Ontology requirements and tests
requirements and tests
{ TEMPLATE { before="
{fun:property(, 'importedontologies')}
\n" ; """<{?o}>""" ; separator="\n" ; after = "
" } WHERE { ?onto owl:imports ?o } . }
Prefix and namespace declaration:
Turtle: @prefix {?prefix} <{?onto}> .
SPARQL: PREFIX {?prefix} <{?onto}>
Download serialization:
License:
{ TEMPLATE { TEMPLATE { IF( ?abstract != "" , "

{ fun:property(, 'abstract') }

\n{?abstract}\n" , "" ) } WHERE { BIND( st:call-template(, ?onto) AS ?abstract ) }. "
" BOX { "\n

{ fun:property(, 'toc') }

" "\n
    " BOX { "\n
  1. { fun:property(, 'introduction') }
  2. " IF( st:call-template( ) != "" , "
  3. { fun:property(, 'examples') }
  4. " , "" ) "\n
  5. { fun:property(, 'namespaces') }
  6. " TEMPLATE { "\n
  7. { fun:property(, 'classes') }
  8. " } WHERE { {?class a owl:Class} UNION {?class a rdfs:Class} } LIMIT 1 . TEMPLATE { "\n
  9. { fun:property(, 'objectproperties') }
  10. " } WHERE { ?op a owl:ObjectProperty } LIMIT 1 . TEMPLATE { "\n
  11. { fun:property(, 'dataproperties') }
  12. " } WHERE { ?dp a owl:DatatypeProperty } LIMIT 1 . TEMPLATE { "\n
  13. { fun:property(, 'namedindividuals') }
  14. " } WHERE { ?ni a owl:NamedIndividual } LIMIT 1 . TEMPLATE { "\n
  15. { fun:property(, 'annotationproperties') }
  16. " } WHERE { ?ap a owl:AnnotationProperty } LIMIT 1 . TEMPLATE { "\n
  17. { fun:property(, 'generalaxioms') }
  18. " } WHERE { {?ga a owl:AllDisjointClasses} UNION { { ?class a owl:Class} UNION { ?class a rdfs:Class} UNION { ?class a owl:Restriction } FILTER( ISBLANK( ?class) ) { ?class rdfs:subClassOf []} UNION { ?class owl:equivalentClass []} } } LIMIT 1 . IF( st:call-template( ) != "" , "
  19. { fun:property(, 'references') }
  20. " , "" ) IF( st:call-template( ) != "" , "
  21. { fun:property(, 'acknowledgements') }
  22. " , "" ) "\n
  23. Hierarchies of Terms
  24. " } "\n
" } "\n
" TEMPLATE { before = "

{ fun:property(, 'introduction') }

\n" ; TEMPLATE ( ?onto ) . ; after = "\n" } . "\n\n\n" TEMPLATE ( ) . "\n\n\n" TEMPLATE () . "\n\n\n" TEMPLATE ( ?onto ) WHERE { {?c a owl:Class} UNION {?c a rdfs:Class} } LIMIT 1 . "\n\n\n" TEMPLATE ( ?onto ) WHERE { ?op a owl:ObjectProperty } LIMIT 1 . "\n\n\n" TEMPLATE ( ?onto ) WHERE { ?op a owl:DatatypeProperty } LIMIT 1 . "\n\n\n" TEMPLATE ( ?onto ) . "\n\n\n" TEMPLATE ( ) . "\n\n\n" TEMPLATE ( ) . }. }
""" TEMPLATE ( ?pathToStatic , true ) . } FROM ?versionIRI WHERE { BIND( fun:regex( str(?versionIRI), "^https://saref.etsi.org/([a-z4]+)/([^/]+)/$", 1 ) AS ?ext ) BIND( IF( ?ext = "core" , "saref" , ?ext ) AS ?filename ) BIND( IF( ?ext = "core" , "saref" , "s{SUBSTR(?ext,6)}" ) AS ?short ) BIND( UCASE( ?short ) AS ?name ) BIND( "{?short}:" AS ?prefix ) BIND( fun:regex( str(?versionIRI), "^https://saref.etsi.org/([a-z4]+)/(v[0-9]+\\.[0-9]+\\.[0-9]+)/$", 2 ) AS ?versionInfo ) BIND( IRI( fun:regex( str(?versionIRI), "^(https://saref.etsi.org/[a-z4]+/)", 1 ) ) AS ?onto ) BIND( "../../static" AS ?pathToStatic ) ?onto a owl:Ontology . } #LIMIT 1