public class SparkUtils extends Object implements SparkUtilsBase
| Modifier and Type | Method and Description |
|---|---|
String |
getEdgeLabel(Object graphElementReprOnDB)
When the given graph element is a repsentation of an Edge, returns the edge label.
|
Long |
getElementId(Object graphElementReprOnDB)
This method returns a graph element (Vertex or Edge) ID.
|
Object |
getGraphElementReprOnDB(Object dbObject)
This method returns a graph element representation stored in one of the underlying databases.
|
static SparkUtils |
getInstance()
A helper method to return an instance of SparkUtils
|
Long |
getInVertexId(Object graphElementReprOnDB)
When the given graph element is a repsentation of an Edge, returns the in-vertex (or destination) ID.
|
Long |
getOutVertexId(Object graphElementReprOnDB)
When the given graph element is a repsentation of an Edge, returns the out-vertex (or source) ID.
|
Set<String> |
getPropertyNames(Object graphElementReprOnDB)
This method returns a set of property names for a given graph element (Vertex or Edge).
|
Object |
getPropertyValue(Object graphElementReprOnDB, String keyName)
This method returns the property value of a graph element for a given property key.
|
boolean |
isElementForEdge(Object graphElementReprOnDB)
Returns true if the given graph element is a repsentation of an Edge.
|
boolean |
isElementForVertex(Object graphElementReprOnDB)
Returns true if the given graph element is a repsentation of a Vertex.
|
public String getEdgeLabel(Object graphElementReprOnDB)
getEdgeLabel in interface SparkUtilsBasepublic Long getElementId(Object graphElementReprOnDB)
getElementId in interface SparkUtilsBasepublic Object getGraphElementReprOnDB(Object dbObject)
getGraphElementReprOnDB in interface SparkUtilsBasepublic static SparkUtils getInstance()
public Long getInVertexId(Object graphElementReprOnDB)
getInVertexId in interface SparkUtilsBasepublic Long getOutVertexId(Object graphElementReprOnDB)
getOutVertexId in interface SparkUtilsBasepublic Set<String> getPropertyNames(Object graphElementReprOnDB)
getPropertyNames in interface SparkUtilsBasepublic Object getPropertyValue(Object graphElementReprOnDB, String keyName) throws IOException, ParseException
getPropertyValue in interface SparkUtilsBaseIOExceptionParseExceptionpublic boolean isElementForEdge(Object graphElementReprOnDB)
isElementForEdge in interface SparkUtilsBasepublic boolean isElementForVertex(Object graphElementReprOnDB)
isElementForVertex in interface SparkUtilsBaseCopyright © 2016 Oracle and/or its affiliates. All Rights Reserved.