@ParametersAreNonnullByDefault public class ElementVertex extends IdVertex<ModelGraph>
Vertex representing an element that can have a meta-class and a container.| Modifier and Type | Field and Description |
|---|---|
protected static String |
DELIMITER
The delimiter used to separate the property name and its value in a composed property.
|
protected static String |
PROPERTY_SIZE
The property key used to define the number of edges with a specific label.
|
propertyBasedgraphbase| Modifier and Type | Method and Description |
|---|---|
static ElementVertex |
from(com.tinkerpop.blueprints.Vertex baseVertex,
ModelGraph graph)
Retrieves the
ElementVertex that wraps the baseVertex, or creates a new instance on it. |
Optional<ClassVertex> |
getClassVertex()
Returns the meta-class vertex.
|
Optional<ContainingEdge> |
getContainingEdge()
Returns the containing edge.
|
Id |
getElementId()
Returns the converted identifier of this element vertex.
|
Object |
getId() |
Optional<ElementVertex> |
getReference(FeatureBean feature)
Returns the reference of the
feature. |
Optional<ElementVertex> |
getReference(FeatureBean feature,
int position)
Returns the reference of the
feature at the defined position. |
Iterable<ElementEdge> |
getReferenceEdges(FeatureBean feature)
Returns all references of the
feature. |
Iterable<ElementEdge> |
getReferenceEdges(FeatureBean feature,
int startPosition,
int endPosition)
Returns all references of the
feature between the startPosition and the endPosition. |
int |
getSize(FeatureBean feature)
Returns the size of the
feature. |
<V> Optional<V> |
getValue(FeatureBean feature)
Returns the value of the
feature. |
<V> Optional<V> |
getValue(FeatureBean feature,
int position)
Returns the value of the
feature at the defined position. |
<V> Iterable<V> |
getValues(FeatureBean feature)
Returns all values of the
feature. |
void |
moveValue(FeatureBean feature,
int sourceIndex,
int targetIndex)
Moves the current value of the specified
feature from the sourceIndex to the targetIndex. |
ElementVertexQuery |
query() |
void |
removeContainingEdge()
Removes the containing edge.
|
void |
removeReferences(FeatureBean feature)
Removes the current reference of the
feature. |
void |
removeValue(FeatureBean feature)
Removes the current value of the
feature. |
void |
removeValue(FeatureBean feature,
int position)
Removes the current value of the
feature at the defined position. |
Optional<ElementVertex> |
replaceReference(FeatureBean feature,
int position,
Id reference)
Replaces the current reference of the
feature at the defined position. |
<V> Optional<V> |
replaceValue(FeatureBean feature,
int position,
V value)
Replaces the current value of the
feature at the defined position. |
boolean |
setClassVertex(ClassBean bean)
Defines the meta-class vertex from the specified
bean. |
void |
setContainingEdge(SingleFeatureBean bean)
Defines the containing edge from the specified
bean. |
Optional<ElementVertex> |
setReference(FeatureBean feature,
Id reference)
Replaces the current reference of the
feature by the specified reference. |
void |
setReference(FeatureBean feature,
int position,
Id reference)
Defines the current reference of the
feature at the defined position. |
void |
setSize(FeatureBean feature,
int size)
Defines the
size of the feature. |
<V> void |
setValue(FeatureBean feature,
int position,
V value)
Defines the current value of the
feature at the defined position. |
<V> Optional<V> |
setValue(FeatureBean feature,
V value)
Replaces the current value of the
feature by the specified value. |
addEdge, addEdge, getEdge, getEdge, getEdges, getEdges, getVertex, getVertex, getVertices, getVertices, remove, toStringequals, getProperty, getPropertyKeys, hashCode, removeProperty, setPropertygetBaseElementprotected static final String DELIMITER
format(FeatureBean, Object),
Constant Field Valuesprotected static final String PROPERTY_SIZE
@Nonnull public static ElementVertex from(com.tinkerpop.blueprints.Vertex baseVertex, ModelGraph graph)
ElementVertex that wraps the baseVertex, or creates a new instance on it.baseVertex - the base vertexgraph - the graph that owns this vertex@Nonnull public Object getId()
getId in interface com.tinkerpop.blueprints.ElementgetId in class IdElement<com.tinkerpop.blueprints.Vertex,ModelGraph>@Nonnull public Id getElementId()
@Nonnull public ElementVertexQuery query()
query in interface com.tinkerpop.blueprints.Vertexquery in class IdVertex<ModelGraph>@Nonnull public Optional<ClassVertex> getClassVertex()
Optional containing the meta-class vertexpublic boolean setClassVertex(ClassBean bean)
bean. If the meta-class is already defined, then this
method does nothing.bean - the simple representation of the meta-class vertextrue if the meta-class has been defined for this vertex, false if the meta-class was
already defined@Nonnull public Optional<ContainingEdge> getContainingEdge()
Optional containing the containing edgepublic void setContainingEdge(SingleFeatureBean bean)
bean.bean - the simple representation of the containing edgepublic void removeContainingEdge()
@Nonnegative public int getSize(FeatureBean feature)
feature.feature - the featurepublic void setSize(FeatureBean feature, @Nonnegative int size)
size of the feature.feature - the featuresize - the new size@Nonnull public <V> Optional<V> getValue(FeatureBean feature)
feature.V - the type of the valuefeature - the featureOptional containing the value@Nonnull public <V> Optional<V> setValue(FeatureBean feature, V value)
feature by the specified value.V - the type of the valuefeature - the featurevalue - the new valueOptional containing the replaced valuepublic void removeValue(FeatureBean feature)
feature.feature - the feature@Nonnull public <V> Optional<V> getValue(FeatureBean feature, @Nonnegative int position)
feature at the defined position.V - the type of the valuefeature - the featureposition - the position of the valueOptional containing the value@Nonnull public <V> Iterable<V> getValues(FeatureBean feature)
feature.V - the type of the valuesfeature - the featurepublic <V> void setValue(FeatureBean feature, @Nonnegative int position, V value)
feature at the defined position.V - the type of the valuefeature - the featureposition - the position of the valuevalue - the new value@Nonnull public <V> Optional<V> replaceValue(FeatureBean feature, @Nonnegative int position, V value)
feature at the defined position. If the current value does not
exist, then the new value is not defined and this method does nothing.V - the type of the valuefeature - the featureposition - the position of the valuevalue - the new valueOptional containing the replaced valuepublic void moveValue(FeatureBean feature, @Nonnegative int sourceIndex, @Nonnegative int targetIndex)
feature from the sourceIndex to the targetIndex.feature - the featuresourceIndex - the current position of the value to movetargetIndex - the new position of the valuepublic void removeValue(FeatureBean feature, @Nonnegative int position)
feature at the defined position.feature - the featureposition - the position of the value@Nonnull public Optional<ElementVertex> getReference(FeatureBean feature)
feature.feature - the featureOptional containing the referenced vertex@Nonnull public Optional<ElementVertex> setReference(FeatureBean feature, Id reference)
feature by the specified reference.feature - the featurereference - the new referenceOptional containing the replaced referenced vertexpublic void removeReferences(FeatureBean feature)
feature.feature - the feature@Nonnull public Optional<ElementVertex> getReference(FeatureBean feature, @Nonnegative int position)
feature at the defined position.feature - the featureposition - the position of the referenceOptional containing the referenced vertex@Nonnull public Iterable<ElementEdge> getReferenceEdges(FeatureBean feature)
feature.feature - the feature@Nonnull public Iterable<ElementEdge> getReferenceEdges(FeatureBean feature, int startPosition, int endPosition)
feature between the startPosition and the endPosition.feature - the featurestartPosition - the start positionendPosition - the end positionElementVertexQuery.hasPositionBetween(int, int)public void setReference(FeatureBean feature, @Nonnegative int position, Id reference)
feature at the defined position.feature - the featureposition - the position of the referencereference - the new reference@Nonnull public Optional<ElementVertex> replaceReference(FeatureBean feature, @Nonnegative int position, Id reference)
feature at the defined position. If the current reference
does not exist, then the new reference is not defined and this method does nothing.feature - the featureposition - the position of the referencereference - the new referenceOptional containing the replaced referenceCopyright © 2013–2019 Atlanmod. All rights reserved.