public class GraphApp extends Object
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.commons.configuration2.Configuration |
conf |
protected org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource |
g |
protected org.apache.tinkerpop.gremlin.structure.Graph |
graph |
protected String |
propFileName |
protected boolean |
supportsGeoshape |
protected boolean |
supportsSchema |
protected boolean |
supportsTransactions |
| Constructor and Description |
|---|
GraphApp(String fileName)
Constructs a graph app using the given properties.
|
| Modifier and Type | Method and Description |
|---|---|
void |
closeGraph()
Closes the graph instance.
|
void |
createElements()
Adds the vertices, edges, and properties to the graph.
|
void |
createSchema()
Creates the graph schema.
|
void |
deleteElements()
Deletes elements from the graph structure.
|
void |
dropGraph()
Drops the graph instance.
|
protected float[] |
getGeoFloatArray(float lat,
float lon)
Returns the geographical coordinates as a float array.
|
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource |
openGraph()
Opens the graph instance.
|
void |
readElements()
Runs some traversal queries to get data from the graph.
|
void |
runApp()
Run the entire application:
1.
|
void |
updateElements()
Makes an update to the existing graph structure.
|
protected String propFileName
protected org.apache.commons.configuration2.Configuration conf
protected org.apache.tinkerpop.gremlin.structure.Graph graph
protected org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource g
protected boolean supportsTransactions
protected boolean supportsSchema
protected boolean supportsGeoshape
public GraphApp(String fileName)
fileName - location of the properties filepublic org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource openGraph()
throws org.apache.commons.configuration2.ex.ConfigurationException,
IOException
org.apache.commons.configuration2.ex.ConfigurationExceptionIOExceptionpublic void dropGraph()
throws Exception
Exceptionpublic void createSchema()
public void createElements()
protected float[] getGeoFloatArray(float lat,
float lon)
public void readElements()
public void updateElements()
public void deleteElements()
public void runApp()
Copyright © 2012–2023. All rights reserved.