Search code examples
rdfowlsemantic-web

Can I create datatype property for particular class in OWL?


Something like.. Suppose I have a class named Instructor.

Now, I need to have a datatypeProperties linked only to instructor like salary, instructor_name..

What is the RDF structure for this? Is such thing possible?


Solution

  • Adding rdfs:domain works!

    <!-- Define the salary property -->
    <owl:DatatypeProperty rdf:about="http://www.example.com/sample#salary">
        <rdfs:domain rdf:resource="http://www.example.com/sample#instructor" />
    </owl:DatatypeProperty>