Skip to content

Instantly share code, notes, and snippets.

@aindlq
Last active December 21, 2015 12:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aindlq/6304818 to your computer and use it in GitHub Desktop.
Save aindlq/6304818 to your computer and use it in GitHub Desktop.
How property can be owl:DatatypeProperty and owl:ObjectProperty at the same time.
@prefix : <http://example.com/test/> .
@prefix test: <http://example.com/test/> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix qudt: <http://qudt.org/schema/qudt#> .
@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#> .
<http://example.com/test/>
rdf:type owl:Ontology .
test:Agent
rdf:type owl:Class ;
rdfs:subClassOf
[ rdf:type owl:Restriction ;
owl:minCardinality "1"^^xsd:nonNegativeInteger ;
owl:onProperty test:id
] .
test:id
rdf:type owl:DatatypeProperty ;
rdfs:domain test:Agent ;
rdfs:range xsd:string .
test:string1024
rdf:type rdfs:Datatype ;
rdfs:label "string1024"^^xsd:string ;
rdfs:subClassOf xsd:string ;
owl:equivalentClass
[ rdf:type rdfs:Datatype ;
owl:onDatatype xsd:string ;
owl:withRestrictions
([ xsd:maxLength "1024"^^xsd:nonNegativeInteger
])
] .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment