Adding attribute latitude and longitude
Posted: 31 May 2016 02:15
Can some one help me use Java API (0.9x) to add two attributes - latitude and longitude ?
I am unable to add them using the Java API.
current snapshot of the code looks below. I want to add two attributes to this code.
I am unable to add them using the Java API.
current snapshot of the code looks below. I want to add two attributes to this code.
Code: Select all
// Init a project - and therefore a workspace
ProjectController pc = Lookup.getDefault().lookup(ProjectController.class);
pc.newProject();
Workspace workspace = pc.getCurrentWorkspace();
// Get a graph model - it exists because we have a workspace
GraphModel graphModel = Lookup.getDefault().lookup(GraphController.class).getGraphModel();
Node v1 = graphModel.factory().newNode(source);
v1.setLabel(source);