Click here to Skip to main content
14,579,188 members
Rate this:
Please Sign up or sign in to vote.
See more:
I have RDF model that has :
--the following Classes :
-Person.
-Woman(subclass of person).
-Man(subclass of person).
-Child(subclass of person).
-Son(subclass of child).
-Daughter(subclass of child).
--the object properties are :
-isMarriedto(domain:person/range:person).
-isSonOf(domain:person/range:person).
-isDaughterOf(domain:person/range:person) .
--the data type properties are:
-Name(domain:person/range:string).
-Age(domain:person/range:int).
I want to create this model in Java and reuse it to generate RDF file.
How can I do this ?

What I have tried:

I looked for source code to help me but I did not find
Posted
Updated 26-Jun-20 6:16am

1 solution

Rate this:
Please Sign up or sign in to vote.

Solution 1

Well of course you didn't find the source code. This is an exercise for you to show how much of your teacher's words you have understood. So go back to your lecture notes and start from the beginning.
Looking at your question above the first class you need to create is the Person class. So look at all the other requirements to see what properties everyone must have. The notes mention Name and Age, so you can quickly create your Person class with those two. Now go on to the next one Woman. You can now add some code to create a Woman (make sure she's pretty) and test the code. Once you are satisfied that works then add the next one. And keep on until you have all your classes built and working.

[edit]
I have not come across RDF before but it looks somewhat advanced. I suggest you focus on learning Java for the moment.
[/edit]
   
v2
Comments
Member 14874167 26-Jun-20 12:39pm
   
Actually,I am learning Java but "Create RDF model in java" is new to me , and we didn't have a lecture about it
Richard MacCutchan 26-Jun-20 12:42pm
   
Well you first need to create all the classes described in your question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100