---- On Mon, 08 Aug 2016 10:28:55 +0200 Dave Reynolds 
<dave.e.reyno...@gmail.com>wrote ---- 
 >  
 > This doesn't matter for your later questions but this example looks like  
 > it is confusing classes and properties. 
 >  
 > s: seems to be a property so the relationship between sc: and sd: to s:  
 > should be rdfs:subPropertyOf. 

Indeed, that is better.

 >  
 > Using the namespace itself (e.g. sc:) as the URI for a class is not  
 > wrong but is unusual and might cause confusion. 

What is the usual case? Having the class in a separate namespace? I could do 
that but I wondered how to easily document that some properties belong only to 
a single class for example, while other properties belong to multiple classes. 
Designing it as I would do it in Javas OO system seamed easiest to me.

 >  
 > > The purpose of the snippet above is to create an object of type 
 > > `http://x.test/schema/Class/0.1/` and give it a name. There is also the 
 > > type `http://x.test/schema/Decl/0.1/`, which is a super type of the 
 > > previous type. 
 >  
 > In the above snippet it's a super property not a super type.

Indeed, I got this wrong. Would the following be correct?

prefix sd:<http://x.test/schema/Decl/0.1/>
prefix sc:<http://x.test/schema/Class/0.1/>
prefix c:<http://x.test/data/Class/0.1/>
prefix rdfs:<http://www.w3.org/2000/01/rdf-schema#>
prefix s:<http://schema.org/>
insert data {
  sc: rdfs:subClassOf sd: .
  sc:name rdfs:subPropertyOf s:name .
  sd:name rdfs:subPropertyOf s:name .

  c:ClassName a sc: .
  c:ClassName sc:name "ClassName" .
}


 >  
 > > The types of the names are not important, the only thing that is important 
 > > is that `Class` shares all the properties that are also part of `Decl`. 
 >  
 > Nothing in the above says that. There is nothing here about properties  
 > being "part of" Class or Decl. In RDFS/OWL properties exist independent  
 > of classes. That can be related (via domain/range or the various OWL  
 > restrictions) but it's not like object oriented modelling. 

Ok, I think I understand that now. How would I explain such relationships then. 
With rules that Jena can understand?


 > > 
 > > 
 > > 
 > > - Does it make sense to design the system this way? I'm more or less 
 > > mimicking the typical inheritance model of object oriented languages here 
 > > but I'm not sure if that is the way to go. The two types `Class` and 
 > > `Decl` can be created independently from each other and the subtype 
 > > relationship may be created by another party. 
 >  
 > The subPropertyOf relation is a perfectly reasonable thing to use, and,  
 > given inference support, the above query will work. Whether it's the  
 > right way to design your system I can't comment on since I've no idea  
 > what the system is and what you are trying to achieve. 
 >  
 > The one note of caution I would repeat is that RDSF/OWL modelling and OO  
 > modelling are quite different. You can achieve similar effects in both  
 > cases but don't use OO behaviour as a guide to what RDFS/OWL inference  
 > will give you otherwise you'll get surprised :) 

How to design my system isn't clear to myself yet. And I don't think I 
undersdand RDFS/OWL mapping yet.

 >  
 > > - How to express the above relationship in Jena? I found Jenas 
 > > `GenericRuleReasoner` but this one doesn't seem to do what I need. It 
 > > seems to infer additional information based on a set of rules and stores 
 > > this additional information in the database. I don't think that the 
 > > relationship I have should be stored in the database. I think the moment 
 > > when the second query is run, Jena internally needs to find out about the 
 > > relationship (based on a set of rules) and find more information based on 
 > > the rules. 
 >  
 > Think of that as a cache. Whether the reasoner keeps a note of  
 > inferences it has already made doesn't change the behaviour. 
 >  
 > Though in fact the rule reasoner can support backward chaining (in which  
 > the queries are answered on demand) as well as forward chaining (in  
 > which the answers are kept). 
 >  
 > For your example above I would use the default RDFS reasoner  
 > configuration. It uses and GenericRuleReasoner under the hood with a mix  
 > of forward and backward rules. 

Alright, I'm going to understand the backwards chaining and this RDFS reasoner 
then.

 >  
 > Dave 
 > 

Reply via email to