Properties
Properties define relationships between entities (object properties) and attributes of entities (data properties).
Object Properties
Section titled “Object Properties”Object properties link two individuals:
:hasOwner a owl:ObjectProperty ; rdfs:domain :Animal ; rdfs:range :Person .- Domain: the class of the subject (using
hasOwneron a node infers it’s anAnimal) - Range: the class of the object (the target of
hasOwneris inferred as aPerson)
Data Properties
Section titled “Data Properties”Data properties link an individual to a literal value:
:name a owl:DatatypeProperty ; rdfs:domain :Person ; rdfs:range xsd:string .
:age a owl:DatatypeProperty ; rdfs:range xsd:integer .Inverse Properties
Section titled “Inverse Properties”Declare two properties as inverses. When one is asserted, the other is materialized automatically:
:hasOwner a owl:ObjectProperty .:isOwnerOf a owl:ObjectProperty ; owl:inverseOf :hasOwner .Insert <rex> <hasOwner> <alice> → OWLGraph creates <alice> <isOwnerOf> <rex> automatically.
Property Characteristics
Section titled “Property Characteristics”Transitive
Section titled “Transitive”If A→B and B→C, then A→C:
:locatedIn a owl:ObjectProperty , owl:TransitiveProperty .Query with transitive paths: locatedIn* { name } follows the chain.
Symmetric
Section titled “Symmetric”If A→B, then B→A with the same property:
:friendOf a owl:ObjectProperty , owl:SymmetricProperty .Functional
Section titled “Functional”At most one value per subject:
:name a owl:DatatypeProperty , owl:FunctionalProperty .Inverse Functional
Section titled “Inverse Functional”At most one subject per value (like a unique constraint):
:email a owl:DatatypeProperty , owl:InverseFunctionalProperty .Reflexive / Irreflexive
Section titled “Reflexive / Irreflexive”:knows a owl:ObjectProperty , owl:ReflexiveProperty . # Everyone knows themselves:parentOf a owl:ObjectProperty , owl:IrreflexiveProperty . # Nobody is their own parentAsymmetric
Section titled “Asymmetric”If A→B, then B→A is forbidden:
:parentOf a owl:ObjectProperty , owl:AsymmetricProperty .Property Chains
Section titled “Property Chains”Define a derived property as a chain of other properties:
:hasParent a owl:ObjectProperty .:hasGrandparent a owl:ObjectProperty ; owl:propertyChainAxiom ( :hasParent :hasParent ) .When <C> hasParent <B> and <B> hasParent <A> appear in the same mutation, OWLGraph creates <C> hasGrandparent <A>.
Property chains currently support length-2 chains within a single mutation batch.
Sub-Properties
Section titled “Sub-Properties”:hasMotherOf a owl:ObjectProperty ; rdfs:subPropertyOf :hasParent .Domain and Range Inference
Section titled “Domain and Range Inference”Domain and range declarations trigger automatic type inference:
:writtenBy a owl:ObjectProperty ; rdfs:domain :Book ; rdfs:range :Author .When you insert <node1> writtenBy <node2>:
node1getsdgraph.type = "Book"(domain inference)node2getsdgraph.type = "Author"(range inference)- Both also get ancestor types materialized (
Book → CreativeWork,Author → Person, etc.)