public class LayerImpl<N extends Node,R extends Relation<N,N>> extends IdentifiableElementImpl implements Layer<N,R>
| Modifier and Type | Field and Description |
|---|---|
protected Graph |
graph
container graph
|
delegate, EXPECTED_NUMBER_OF_LABELS| Constructor and Description |
|---|
LayerImpl() |
LayerImpl(Layer<N,R> delegate)
Initializes an object of type
Layer. |
| Modifier and Type | Method and Description |
|---|---|
void |
addNode(N node)
Adds the passed node to this layer.
|
void |
addRelation(Relation<? extends N,? extends N> relation)
Adds the passed relation to this layer.
|
protected void |
basicSetGraph_WithoutRemoving(Graph graph)
Same as
basicSetGraph(Graph) but does not remove this layer from
old graph, if it was not equal to the passed graph. |
protected void |
basicSetGraph(Graph graph)
This is an internally used method.
|
protected Layer<N,R> |
getDelegate()
Returns the delegate object.
|
Graph |
getGraph()
Returns the container graph of this node.
|
Set<N> |
getNodes()
Returns a set of all contained nodes, in the order how the nodes were
inserted.
|
Set<R> |
getRelations()
Returns a set of all contained relations, in the order how the relations
were inserted.
|
void |
removeNode(N node)
Removes the passed node from this layer.
|
void |
removeRelation(Relation<? extends N,? extends N> relation)
Removes the passed relation from this layer.
|
void |
setGraph(Graph graph)
Sets the container graph of this node.
|
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 LayerImpl()
public LayerImpl(Layer<N,R> delegate)
Layer. 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.protected Layer<N,R> getDelegate()
IdentifiableElementImplLabelableElementImpl.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 class IdentifiableElementImplpublic Graph getGraph()
public void setGraph(Graph graph)
protected void basicSetGraph(Graph graph)
Graph and Layer object when an layer is inserted into
this graph and to avoid an endless invocation the insertion of an layer
is splited into the two methods setGraph(Graph) and
basicSetGraph(Graph). The invocation of methods is implement as
follows:
That means methodGraph.addLayer(Layer)Layer.setGraph(Graph)|| \ / || || X || \/ / \ \/Graph#basicAddLayer(Layer)Layer#basicSetGraph(Graph)
setGraph(Graph) calls
basicSetGraph(Graph) and Graph#basicAddLayer(Layer). And
method setGraph(Graph) calls Graph#basicAddLayer(Layer)
and Layer#basicSetGraph(Graph).graph - graph which contains this layerprotected void basicSetGraph_WithoutRemoving(Graph graph)
basicSetGraph(Graph) but does not remove this layer from
old graph, if it was not equal to the passed graph.graph - public Set<N> getNodes()
public void addNode(N node)
public void removeNode(N node)
public Set<R> getRelations()
public void addRelation(Relation<? extends N,? extends N> relation)
Copyright © 2009–2020 Humboldt-Universität zu Berlin, INRIA. All rights reserved.