Salt
3.3.6-SNAPSHOT
A powerful, tagset-independent and theory-neutral meta model and API for storing, manipulating, and representing nearly all types of linguistic data .
|
Inherits org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >, org.corpus_tools.salt.graph.Graph< N extends Node, R extends Relation< N, N, L extends Layer< N, R >, and org.corpus_tools.salt.extensions.notification.graph.Notifier.
Public Member Functions | |||||
List< Listener > | getListener () | ||||
Returns an unmodifiable list of all listeners.If no listener is registered null is returned.
| |||||
synchronized void | addListener (Listener listener) | ||||
Adds a new listener, which then will be notified about a change in this object.
| |||||
void | addListener (Collection< Listener > listener) | ||||
Adds a set of new listener, which then will be notified about a change in this object.
| |||||
synchronized void | removeListener (Listener listener) | ||||
Removes a listener, which won't be notified about a change in this object anymore.
| |||||
void | addLabel (Label label) | ||||
Adds the given Label object to the list of labels.
| |||||
void | removeLabel (String qName) | ||||
Removes the label having the passed qName.
| |||||
void | removeAll () | ||||
Removes all Label objects. Notifies all registered listeners. | |||||
void | addNode (N node) | ||||
Adds the passed node to this graph and updates indexes. More... | |||||
void | removeNode (N node) | ||||
Removes the passed node from this graph and cleans all indexes. More... | |||||
void | addRelation (Relation<?extends N,?extends N > relation) | ||||
Adds the passed relation to this graph and updates indexes. More... | |||||
void | removeRelation (Relation<?extends N,?extends N > relation) | ||||
Removes the passed relation from this graph. More... | |||||
void | removeRelations () | ||||
Removes all relations from this graph and cleans all indexes. | |||||
void | addLayer (L layer) | ||||
Adds the passed layer to this graph. More... | |||||
void | removeLayer (L layer) | ||||
Removes the passed layer from this graph and cleans all indexes. More... | |||||
Public Member Functions inherited from org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R > | |||||
GraphImpl (Graph< N, R, L > delegate) | |||||
Initializes an object of type Graph. More... | |||||
IndexMgr | getIndexMgr () | ||||
Returns the index manager. More... | |||||
GraphImpl (int expectedNodes, int expectedRelations) | |||||
Instantiates a new graph object and sets the initial capacity for all indexes to the passed ones. More... | |||||
List< N > | getNodes () | ||||
{ Graph::getNodes()} | |||||
N | getNode (String nodeId) | ||||
{ Graph::getNode(String)} | |||||
void | addNode (N node) | ||||
{ Graph::addNode(Node)} | |||||
void | removeNode (N node) | ||||
{ Graph::removeNode(Node)} | |||||
boolean | containsNode (String nodeId) | ||||
{ Graph::containsNode(String)} | |||||
List< R > | getRelations () | ||||
{ Graph::getRelations()} | |||||
R | getRelation (String relationId) | ||||
{ Graph::getRelation(String)} | |||||
List< R > | getRelations (String sourceNodeId, String targetNodeId) | ||||
Returns all relations,which connects the two passed nodes.
| |||||
List< R > | getInRelations (String nodeId) | ||||
Returns all relations, which have the node corresponding to the passed id as their target node.
| |||||
List< R > | getOutRelations (String nodeId) | ||||
Returns all relations, which have the node corresponding to the passed id as their source node.
| |||||
void | addRelation (Relation<?extends N,?extends N > relation) | ||||
{ Graph::addRelation(Relation)} | |||||
void | removeRelation (Relation<?extends N,?extends N > rel) | ||||
Removes the passed relation from this graph.If a relation is removed, it will be deleted from all indexes. If the passed relation is null, nothing is removed.
| |||||
void | removeRelations () | ||||
Removes all relations from this graph and cleans all indexes. | |||||
boolean | containsRelation (String relationId) | ||||
{ Graph::containsRelation(String)} | |||||
Set< L > | getLayers () | ||||
Returns a set of layers contained by this graph.
| |||||
L | getLayer (String layerId) | ||||
Returns a layer corresponding to the passed id, if such a layer is contained in the graph.
| |||||
boolean | containsLayer (String layerId) | ||||
{ Graph::containsLayer(String)} | |||||
void | addLayer (L layer) | ||||
Adds the passed layer to this graph.If layer is null or layer is already contained nothing is inserted. The passed layer and this graph will be double chained, which means the method Layer#getGraph() will return this graph. If the passed layer contains nodes or relations, which are not already contained by the graph, they will be added.
| |||||
void | removeLayer (L layer) | ||||
Removes the passed layer from this graph and cleans all indexes.It also ensures, that the graph is removed from the layer, thus invoking Layer#getGraph() will return null. The double chaining between this graph and the passed layer will be cut off. If the passed layer is null nothing happens.
| |||||
Public Member Functions inherited from org.corpus_tools.salt.graph.impl.IdentifiableElementImpl | |||||
IdentifiableElementImpl (IdentifiableElement delegate) | |||||
Identifier | getIdentifier () | ||||
{ IdentifiableElement::getIdentifier()} | |||||
void | setIdentifier (Identifier identifier) | ||||
{ IdentifiableElement::setIdentifier(Identifier)} | |||||
void | removeLabel (String qName) | ||||
Removes the label having the passed qName.
| |||||
String | getId () | ||||
{ IdentifiableElement::getId()} | |||||
void | setId (String id) | ||||
{ IdentifiableElement::setId(String)} | |||||
String | toString () | ||||
Public Member Functions inherited from org.corpus_tools.salt.graph.impl.LabelableElementImpl | |||||
LabelableElementImpl (LabelableElement delegatee) | |||||
Initializes a new object and sets an internal delegate. More... | |||||
Collection< Label > | getLabels () | ||||
{ LabelableElement::getLabels()} | |||||
Label | getLabel (String qName) | ||||
{ LabelableElement::getLabel(String)} | |||||
Label | getLabel (String namespace, String name) | ||||
{ LabelableElement::getLabel(String, String)} | |||||
Set< Label > | getLabelsByNamespace (String namespace) | ||||
{ LabelableElement::getLabelsByNamespace(String)} | |||||
void | addLabel (Label label) | ||||
Adds the given Label object to the list of labels.
| |||||
void | basicAddLabel (Label label) | ||||
This is an internally used method. More... | |||||
void | removeLabel (String qName) | ||||
{ LabelableElement::removeLabel(String)} | |||||
void | basicRemoveLabel (String qName) | ||||
This is an internally used method. More... | |||||
void | removeLabel (String namespace, String name) | ||||
{ LabelableElement::removeLabel(String, String))} | |||||
void | removeAll () | ||||
{ LabelableElement::removeAll()} | |||||
boolean | containsLabel (String qName) | ||||
{ LabelableElement::containsLabel(String)} | |||||
Integer | sizeLabels () | ||||
{ LabelableElement::sizeLabels()} | |||||
Protected Attributes | |
List< Listener > | listenerList = null |
Protected Attributes inherited from org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R > | |
IndexMgr | indexMgr = null |
Index manager. | |
int | expectedNodes = 16 |
Number of expected nodes to initialize indexes. | |
int | expectedRelations = 16 |
Number of expected relations to initialize indexes. | |
int | approximatedNodeDegree = expectedRelations / expectedNodes |
Approximated node degree, which is expectedRelations / expectedNodes. | |
Protected Attributes inherited from org.corpus_tools.salt.graph.impl.LabelableElementImpl | |
LabelableElement | delegate = null |
A delegate object of the same type. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from org.corpus_tools.salt.graph.impl.LabelableElementImpl | |
static final int | EXPECTED_NUMBER_OF_LABELS = 5 |
Determines the expected number of labels. More... | |
Protected Member Functions inherited from org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R > | |
Graph< N, R, L > | getDelegate () |
void | init () |
Initializes an object of type GraphImpl. More... | |
void | basicAddNode (N node) |
This is an internally used method. More... | |
void | basicRemoveNode (N node) |
This is an internally used method. More... | |
void | basicAddRelation (Relation<?extends Node,?extends Node > relation) |
This is an internally used method. More... | |
void | update (Object oldValue, Object container, UPDATE_TYPE updateType) throws SaltException |
Updates all graph internal indexes, concerning the kind of the update which has been made. More... | |
void | basicRemoveRelation (Relation<?extends N,?extends N > rel) |
This is an internally used method. More... | |
void | basicAddLayer (L layer) |
This is an internally used method. More... | |
void | basicRemoveLayer (L layer) |
This is an internally used method. More... | |
Protected Member Functions inherited from org.corpus_tools.salt.graph.impl.IdentifiableElementImpl | |
IdentifiableElement | getDelegate () |
Protected Member Functions inherited from org.corpus_tools.salt.graph.impl.LabelableElementImpl | |
LabelableElement | getDelegate () |
Returns the delegate object. More... | |
void org.corpus_tools.salt.extensions.notification.graph.impl.GraphNotifierImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.addLayer | ( | L | layer | ) |
Adds the passed layer to this graph.
If layer is null or layer is already contained nothing is inserted. The passed layer and this graph will be double chained, which means the method Layer#getGraph() will return this graph. If the passed layer contains nodes or relations, which are not already contained by the graph, they will be added.
layer | layer to be inserted |
Implements org.corpus_tools.salt.graph.Graph< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
void org.corpus_tools.salt.extensions.notification.graph.impl.GraphNotifierImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.addNode | ( | N | node | ) |
Adds the passed node to this graph and updates indexes.
If node is null or node is already contained nothing is inserted. The passed node and this graph will be double chained, which means the method Node#getGraph() will return this graph.
node | node to be inserted |
Implements org.corpus_tools.salt.graph.Graph< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
void org.corpus_tools.salt.extensions.notification.graph.impl.GraphNotifierImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.addRelation | ( | Relation<?extends N,?extends N > | relation | ) |
Adds the passed relation to this graph and updates indexes.
If relation is null or relation is already contained nothing is inserted. The passed relation and this graph will be double chained, which means the method Relation#getGraph() will return this graph.
relation | relation to be inserted |
Implements org.corpus_tools.salt.graph.Graph< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
void org.corpus_tools.salt.extensions.notification.graph.impl.GraphNotifierImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.removeLayer | ( | L | layer | ) |
Removes the passed layer from this graph and cleans all indexes.
It also ensures, that the graph is removed from the layer, thus invoking Layer#getGraph() will return null. The double chaining between this graph and the passed layer will be cut off. If the passed layer is null nothing happens.
layer | the layer to be removed |
Implements org.corpus_tools.salt.graph.Graph< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
void org.corpus_tools.salt.extensions.notification.graph.impl.GraphNotifierImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.removeNode | ( | N | node | ) |
Removes the passed node from this graph and cleans all indexes.
It also ensures, that the graph is removed from the node, thus invoking Node#getGraph() will return null. The double chaining between this graph and the passed node will be cut off. If the passed node is null nothing is done.
node | the node to be removed |
Implements org.corpus_tools.salt.graph.Graph< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
void org.corpus_tools.salt.extensions.notification.graph.impl.GraphNotifierImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.removeRelation | ( | Relation<?extends N,?extends N > | relation | ) |
Removes the passed relation from this graph.
If a relation is removed, it will be deleted from all indexes. If the passed relation is null, nothing is removed.
relation | relation to be removed |
Implements org.corpus_tools.salt.graph.Graph< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.