On 17/01/13 21:40, hlel emna wrote:
goal: Independent of Data, my supervisor asked to create a code to create
3-ary relation.
So in order to answer your own question - "is my code correct?" - you
have to understand what your supervisor's reason is for asking for that.
N-ary relationships aren't things you just create for fun, they are
tools to be used for some purpose. Once you understand what the purpose
is, you have a means of determining whether your code will correctly
help you achieve that purpose.
I do not understand "FOAF.Person" why you have not written Person as a
class??
foaf:Person is probably the most widely used RDFS class anywhere on the
semantic web, since it's used in almost any tutorial on RDF.
http://xmlns.com/foaf/spec/#term_Person
As a convenience for developers, Jena has a number of RDFS and OWL
vocabularies built-in as Java classes; com.hp.hpl.jena.vocabulary.FOAF
contains the constants (classes, properties, etc) from the namespace:
http://xmlns.com/foaf/0.1/
Ian