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