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
|
EXPECTED_NUMBER_OF_LABELS| Constructor and Description |
|---|
LayerImpl() |
| 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(Graph graph)
This is an internally used method.
|
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 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 layerpublic 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–2016 Humboldt-Universität zu Berlin, INRIA. All rights reserved.