FramedGraph
, WrappedFramedGraph<G>
, AutoCloseable
, org.apache.tinkerpop.gremlin.structure.util.wrapped.WrappedGraph<G>
public class DelegatingFramedGraph<G extends org.apache.tinkerpop.gremlin.structure.Graph> extends Object implements WrappedFramedGraph<G>
Constructor | Description |
---|---|
DelegatingFramedGraph(G delegate) |
Construct an untyped framed graph without annotation support
|
DelegatingFramedGraph(G delegate,
boolean typeResolution,
boolean annotationsSupported) |
Construct a framed graph with the specified typeResolution and annotation support
|
DelegatingFramedGraph(G delegate,
boolean typeResolution,
Collection<? extends Class<?>> types) |
Construct an framed graph with the specified type resolution and with annotation support
|
DelegatingFramedGraph(G delegate,
FrameFactory builder,
TypeResolver defaultResolver) |
Construct a framed graph.
|
DelegatingFramedGraph(G delegate,
ReflectionCache reflections,
boolean typeResolution,
boolean annotationsSupported) |
Construct a framed graph with the specified typeResolution and annotation support
|
DelegatingFramedGraph(G delegate,
TypeResolver defaultResolver) |
Construct a framed graph without annotation support.
|
DelegatingFramedGraph(G delegate,
String modelPackage) |
Construct a Typed framed graph with the specified type resolution and with annotation support
|
DelegatingFramedGraph(G delegate,
Collection<? extends Class<?>> types) |
Construct a Typed framed graph with the specified type resolution and with annotation support
|
Modifier and Type | Method | Description |
---|---|---|
TEdge |
addFramedEdge(VertexFrame source,
VertexFrame destination,
String label) |
Add a edge to the graph using a frame type of
TEdge . |
<T> T |
addFramedEdge(VertexFrame source,
VertexFrame destination,
String label,
ClassInitializer<T> initializer,
Object... keyValues) |
Add a edge to the graph
|
<T> T |
addFramedEdge(VertexFrame source,
VertexFrame destination,
String label,
Class<T> kind) |
Add a edge to the graph
|
TEdge |
addFramedEdgeExplicit(VertexFrame source,
VertexFrame destination,
String label) |
Add a edge to the graph using a frame type of
TEdge . |
<T> T |
addFramedEdgeExplicit(VertexFrame source,
VertexFrame destination,
String label,
ClassInitializer<T> initializer) |
Add a edge to the graph
This will bypass the default type resolution and use the untyped resolver
instead.
|
<T> T |
addFramedEdgeExplicit(VertexFrame source,
VertexFrame destination,
String label,
Class<T> kind) |
Add a edge to the graph
This will bypass the default type resolution and use the untyped resolver
instead.
|
TVertex |
addFramedVertex() |
Add a vertex to the graph using a frame type of
TVertex . |
<T> T |
addFramedVertex(ClassInitializer<T> initializer,
Object... keyValues) |
Add a vertex to the graph
|
<T> T |
addFramedVertex(Class<T> kind) |
Add a vertex to the graph
|
TVertex |
addFramedVertexExplicit() |
Add a vertex to the graph using a frame type of
TVertex . |
<T> T |
addFramedVertexExplicit(ClassInitializer<T> initializer) |
Add a vertex to the graph
This will bypass the default type resolution and use the untyped resolver
instead.
|
<T> T |
addFramedVertexExplicit(Class<T> kind) |
Add a vertex to the graph
This will bypass the default type resolution and use the untyped resolver
instead.
|
void |
close() |
Close the delegate graph.
|
<T> Iterator<? extends T> |
frame(Iterator<? extends org.apache.tinkerpop.gremlin.structure.Element> pipeline,
Class<T> kind) |
|
<T> T |
frameElement(org.apache.tinkerpop.gremlin.structure.Element e,
Class<T> kind) |
|
<T> T |
frameElementExplicit(org.apache.tinkerpop.gremlin.structure.Element e,
Class<T> kind) |
|
<T> Iterator<? extends T> |
frameExplicit(Iterator<? extends org.apache.tinkerpop.gremlin.structure.Element> pipeline,
Class<T> kind) |
|
<T> T |
frameNewElement(org.apache.tinkerpop.gremlin.structure.Element e,
ClassInitializer<T> initializer) |
|
<T> T |
frameNewElement(org.apache.tinkerpop.gremlin.structure.Element e,
Class<T> kind) |
|
<T> T |
frameNewElementExplicit(org.apache.tinkerpop.gremlin.structure.Element e,
ClassInitializer<T> initializer) |
|
<T> T |
frameNewElementExplicit(org.apache.tinkerpop.gremlin.structure.Element e,
Class<T> kind) |
|
G |
getBaseGraph() |
|
FrameFactory |
getBuilder() |
|
<T> Iterator<? extends T> |
getFramedEdges(Class<T> kind) |
|
<T> Iterator<? extends T> |
getFramedEdges(String key,
Object value,
Class<T> kind) |
|
<T> Iterator<? extends T> |
getFramedEdgesExplicit(Class<T> kind) |
|
<T> Iterator<? extends T> |
getFramedEdgesExplicit(String key,
Object value,
Class<T> kind) |
|
<T> T |
getFramedVertex(Class<T> kind,
Object id) |
|
<T> T |
getFramedVertexExplicit(Class<T> kind,
Object id) |
|
<T> Iterator<? extends T> |
getFramedVertices(Class<T> kind) |
|
<T> Iterator<? extends T> |
getFramedVertices(String key,
Object value,
Class<T> kind) |
|
<T> Iterator<? extends T> |
getFramedVerticesExplicit(Class<T> kind) |
|
<T> Iterator<? extends T> |
getFramedVerticesExplicit(String key,
Object value,
Class<T> kind) |
|
org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource |
getRawTraversal() |
|
TypeResolver |
getTypeResolver() |
|
<T extends Traversable<?,?>> |
traverse(Function<org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource,org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<?,?>> traverser) |
|
WrappedTransaction |
tx() |
public DelegatingFramedGraph(G delegate, FrameFactory builder, TypeResolver defaultResolver)
delegate
- The graph to wrap.builder
- The builder that will construct frames.defaultResolver
- The type defaultResolver that will decide the final frame type.public DelegatingFramedGraph(G delegate)
delegate
- The graph to wrap.public DelegatingFramedGraph(G delegate, TypeResolver defaultResolver)
delegate
- The graph to wrap.defaultResolver
- The type defaultResolver that will decide the final frame type.public DelegatingFramedGraph(G delegate, boolean typeResolution, boolean annotationsSupported)
delegate
- The graph to wrap.typeResolution
- True if type resolution is to be automatically handled by default, false causes explicit typing byannotationsSupported
- True if annotated classes will be supported, false otherwise.public DelegatingFramedGraph(G delegate, ReflectionCache reflections, boolean typeResolution, boolean annotationsSupported)
delegate
- The graph to wrap.reflections
- A RefelctionCache used to determine reflection and hierarchy of classes.typeResolution
- True if type resolution is to be automatically handled by default, false causes explicit typing byannotationsSupported
- True if annotated classes will be supported, false otherwise.public DelegatingFramedGraph(G delegate, Collection<? extends Class<?>> types)
delegate
- The graph to wrap.types
- The types to be consider for type resolution.public DelegatingFramedGraph(G delegate, String modelPackage)
delegate
- The graph to wrap.modelPackage
- The package scanned for classes to be considered for type resolution.public DelegatingFramedGraph(G delegate, boolean typeResolution, Collection<? extends Class<?>> types)
delegate
- The graph to wrap.typeResolution
- True if type resolution is to be automatically handled by default, false causes explicit typing by
default.types
- The types to be consider for type resolution.public G getBaseGraph()
getBaseGraph
in interface org.apache.tinkerpop.gremlin.structure.util.wrapped.WrappedGraph<G extends org.apache.tinkerpop.gremlin.structure.Graph>
public FrameFactory getBuilder()
getBuilder
in interface FramedGraph
public void close() throws IOException
close
in interface AutoCloseable
close
in interface FramedGraph
IOException
- Whenever an IO problem prevents the stream from closing.public <T> T frameElement(org.apache.tinkerpop.gremlin.structure.Element e, Class<T> kind)
frameElement
in interface FramedGraph
public <T> T frameNewElement(org.apache.tinkerpop.gremlin.structure.Element e, ClassInitializer<T> initializer)
frameNewElement
in interface FramedGraph
public <T> T frameNewElement(org.apache.tinkerpop.gremlin.structure.Element e, Class<T> kind)
frameNewElement
in interface FramedGraph
public <T> Iterator<? extends T> frame(Iterator<? extends org.apache.tinkerpop.gremlin.structure.Element> pipeline, Class<T> kind)
frame
in interface FramedGraph
public <T> T frameElementExplicit(org.apache.tinkerpop.gremlin.structure.Element e, Class<T> kind)
frameElementExplicit
in interface FramedGraph
public <T> T frameNewElementExplicit(org.apache.tinkerpop.gremlin.structure.Element e, ClassInitializer<T> initializer)
frameNewElementExplicit
in interface FramedGraph
public <T> T frameNewElementExplicit(org.apache.tinkerpop.gremlin.structure.Element e, Class<T> kind)
frameNewElementExplicit
in interface FramedGraph
public <T> Iterator<? extends T> frameExplicit(Iterator<? extends org.apache.tinkerpop.gremlin.structure.Element> pipeline, Class<T> kind)
frameExplicit
in interface FramedGraph
public <T> T addFramedVertex(ClassInitializer<T> initializer, Object... keyValues)
FramedGraph
addFramedVertex
in interface FramedGraph
T
- The type used to frame the element.initializer
- the initializer for the frame which defines its type and may initialize propertieskeyValues
- the recommended object identifierpublic <T> T addFramedVertex(Class<T> kind)
FramedGraph
addFramedVertex
in interface FramedGraph
T
- The type used to frame the element.kind
- The kind of the frame.public <T> T addFramedVertexExplicit(ClassInitializer<T> initializer)
FramedGraph
addFramedVertexExplicit
in interface FramedGraph
T
- The type used to frame the element.initializer
- the initializer for the frame which defines its type and may initialize propertiespublic <T> T addFramedVertexExplicit(Class<T> kind)
FramedGraph
addFramedVertexExplicit
in interface FramedGraph
T
- The type used to frame the element.kind
- The kind of the frame.public TVertex addFramedVertex()
FramedGraph
TVertex
.addFramedVertex
in interface FramedGraph
public TVertex addFramedVertexExplicit()
FramedGraph
TVertex
.
This will bypass the default type resolution and use the untyped resolver
instead. This method is useful for speeding up a look up when type resolution
isn't required.addFramedVertexExplicit
in interface FramedGraph
public <T> T addFramedEdge(VertexFrame source, VertexFrame destination, String label, ClassInitializer<T> initializer, Object... keyValues)
FramedGraph
addFramedEdge
in interface FramedGraph
T
- The type used to frame the element.source
- the source vertexdestination
- the destination vertexlabel
- the label.initializer
- the initializer for the frame which defines its type and may initialize propertieskeyValues
- the recommended object identifierpublic <T> T addFramedEdge(VertexFrame source, VertexFrame destination, String label, Class<T> kind)
FramedGraph
addFramedEdge
in interface FramedGraph
T
- The type used to frame the element.source
- The source vertexdestination
- the destination vertexlabel
- the label.kind
- The kind of the frame.public <T> T addFramedEdgeExplicit(VertexFrame source, VertexFrame destination, String label, ClassInitializer<T> initializer)
FramedGraph
addFramedEdgeExplicit
in interface FramedGraph
T
- The type used to frame the element.source
- The source vertexdestination
- the destination vertexlabel
- the label.initializer
- the initializer for the frame which defines its type and may initialize propertiespublic <T> T addFramedEdgeExplicit(VertexFrame source, VertexFrame destination, String label, Class<T> kind)
FramedGraph
addFramedEdgeExplicit
in interface FramedGraph
T
- The type used to frame the element.source
- The source vertexdestination
- the destination vertexlabel
- the label.kind
- The kind of the frame.public TEdge addFramedEdge(VertexFrame source, VertexFrame destination, String label)
FramedGraph
TEdge
.addFramedEdge
in interface FramedGraph
source
- The source vertexdestination
- the destination vertexlabel
- the label.public TEdge addFramedEdgeExplicit(VertexFrame source, VertexFrame destination, String label)
FramedGraph
TEdge
.
This will bypass the default type resolution and use the untyped resolver
instead. This method is useful for speeding up a look up when type resolution
isn't required.addFramedEdgeExplicit
in interface FramedGraph
source
- The source vertexdestination
- the destination vertexlabel
- the label.public <T extends Traversable<?,?>> T traverse(Function<org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource,org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversal<?,?>> traverser)
traverse
in interface FramedGraph
public org.apache.tinkerpop.gremlin.process.traversal.dsl.graph.GraphTraversalSource getRawTraversal()
getRawTraversal
in interface FramedGraph
public <T> T getFramedVertex(Class<T> kind, Object id)
getFramedVertex
in interface FramedGraph
public <T> T getFramedVertexExplicit(Class<T> kind, Object id)
getFramedVertexExplicit
in interface FramedGraph
public <T> Iterator<? extends T> getFramedVertices(Class<T> kind)
getFramedVertices
in interface FramedGraph
public <T> Iterator<? extends T> getFramedVertices(String key, Object value, Class<T> kind)
getFramedVertices
in interface FramedGraph
public <T> Iterator<? extends T> getFramedVerticesExplicit(Class<T> kind)
getFramedVerticesExplicit
in interface FramedGraph
public <T> Iterator<? extends T> getFramedVerticesExplicit(String key, Object value, Class<T> kind)
getFramedVerticesExplicit
in interface FramedGraph
public <T> Iterator<? extends T> getFramedEdges(Class<T> kind)
getFramedEdges
in interface FramedGraph
public <T> Iterator<? extends T> getFramedEdges(String key, Object value, Class<T> kind)
getFramedEdges
in interface FramedGraph
public <T> Iterator<? extends T> getFramedEdgesExplicit(Class<T> kind)
getFramedEdgesExplicit
in interface FramedGraph
public <T> Iterator<? extends T> getFramedEdgesExplicit(String key, Object value, Class<T> kind)
getFramedEdgesExplicit
in interface FramedGraph
public TypeResolver getTypeResolver()
getTypeResolver
in interface FramedGraph
public WrappedTransaction tx()
tx
in interface FramedGraph
Copyright © 2018 Syncleus. All rights reserved.