1.11M Members

JAVA ONTOLOGY NEO4J

 
0
 

Hi guys,

I am developing a software that has to transform a dataset in a graph database.
So far I have developed the dataset import. Basically, I open the file and afterward it is displayed in the tab1 and stored in a matrix of Objects.
Now I don't have any idea on how to convert it in a graph database and above all I don't know how to map the dataset to the following ontology (see this image http://dodcio.defense.gov/portals/0/Images/dodaf20/DM2_common_patterns.gif).To be clearer I want to give a semantic to the dataset mapping it to the specific ontology (for example each element of the first column has to be under, for example, the node "elements" and the property that link each field of the first column to each field of the second column is under the node of "tuple"). In a nutshell I have to link each field with the element of the same row. The first element the second element and the property that link both of them have to be linked to the specific part of the ontology.

Can you please suggest how can i implement it and which java constructs I should study in order to implement it?

I apologise for being unclear but the topic is a bit hard to be explained

If you need further explanations please ask me and I will be happy to provide other details

Thank you for your help guys

 
0
 

I admit that I don't understand this question fully, but since nobody else has any answer at all, here's my best shot.
The diagram you linked to looks like a UML class diagram, in which case that will map to Java (very briefly) as follows:
Each box is a class - the class name is at the top of the box, eg "Thing" (a.k.a. Object?), "Type" etc.
The solid head arrows show inheritance, eg TupleType extends Type
The open arrows indicate an association between two class instances, which is implemented at either or both ends as a simple variable for a 1:1 link, or a Collection such as ArrayList for 1:many. The name on the arrow would be the name of the variable or collection.
The dotted lines are a dependency ("uses" relationship), needs an instance variable to hold a ref to the needed instance.

Have a look at http://en.wikipedia.org/wiki/Class_diagram

 
0
 

Thank you James, You got my point. I like what you wrote and it corresponds to what I was trying to do. However, I have noticed that after creating the hyerarchy of classes I don't know how to create the graph in the neo4j database. I mean each column of the dataset has to be mapped semantically according to one of these boxes (and relations between columns too). The graph database at the end has to contain as super node the class Thing. The class thing is further linked to the class Element Type and Tuple and so on. The upper part of the graph is built when I run the programm (I don't know ho to implement it). Afterward, I have to map manually (I will put a button for each column that assigns the column to a specific box) the columns of the dataset linking it to a specific box e consequently each value of the column will be uploaded in the graph. Next, the second column will be mapped to another box. The relation between the first and second columns too. The program will consequently link in the graph database each element created before (first column) to its respective element of the second column using a specific relation that has been mapped to another box.
I hope that it will clarify some doubts

Tanio

 
0
 

I sort-of understand that, but I really have no idea how to do it either. I have zero exposure to NEO4J. Sorry. Good luck anyway
J

You
This article has been dead for over six months: Start a new discussion instead
Post:
Start New Discussion
Tags Related to this Article