Skip to content

Plan, apply and roll back changes to a production ontology, with a blast radius report and a proof an auditor can re-check.

5.2 KB
Raw Blame
# Every construct family the OFN reader translates, in one document.
# The companion all_constructs.owlapi.nt is what OWL API 4.5.29 writes for
# this file (RDF/XML, re-serialised to N-Triples by Oxigraph); see
# tests/ofn_reader_test.rs for the differences that are expected and why.
Prefix(:=<http://example.org/ofn#>)
Prefix(owl:=<http://www.w3.org/2002/07/owl#>)
Prefix(rdf:=<http://www.w3.org/1999/02/22-rdf-syntax-ns#>)
Prefix(rdfs:=<http://www.w3.org/2000/01/rdf-schema#>)
Prefix(xsd:=<http://www.w3.org/2001/XMLSchema#>)

Ontology(<http://example.org/ofn> <http://example.org/ofn/1.0>
Import(<http://example.org/imported>)
Annotation(rdfs:comment "An ontology that uses everything.")

Declaration(Class(:A))
Declaration(Class(:B))
Declaration(Class(:C))
Declaration(Class(:D))
Declaration(Class(:Person))
Declaration(Datatype(:SmallInt))
Declaration(ObjectProperty(:r))
Declaration(ObjectProperty(:s))
Declaration(ObjectProperty(:t))
Declaration(ObjectProperty(:hasParent))
Declaration(ObjectProperty(:hasGrandparent))
Declaration(DataProperty(:age))
Declaration(DataProperty(:name))
Declaration(DataProperty(:nick))
Declaration(AnnotationProperty(:note))
Declaration(AnnotationProperty(:subnote))
Declaration(NamedIndividual(:i))
Declaration(NamedIndividual(:j))
Declaration(NamedIndividual(:k))
Declaration(Annotation(:note "declared with a note") Class(:Annotated))

############################  class expressions
SubClassOf(:A ObjectIntersectionOf(:B :C))
SubClassOf(:A ObjectUnionOf(:B ObjectComplementOf(:C)))
SubClassOf(:A ObjectOneOf(:i :j))
SubClassOf(:A ObjectSomeValuesFrom(:r :B))
SubClassOf(:A ObjectAllValuesFrom(ObjectInverseOf(:r) :B))
SubClassOf(:A ObjectHasValue(:r :i))
SubClassOf(:A ObjectHasSelf(:r))
SubClassOf(:A ObjectMinCardinality(2 :r))
SubClassOf(:A ObjectMaxCardinality(3 :r :B))
SubClassOf(:A ObjectExactCardinality(1 :s :C))
SubClassOf(:A ObjectExactCardinality(4 :s))
SubClassOf(:A ObjectMinCardinality(1 :t owl:Thing))
SubClassOf(:Undeclared :A)

############################  data ranges and data restrictions
SubClassOf(:B DataSomeValuesFrom(:age DatatypeRestriction(xsd:integer xsd:minInclusive "0"^^xsd:integer xsd:maxExclusive "150"^^xsd:integer)))
SubClassOf(:B DataAllValuesFrom(:name DataUnionOf(xsd:string DataOneOf("x" "y"@en))))
SubClassOf(:B DataSomeValuesFrom(:age DataIntersectionOf(xsd:integer DataComplementOf(xsd:negativeInteger))))
SubClassOf(:B DataHasValue(:name "Bob"))
SubClassOf(:B DataMinCardinality(1 :name))
SubClassOf(:B DataMaxCardinality(2 :name xsd:string))
SubClassOf(:B DataExactCardinality(1 :age))
DatatypeDefinition(:SmallInt DatatypeRestriction(xsd:integer xsd:maxInclusive "10"^^xsd:integer))

############################  class axioms
EquivalentClasses(:C :D ObjectSomeValuesFrom(:s :A))
DisjointClasses(:A :D)
DisjointClasses(:B :C :Person)
DisjointUnion(:Person :A :B)

############################  object property axioms
SubObjectPropertyOf(:s :r)
SubObjectPropertyOf(ObjectPropertyChain(:hasParent :hasParent) :hasGrandparent)
EquivalentObjectProperties(:s :t)
DisjointObjectProperties(:hasParent :t)
DisjointObjectProperties(:hasGrandparent :hasParent :r)
InverseObjectProperties(:r ObjectInverseOf(:s))
ObjectPropertyDomain(:r :A)
ObjectPropertyRange(:r :B)
FunctionalObjectProperty(:hasParent)
InverseFunctionalObjectProperty(:hasParent)
ReflexiveObjectProperty(:t)
IrreflexiveObjectProperty(:hasParent)
SymmetricObjectProperty(:t)
AsymmetricObjectProperty(:hasParent)
TransitiveObjectProperty(:hasGrandparent)

############################  data property axioms
SubDataPropertyOf(:nick :name)
EquivalentDataProperties(:name :nick)
DisjointDataProperties(:age :name)
DataPropertyDomain(:age :Person)
DataPropertyRange(:age xsd:nonNegativeInteger)
FunctionalDataProperty(:age)
HasKey(:Person (:hasParent) (:name))

############################  assertions
SameIndividual(:i :j)
DifferentIndividuals(:i :k)
DifferentIndividuals(:i :j :k)
ClassAssertion(:A :i)
ClassAssertion(ObjectSomeValuesFrom(:r :B) _:anon1)
ObjectPropertyAssertion(:r :i :j)
ObjectPropertyAssertion(ObjectInverseOf(:s) :i :k)
ObjectPropertyAssertion(:r _:anon1 :k)
NegativeObjectPropertyAssertion(:r :j :k)
DataPropertyAssertion(:age :i "42"^^xsd:integer)
DataPropertyAssertion(:name :i "Ian \"the \\ quoted\""@en-GB)
DataPropertyAssertion(:nick :i "plain@"^^rdf:PlainLiteral)
DataPropertyAssertion(:nick :j "tagged@fr"^^rdf:PlainLiteral)
NegativeDataPropertyAssertion(:age :j "7"^^xsd:integer)

############################  annotation axioms
AnnotationAssertion(rdfs:label :A "A label"@en)
AnnotationAssertion(:note :A <http://example.org/elsewhere>)
AnnotationAssertion(:note _:anon1 "about an anonymous individual")
SubAnnotationPropertyOf(:subnote :note)
AnnotationPropertyDomain(:note :A)
AnnotationPropertyRange(:note xsd:string)

############################  annotated axioms
SubClassOf(Annotation(Annotation(:note "nested") rdfs:comment "Children are people.") :C :Person)
EquivalentClasses(Annotation(:note "three-way") :A :B :C)
DisjointClasses(Annotation(:note "pairwise") :C :D)
DisjointClasses(Annotation(:note "n-ary") :A :C :D)
DisjointUnion(Annotation(:note "union") :D :A :C)
SubObjectPropertyOf(Annotation(:note "chain") ObjectPropertyChain(:r :s) :t)
NegativeObjectPropertyAssertion(Annotation(:note "negative") :s :i :k)
HasKey(Annotation(:note "key") :A () (:age))
)