Commit 94d0cab6 authored by Thibaut Démare's avatar Thibaut Démare

Update test of received attributes

parent de270513
...@@ -22,14 +22,33 @@ public class SimpleSinkAdapter extends SinkAdapter { ...@@ -22,14 +22,33 @@ public class SimpleSinkAdapter extends SinkAdapter {
System.out.println("Edges attributes :"); System.out.println("Edges attributes :");
for(Edge e : graph.getEachEdge()){ for(Edge e : graph.getEachEdge()){
for(Object o : e.getAttributeKeySet()){ for(Object o : e.getAttributeKeySet()){
System.out.println(e.getAttribute((String)o).getClass() + " et value = " + e.getAttribute((String)o)); System.out.println(e.getAttribute((String)o).getClass());
if(e.getAttribute((String)o).getClass().isArray()){
Object[] array = (Object[])e.getAttribute((String)o);
System.out.print('\t');
for(Object ob : array)
System.out.print(ob);
System.out.println();
}
else{
System.out.println("\tvalue = "+e.getAttribute((String)o));
}
} }
} }
System.out.println("Nodes attributes :"); System.out.println("Nodes attributes :");
for(Node e : graph.getEachNode()){ for(Node e : graph.getEachNode()){
for(Object o : e.getAttributeKeySet()){ for(Object o : e.getAttributeKeySet()){
System.out.println(e.getAttribute((String)o).getClass() + " et value = " + e.getAttribute((String)o)); System.out.println(e.getAttribute((String)o).getClass());
} if(e.getAttribute((String)o).getClass().isArray()){
Object[] array = (Object[])e.getAttribute((String)o);
System.out.print('\t');
for(Object ob : array)
System.out.print(ob);
System.out.println();
}
else{
System.out.println("\tvalue = "+e.getAttribute((String)o));
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment