This is how i finally did:
private IndexedContainer getTradParameters(int id){
IndexedContainer container = new IndexedContainer();
container.addContainerProperty("name", String.class, null);
try {
Document doc = Jsoup.connect("http://10.0.0.1:7474/db/data/node/"+id+"/").get();
Elements properties = doc.select("th");
for(int index = 0; index < properties.size(); index++){
String parameter = properties.get(index).text();
Item item = container.addItem(index);
item.getItemProperty("name").setValue(parameter);
}
} catch (IOException e) {
e.printStackTrace();
}
return container;
}
Where the id parameter is returned by this:
match (t:Translation) return id(t)
I call getTradParameters() with every iterator of my request and then i have a container with the name of all of the parameters of my node.
The Last part is calling this function :
private String getTradRequest(String pays){
String request = "match (n:Translation{trad_country:\""+pays+"\"}) return id(n) as id";
QueryResult <Map<String,Object>>result = engine.query(request, Collections.EMPTY_MAP);
Iterator<Map<String, Object>> iterator=result.iterator();
Map<String,Object> row = iterator.next();
int id = Integer.valueOf(row.get("id").toString());
try {
Document doc = Jsoup.connect("http://10.0.0.1:7474/db/data/node/"+id+"/").get();
Elements properties = doc.select("th");
for(int index = 0; index < properties.size(); index++){
String parameter = properties.get(index).text();
request = request + ",n."+parameter;
}
} catch (IOException e) {
e.printStackTrace();
}
return request;
}
To create my big Cypher request to get all of the properties i need on my node, and then i just need to get the answers and store them in a container, to display it in a table using vaadin.