i am currently creating my own ontology, which reuses terms of other ontologies.
this brings me to a simple question: i am wondering, if it is it allowed (or: best practice) to reuse existing terms (for instance ObjectProperties) of other vocabularies, but at the same time change their domains and ranges.
in other words: via redefining/redeclaring external ObjectProperties in my own ontology, i am able to reuse them. at the same time i am thinking about changing its domains/ranges to more specific classes than the original domains/ranges. to be more precise i would change the domain/range to subclasses of the original domain/range.
the main reason why i want to do this is that i want to reuse existing terms as much as possible. additionally, i want to narrow the definition of some terms. for instance suppose there is (in an external ontology) the property ex:hasTimestamp
. the range of this property in the original vocabulary is a very generic class. now, in my own vocabulary, i want to reuse this property and at the same time i want to define its range as the class time:TemporalEntity
from the time ontology. can i just do this by changing the range definition of the existing ex:hasTimestamp
property in my ontology, or should i do it differently? e.g. by defining a sub-property of ex:hasTimestamp
, for instance my:hasTimestamp
and then providing a more precise range definition?
Declaring a domain and range of a property in OWL doesn't "restrict what it can be applied to", but rather tells you something about the subject and objects of the property. For instance, if you have a class hierarchy such that Human ⊑ Mammal, then if you have a property hasAncestor with domain Human, then whenever you have an object property assertion hasAncestor(x,y), you can infer that Human(x). But since Human ⊑ Mammal, that means that Mammal(x). So, whenever you see hasAncestor(x,y), you can infer that Mammal(x). That means that Mammal is also a domain of hasAncestor. Properties have more than one domain and range.
This means that if you "redeclare" an ObjectProperty in your ontology, you're not actually "redeclaring" it so much as stating additional things about it. However, that's typically not something that you should do. Usually it makes more sense to import the ontology that declares the property you're interested in, declare a subproperty of it. Because of the way that domains and ranges work, you naturally inherit domains and ranges of the superproperty, and you can declare additional domains and ranges as you see fit.
For instance, you might declare an ontology about Stack Overflow, and declare a property answeredUser, such that answeredUser(x,y) when x is a user that answered a question by user y. You could import the FOAF vocabulary, and declare that answeredUser ⊑ foaf:knows, and add the additional domain and range StackOverflowUser.