public class SparkUtils extends java.lang.Object implements SparkUtilsBase
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getEdgeLabel(java.lang.Object graphElementReprOnDB)
When the given graph element is a repsentation of an Edge, returns the edge label.
|
java.lang.Long |
getElementId(java.lang.Object graphElementReprOnDB)
This method returns a graph element (Vertex or Edge) ID.
|
java.lang.Object |
getGraphElementReprOnDB(java.lang.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
|
java.lang.Long |
getInVertexId(java.lang.Object graphElementReprOnDB)
When the given graph element is a repsentation of an Edge, returns the in-vertex (or destination) ID.
|
java.lang.Long |
getOutVertexId(java.lang.Object graphElementReprOnDB)
When the given graph element is a repsentation of an Edge, returns the out-vertex (or source) ID.
|
java.util.Set<java.lang.String> |
getPropertyNames(java.lang.Object graphElementReprOnDB)
This method returns a set of property names for a given graph element (Vertex or Edge).
|
java.lang.Object |
getPropertyValue(java.lang.Object graphElementReprOnDB,
java.lang.String keyName)
This method returns the property value of a graph element for a given property key.
|
boolean |
isElementForEdge(java.lang.Object graphElementReprOnDB)
Returns true if the given graph element is a repsentation of an Edge.
|
boolean |
isElementForVertex(java.lang.Object graphElementReprOnDB)
Returns true if the given graph element is a repsentation of a Vertex.
|
public java.lang.String getEdgeLabel(java.lang.Object graphElementReprOnDB)
getEdgeLabel in interface SparkUtilsBasepublic java.lang.Long getElementId(java.lang.Object graphElementReprOnDB)
getElementId in interface SparkUtilsBasepublic java.lang.Object getGraphElementReprOnDB(java.lang.Object dbObject)
getGraphElementReprOnDB in interface SparkUtilsBasepublic static SparkUtils getInstance()
public java.lang.Long getInVertexId(java.lang.Object graphElementReprOnDB)
getInVertexId in interface SparkUtilsBasepublic java.lang.Long getOutVertexId(java.lang.Object graphElementReprOnDB)
getOutVertexId in interface SparkUtilsBasepublic java.util.Set<java.lang.String> getPropertyNames(java.lang.Object graphElementReprOnDB)
getPropertyNames in interface SparkUtilsBasepublic java.lang.Object getPropertyValue(java.lang.Object graphElementReprOnDB,
java.lang.String keyName)
throws java.io.IOException,
java.text.ParseException
getPropertyValue in interface SparkUtilsBasejava.io.IOExceptionjava.text.ParseExceptionpublic boolean isElementForEdge(java.lang.Object graphElementReprOnDB)
isElementForEdge in interface SparkUtilsBasepublic boolean isElementForVertex(java.lang.Object graphElementReprOnDB)
isElementForVertex in interface SparkUtilsBaseCopyright © 2015 - 2018 Oracle and/or its affiliates. All Rights Reserved.