Hello Maatary,
On 22/08/11 12:16, Maatary Daniel OKOUYA wrote:
What about using, list_subject then verify that if the subject is not an
action or a reified statement, then it has to be an object of a property
and for those who are subjects, they have to be one statement only or
one or two actions ???
My advice would be to think about this at a different level of abstraction. It sounds like you have some very clear concepts, related to the domain you're working in, expressed in the RDF model. My suggestion would be to model those as Java classes, and think of the relationship those classes have to other concepts you're working with, and then separately think about how those concepts are encoded in the RDF.

The examples you've shown so far are rather simple, so it's hard to determine exactly what you're trying to do .. so what follows is just a guess on my part. However, clearly you have some concept of an action that takes place, and actors that perform actions. Presumably there's also a timeline of actions, so one action may have a list of successor actions. These relationships can be expressed in the OO interface to your classes:

public class Action {
   public List<Actor> getActors() {...}
   public List<Action> getSuccessors() {..}
   etc
}

To implemement those methods, you can then think about the way the actions are encoded in RDF. For example the getActors() method just needs to list statements with the subject corresponding to the action and the predicate ocean:hasActor.

In short, think clearly about *what* the concepts encoded in your RDF are there to represent and how they relate to each other, then separately *how* those concepts are expressed in RDF triples.

This will also help you to write better test cases for your application code.

Ian



--
____________________________________________________________
Ian Dickinson                   Epimorphics Ltd, Bristol, UK
mailto:[email protected]        http://www.epimorphics.com
cell: +44-7786-850536              landline: +44-1275-399069
------------------------------------------------------------
Epimorphics Ltd.  is a limited company registered in England
(no. 7016688). Registered address: Court Lodge, 105 High St,
              Portishead, Bristol BS20 6PT, UK

Reply via email to