public interface TitanVertexQuery
extends com.tinkerpop.blueprints.VertexQuery
Query
by some Titan specific convenience methods. Using TitanQuery proceeds
in two steps: 1) Define the query by specifying what to retrieve and 2) execute the query.
TitanVertex.query()
on the vertex itself.Modifier and Type | Method and Description |
---|---|
long |
count()
Returns the number of edges that match this query
|
TitanVertexQuery |
direction(com.tinkerpop.blueprints.Direction d)
Query only for relations in the given direction.
|
Iterable<com.tinkerpop.blueprints.Edge> |
edges()
Returns an iterable over all incident edges that match this query
|
TitanVertexQuery |
group(TypeGroup group)
Query for only those relations having a type included in the given
TypeGroup . |
TitanVertexQuery |
has(String type,
Object value)
Query only for edges that have an incident property or unidirected edge matching the given value.
|
<T extends Comparable<T>> |
has(String s,
T t,
com.tinkerpop.blueprints.Query.Compare compare) |
TitanVertexQuery |
has(TitanKey key,
Object value)
Query only for edges that have an incident property matching the given value.
|
TitanVertexQuery |
has(TitanLabel label,
TitanVertex vertex)
Query only for edges that have a unidirected edge matching pointing to the given vertex
It is expected that this label is unidirected (
TitanLabel.isUnidirected()
and the query is restricted to edges having an incident unidirectional edge pointing to the given vertex. |
<T extends Comparable<T>> |
interval(String key,
T start,
T end)
Query for those edges that have an incident property whose values lies in the interval by [start,end).
|
<T extends Comparable<T>> |
interval(TitanKey key,
T start,
T end)
Query for those edges that have an incident property whose values lies in the interval by [start,end).
|
TitanVertexQuery |
keys(String... keys)
Query for only those properties having one of the given keys.
|
TitanVertexQuery |
labels(String... labels)
Query for only those edges matching one of the given labels.
|
TitanVertexQuery |
limit(long limit)
Sets the retrieval limit for this query.
|
Iterable<TitanProperty> |
properties()
Returns an iterable over all incident properties that match this query
|
long |
propertyCount()
Returns the number of properties that match this query
|
Iterable<TitanRelation> |
relations()
Returns an iterable over all incident relations that match this query
|
Iterable<TitanEdge> |
titanEdges() |
TitanVertexQuery |
types(TitanType... type)
Query for only those relations matching one of the given types.
|
VertexList |
vertexIds()
Retrieves all vertices connected to this query's central vertex by edges
matching the conditions defined in this query.
|
TitanVertexQuery types(TitanType... type)
type
- types to query forTitanVertexQuery labels(String... labels)
labels
in interface com.tinkerpop.blueprints.VertexQuery
labels
- edge labels to query forTitanVertexQuery keys(String... keys)
keys
- property keys to query forTitanVertexQuery group(TypeGroup group)
TypeGroup
.
This can be significantly more efficient than specifying all types explicitly.group
- group of types to restrict query to.TypeGroup
TitanVertexQuery direction(com.tinkerpop.blueprints.Direction d)
direction
in interface com.tinkerpop.blueprints.VertexQuery
d
- Direction to query forTitanVertexQuery has(TitanKey key, Object value)
key
- keyvalue
- Value for the property of the given key to matchTitanVertexQuery has(TitanLabel label, TitanVertex vertex)
TitanLabel.isUnidirected()
and the query is restricted to edges having an incident unidirectional edge pointing to the given vertex.label
- Labelvertex
- Vertex to point unidirectional edge toTitanVertexQuery has(String type, Object value)
TitanLabel.isUnidirected()
and the query is restricted to edges having an incident unidirectional edge pointing to the value which is
expected to be a TitanVertex
.has
in interface com.tinkerpop.blueprints.Query
has
in interface com.tinkerpop.blueprints.VertexQuery
type
- TitanType namevalue
- Value for the property of the given key to match, or vertex to point unidirectional edge to<T extends Comparable<T>> TitanVertexQuery has(String s, T t, com.tinkerpop.blueprints.Query.Compare compare)
has
in interface com.tinkerpop.blueprints.Query
has
in interface com.tinkerpop.blueprints.VertexQuery
<T extends Comparable<T>> TitanVertexQuery interval(String key, T start, T end)
interval
in interface com.tinkerpop.blueprints.Query
interval
in interface com.tinkerpop.blueprints.VertexQuery
key
- property keystart
- value defining the start of the interval (inclusive)end
- value defining the end of the interval (exclusive)<T extends Comparable<T>> TitanVertexQuery interval(TitanKey key, T start, T end)
key
- property keystart
- value defining the start of the interval (inclusive)end
- value defining the end of the interval (exclusive)TitanVertexQuery limit(long limit)
limit
in interface com.tinkerpop.blueprints.Query
limit
in interface com.tinkerpop.blueprints.VertexQuery
limit
- maximum number of relations to retrieve for this queryIterable<com.tinkerpop.blueprints.Edge> edges()
edges
in interface com.tinkerpop.blueprints.Query
Iterable<TitanProperty> properties()
Iterable<TitanRelation> relations()
long count()
count
in interface com.tinkerpop.blueprints.VertexQuery
long propertyCount()
VertexList vertexIds()
VertexList.sort()
to sort by vertex idAuthorities most efficiently.
The query engine will determine the most efficient way to retrieve the vertices that match this query.vertexIds
in interface com.tinkerpop.blueprints.VertexQuery
Copyright © 2012-2013. All Rights Reserved.