public class RelationImpl<S extends Node,T extends Node> extends IdentifiableElementImpl implements Relation<S,T>
| Modifier and Type | Field and Description |
|---|---|
protected Graph |
graph
container graph
|
protected S |
source
source node of this relation.
|
delegate, EXPECTED_NUMBER_OF_LABELS| Constructor and Description |
|---|
RelationImpl()
Initializes an object of type
Relation. |
RelationImpl(Relation<S,T> delegate)
Initializes an object of type
Relation. |
| Modifier and Type | Method and Description |
|---|---|
void |
addLayer(Layer layer)
Adds this relation to the passed layer.
|
protected void |
basicSetGraph_WithoutRemoving(Graph graph)
Same as
basicSetGraph(Graph) but does not remove this relation
from old graph, if it was not equal to the passed graph. |
protected void |
basicSetGraph(Graph graph)
This is an internally used method.
|
Relation<S,T> |
getDelegate()
Returns the delegate object.
|
Graph |
getGraph()
Returns the container graph of this relation.
|
Set<? extends Layer> |
getLayers()
Returns all layers containing this relation.
|
S |
getSource()
Returns the source node of this relation object.
|
T |
getTarget()
Returns the target node of this relation object.
|
void |
removeLayer(Layer layer)
Removes this relation from the passed layer.
|
void |
setGraph(Graph graph)
Sets the container graph of this relation.
|
void |
setSource(S source)
Returns the source node of this relation object.
|
void |
setTarget(T target)
Sets the target node of this relation object.
|
getId, getIdentifier, removeLabel, setId, setIdentifier, toStringaddLabel, basicAddLabel, basicRemoveLabel, containsLabel, getLabel, getLabel, getLabels, getLabelsByNamespace, removeAll, removeLabel, sizeLabelsclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetId, getIdentifier, setId, setIdentifieraddLabel, containsLabel, getLabel, getLabel, getLabels, getLabelsByNamespace, removeAll, removeLabel, removeLabel, sizeLabelsprotected Graph graph
public RelationImpl()
Relation.public RelationImpl(Relation<S,T> delegate)
Relation. If LabelableElementImpl.delegate is
not null, all functions of this method are delegated to the delegate
object. Setting LabelableElementImpl.delegate makes this object to a container.a - delegate object of the same type.public Relation<S,T> getDelegate()
LabelableElementImpl.delegate is not null, all
functions of this method are delegated to the delegate object. Setting
LabelableElementImpl.delegate makes this object to a container.getDelegate in interface Relation<S extends Node,T extends Node>getDelegate in class IdentifiableElementImplpublic S getSource()
public void setSource(S source)
public T getTarget()
public void setTarget(T target)
public Graph getGraph()
public void setGraph(Graph graph)
Graph.getRelations() will return a list containing this relation.protected void basicSetGraph(Graph graph)
Graph and Relation object when an relation is inserted
into this graph and to avoid an endless invocation the insertion of an
relation is splited into the two methods setGraph(Graph) and
basicSetGraph(Graph). The invocation of methods is implement as
follows:
That means methodGraph.addRelation(Relation)Relation.setGraph(Graph)|| \ / || || X || \/ / \ \/Graph#basicAddRelation(Relation)Relation#basicSetGraph(Graph)
setGraph(Graph) calls
basicSetGraph(Graph) and
Graph#basicAddRelation(Relation). And method
setGraph(Graph) calls Graph#basicAddRelation(Relation)
and Relation#basicSetGraph(Graph).graph - graph which contains this relationprotected void basicSetGraph_WithoutRemoving(Graph graph)
basicSetGraph(Graph) but does not remove this relation
from old graph, if it was not equal to the passed graph.graph - public Set<? extends Layer> getLayers()
public void addLayer(Layer layer)
getLayers() retrieves all layers by accessing
the layers in graph, this class does not contain an own collection of
layers.public void removeLayer(Layer layer)
getLayers() retrieves all layers by accessing
the layers in graph, this class does not contain an own collection of
layers.Copyright © 2009–2019 Humboldt-Universität zu Berlin, INRIA. All rights reserved.