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 SparkUtilsBase
public Long getElementId(Object graphElementReprOnDB)
getElementId
in interface SparkUtilsBase
public Object getGraphElementReprOnDB(Object dbObject)
getGraphElementReprOnDB
in interface SparkUtilsBase
public static SparkUtils getInstance()
public Long getInVertexId(Object graphElementReprOnDB)
getInVertexId
in interface SparkUtilsBase
public Long getOutVertexId(Object graphElementReprOnDB)
getOutVertexId
in interface SparkUtilsBase
public Set<String> getPropertyNames(Object graphElementReprOnDB)
getPropertyNames
in interface SparkUtilsBase
public Object getPropertyValue(Object graphElementReprOnDB, String keyName) throws IOException, ParseException
getPropertyValue
in interface SparkUtilsBase
IOException
ParseException
public boolean isElementForEdge(Object graphElementReprOnDB)
isElementForEdge
in interface SparkUtilsBase
public boolean isElementForVertex(Object graphElementReprOnDB)
isElementForVertex
in interface SparkUtilsBase
Copyright © 2017 Oracle and/or its affiliates. All Rights Reserved.