Skip to content
Christopher Condit edited this page Jul 10, 2015 · 6 revisions

OWL -> Neo4j Translations

TestAnnotationAssertionLiteral

Prefix(:=<http://example.org/>)

Ontology(:TestAnnotationAssertionLiteral
Declaration(AnnotationProperty(:p))
AnnotationAssertion(:p :i "foo")
)

TestAnnotationAssertionObject

Prefix(:=<http://example.org/>)

Ontology(:TestAnnotationAssertionObject
Declaration(AnnotationProperty(:p))
AnnotationAssertion(:p :i :j)
)

TestClassAssertion

Prefix(:=<http://example.org/>)

Ontology(:TestClassAssertion
Declaration(Class(:c))
Declaration(NamedIndividual(:i))
ClassAssertion(:c :i)
ClassAssertion(:c _:anonymousIndividual)
)

TestEquivalentClasses

Prefix(:=<http://example.org/>)

Ontology(:TestEquivalentClass
EquivalentClasses(:x :y :z)
)

TestEquivalentToIntersectionOf

Prefix(:=<http://example.org/>)

Ontology(:TestEquivalentToIntersectionOf
Declaration(ObjectProperty(:p))
EquivalentClasses(:definedClass ObjectIntersectionOf( :genus ObjectSomeValuesFrom(:p :fillerClass)))
)

TestExistentialClassAssertion

Prefix(:=<http://example.org/>)

Ontology(:TestExistentialClassAssertion
Declaration(ObjectProperty(:p))
ClassAssertion( ObjectSomeValuesFrom(:p :c) :i)
)

TestGCISubClassOf

Prefix(:=<http://example.org/>)

Ontology(:TestGCISubclassOf
Declaration(ObjectProperty(:p))
SubClassOf(ObjectSomeValuesFrom(:p :subclass) ObjectSomeValuesFrom(:p :superclass))
)

TestInferredEdges

Prefix(:=<http://example.org/>)

Ontology(:TestInferredEdges

# primitive hierarchy
SubClassOf(:a :root)
SubClassOf(:b :a)
SubClassOf(:c :b)
SubClassOf(:d :c)
SubClassOf(:e :d)

# equivalence axioms sufficient to build complete hierarchy
EquivalentClasses(:ax ObjectSomeValuesFrom(:p :a))
EquivalentClasses(:bx ObjectSomeValuesFrom(:p :b))
EquivalentClasses(:cx ObjectSomeValuesFrom(:p :c))
EquivalentClasses(:dx ObjectSomeValuesFrom(:p :d))
EquivalentClasses(:ex ObjectSomeValuesFrom(:p :e))

# derived partially asserted hierarchy

SubClassOf(:ax :root)
SubClassOf(:bx :ax)
SubClassOf(:cx :bx)
SubClassOf(:dx :root)   ## link to be repaired
SubClassOf(:ex :dx)

)

TestObjectPropertyAssertion

Prefix(:=<http://example.org/>)

Ontology(:TestObjectPropertyAssertion
Declaration(ObjectProperty(:p))
ObjectPropertyAssertion(:p :i :j)
)

TestPun

Prefix(:=<http://example.org/>)

Ontology(:TestPun
Declaration(ObjectProperty(:p))
ObjectPropertyAssertion(:p :i :j)
SubClassOf(:i :k)
)

TestSubAnnotationPropertyOf

Prefix(:=<http://example.org/>)

Ontology(:TestSubAnnotationPropertyOf
SubAnnotationPropertyOf(:subproperty :superproperty)
)

TestSubClassOf

Prefix(:=<http://example.org/>)

Ontology(:TestSubclassOf
SubClassOf(:subclass :superclass)
)

TestSubClassOfAnnotation

Prefix(:=<http://example.org/>)

Ontology(:TestSubclassOf
SubClassOf(
Annotation(:foo "bar"^^xsd:string) 
:subclass :superclass)
)

TestSubClassOfExistential

Prefix(:=<http://example.org/>)

Ontology(:TestSubclassOfExistential
Declaration(ObjectProperty(:p))
SubClassOf(:subclass ObjectSomeValuesFrom(:p :superclass))
)

TestSubObjectPropertyChainOf

Prefix(:=<http://example.org/>)

Ontology(:TestSubObjectPropertyChainOf
SubObjectPropertyOf(ObjectPropertyChain(:p1 :p2) :p3)
)

TestSubObjectPropertyOf

Prefix(:=<http://example.org/>)

Ontology(:TestSubObjectPropertyOf
SubObjectPropertyOf(:subproperty :superproperty)
)