Given a certain class in my Tbox a string value

Hi,

So this is more a principle question within the semantic web and RDF definition.

I have some classes in my graph for whom I would like to attach a certain string value with some predicate.

So for instance a wall is defined as a class ifcowl:IfcWall. To this wall I would like to say has a classification-code “AD” with predicate ccs:productID. Now if I then have a instance of this class it should automatically infer that the instance also has ccs:productID “AD” - what would be the right way to this? :slight_smile:

Arbaz,

This is a textbook case where Stardog Rules will give you exactly what you want. If you add the rule:

IF {
 ?wall a ifcowl:IfcWall
}
THEN {
 ?wall ccs:productID "AD"
}

and run a query with reasoning enabled, your ccs:productID values will appear when queried.

Yes thanks stephen, but this is the solution I am using right now.

I was wondering if it possible to create an ontology that could handle this? For sharing with other semantic web tools other than Stardog?

I’m a little confused by “I have some classes in my graph for whom I would like to attach a certain string value with some predicate.”. I think what you may have meant was, “I have an instance of some class for whom I would like to attach a certain string value with some predicate”. If that’s the case then you’re probably looking for owl:hasValue

Let me clarify.

The class ifcowl:IfcWall is a class of a physical wall which in the real world has a classification code “AD” meaning that all instances of such a class has a ccs:productID “AD”. I know this can be reasoned to via rulesets, but is there a way to do this in the ontology?

You can export Stardog rules in SWRL syntax and can load that to other tools like Protege. But you can express this specific rule in OWL using owl:hasValue as Zachary mentioned.

Best,
Evren

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.