Package oracle.pgx.api
Class PgxVertex<ID>
- java.lang.Object
-
- oracle.pgx.api.internal.ApiObject
-
- oracle.pgx.api.PgxEntity<ID>
-
- oracle.pgx.api.PgxVertex<ID>
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description long
getDegree()
Convenience method that callsgetOutDegree()
.PgxFuture<java.lang.Long>
getDegreeAsync()
Returns the degree of this vertex by callinggetOutDegreeAsync()
.long
getInDegree()
Blocking version ofgetInDegreeAsync()
.PgxFuture<java.lang.Long>
getInDegreeAsync()
Returns the inDegree of this vertex, i.e., the number of incoming edges of this vertex.java.util.Collection<PgxEdge>
getInEdges()
Blocking version ofgetInEdges()
.PgxFuture<java.util.Collection<PgxEdge>>
getInEdgesAsync()
Returns all incoming edges of this vertex.java.util.Collection<PgxVertex<ID>>
getInNeighbors()
Blocking version ofgetInNeighborsAsync()
.PgxFuture<java.util.Collection<PgxVertex<ID>>>
getInNeighborsAsync()
Returns all incoming neighbors of this vertex, i.e., all vertices that have an edge to this vertex.java.util.Set<java.lang.String>
getLabels()
Blocking version ofgetLabelsAsync()
.PgxFuture<java.util.Set<java.lang.String>>
getLabelsAsync()
Gets the labelsjava.util.Collection<PgxVertex<ID>>
getNeighbors(Direction direction)
Convenience method forgetNeighbors(Direction, boolean)
that keeps all duplicates.java.util.Collection<PgxVertex<ID>>
getNeighbors(Direction direction, boolean removeDuplicates)
Blocking version ofgetNeighborsAsync(Direction, boolean)
.PgxFuture<java.util.Collection<PgxVertex<ID>>>
getNeighborsAsync(Direction direction, boolean removeDuplicates)
Returns all neighbors of this vertex, i.e., all vertices that are connected to this vertex.long
getOutDegree()
Blocking version ofgetOutDegreeAsync()
.PgxFuture<java.lang.Long>
getOutDegreeAsync()
Returns the outDegree of this vertex, i.e., the number of outgoing edges of this vertex.java.util.Collection<PgxEdge>
getOutEdges()
Blocking version ofgetOutEdges()
.PgxFuture<java.util.Collection<PgxEdge>>
getOutEdgesAsync()
Returns all outgoing edges of this vertex.java.util.Collection<PgxVertex<ID>>
getOutNeighbors()
Blocking version ofgetOutNeighborsAsync()
.PgxFuture<java.util.Collection<PgxVertex<ID>>>
getOutNeighborsAsync()
Returns all outgoing neighbors of this vertex, i.e., all nodes this vertex has an edge to.-
Methods inherited from class oracle.pgx.api.PgxEntity
equals, getGraph, getId, getProperty, getPropertyAsync, getType, hashCode, serialize, setProperty, setPropertyAsync, toString
-
-
-
-
Method Detail
-
getLabelsAsync
public PgxFuture<java.util.Set<java.lang.String>> getLabelsAsync()
Gets the labels- Returns:
- the vertex labels.
- Throws:
java.lang.IllegalStateException
- if no labels exist.
-
getOutNeighbors
public java.util.Collection<PgxVertex<ID>> getOutNeighbors()
Blocking version ofgetOutNeighborsAsync()
. CallsgetOutNeighborsAsync()
and waits for returnedPgxFuture
to complete.
-
getInNeighbors
public java.util.Collection<PgxVertex<ID>> getInNeighbors()
Blocking version ofgetInNeighborsAsync()
. CallsgetInNeighborsAsync()
and waits for returnedPgxFuture
to complete.
-
getNeighbors
public java.util.Collection<PgxVertex<ID>> getNeighbors(Direction direction)
Convenience method forgetNeighbors(Direction, boolean)
that keeps all duplicates.
-
getNeighbors
public java.util.Collection<PgxVertex<ID>> getNeighbors(Direction direction, boolean removeDuplicates)
Blocking version ofgetNeighborsAsync(Direction, boolean)
. CallsgetNeighbors(Direction, boolean)
and waits for returnedPgxFuture
to complete.
-
getOutNeighborsAsync
public PgxFuture<java.util.Collection<PgxVertex<ID>>> getOutNeighborsAsync()
Returns all outgoing neighbors of this vertex, i.e., all nodes this vertex has an edge to. If the graph is a multi-graph and if the vertex has multiple edges to a vertex 'A', then 'A' will appear multiple times in the result, i.e., once per edge to 'A'. This method does not guarantee any ordering in the result. This method never returns null.
-
getInNeighborsAsync
public PgxFuture<java.util.Collection<PgxVertex<ID>>> getInNeighborsAsync()
Returns all incoming neighbors of this vertex, i.e., all vertices that have an edge to this vertex. If the graph is a multi-graph and if a vertex 'A' has multiple edges to this vertex, then 'A' will appear multiple times in the result, i.e. once per edge from 'A' to this vertex. This method does not guarantee any ordering in the result. This method never returns null.
-
getNeighborsAsync
public PgxFuture<java.util.Collection<PgxVertex<ID>>> getNeighborsAsync(Direction direction, boolean removeDuplicates)
Returns all neighbors of this vertex, i.e., all vertices that are connected to this vertex.- Parameters:
removeDuplicates
- If removeDuplicates is set to true, the resulting collection does not contain any duplicates. Otherwise, if this vertex is connected 'N' times to a vertex 'X', vertex 'X' also appears 'N' times in the results. This method does not guarantee any ordering in the result. This method never returns null.
-
getOutEdges
public java.util.Collection<PgxEdge> getOutEdges()
Blocking version ofgetOutEdges()
. CallsgetOutEdges()
and waits for the returnedPgxFuture
to complete.
-
getInEdges
public java.util.Collection<PgxEdge> getInEdges()
Blocking version ofgetInEdges()
. CallsgetInEdges()
and waits for the returnedPgxFuture
to complete.
-
getInDegree
public long getInDegree()
Blocking version ofgetInDegreeAsync()
. CallsgetInDegreeAsync()
and waits for the returnedPgxFuture
to complete.
-
getDegree
public long getDegree()
Convenience method that callsgetOutDegree()
.
-
getOutDegree
public long getOutDegree()
Blocking version ofgetOutDegreeAsync()
. CallsgetOutDegreeAsync()
and waits for the returnedPgxFuture
to complete.
-
getOutEdgesAsync
public PgxFuture<java.util.Collection<PgxEdge>> getOutEdgesAsync()
Returns all outgoing edges of this vertex. This method does not guarantee any ordering in the result. This method never returns null.
-
getInEdgesAsync
public PgxFuture<java.util.Collection<PgxEdge>> getInEdgesAsync()
Returns all incoming edges of this vertex. This method does not guarantee any ordering in the result. This method never returns null.
-
getInDegreeAsync
public PgxFuture<java.lang.Long> getInDegreeAsync()
Returns the inDegree of this vertex, i.e., the number of incoming edges of this vertex.
-
getOutDegreeAsync
public PgxFuture<java.lang.Long> getOutDegreeAsync()
Returns the outDegree of this vertex, i.e., the number of outgoing edges of this vertex.
-
getDegreeAsync
public PgxFuture<java.lang.Long> getDegreeAsync()
Returns the degree of this vertex by callinggetOutDegreeAsync()
.
-
getLabels
public java.util.Set<java.lang.String> getLabels()
Blocking version ofgetLabelsAsync()
. CallsgetLabelsAsync()
and waits for the returnedPgxFuture
to complete.
-
-