Salt
3.4.2
A powerful, tagset-independent and theory-neutral meta model and API for storing, manipulating, and representing nearly all types of linguistic data .
|
The here defined graph is given by G=(V, E, L, {label a , ...label b }) with: More...
Inherits org.corpus_tools.salt.graph.IdentifiableElement.
Inherited by org.corpus_tools.salt.core.SGraph, org.corpus_tools.salt.extensions.notification.graph.impl.GraphNotifierImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >, and org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
Public Member Functions | |
IndexMgr | getIndexMgr () |
Returns the index manager. More... | |
List< R > | getRelations () |
Returns a list of all relations contained in this graph. More... | |
R | getRelation (String relationId) |
Returns an relation corresponding to the passed id, if such an relation is contained in the graph. More... | |
List< R > | getRelations (String sourceNodeId, String targetNodeId) |
Returns all relations,which connects the two passed nodes. More... | |
List< R > | getInRelations (String nodeId) |
Returns all relations, which have the node corresponding to the passed id as their target node. More... | |
List< R > | getOutRelations (String nodeId) |
Returns all relations, which have the node corresponding to the passed id as their source node. 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. | |
boolean | containsRelation (String relationId) |
Returns whether this graph contains an Relation corresponding to the passed id. More... | |
List< N > | getNodes () |
Returns a list of all relations contained in this graph. More... | |
N | getNode (String nodeId) |
Returns a node corresponding to the passed id, if such a node is contained in the graph. More... | |
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... | |
boolean | containsNode (String nodeId) |
Returns whether this graph contains a Node corresponding to the passed id. More... | |
L | getLayer (String layerId) |
Returns a layer corresponding to the passed id, if such a layer is contained in the graph. More... | |
Set< L > | getLayers () |
Returns a set of layers contained by this graph. More... | |
void | addLayer (L layer) |
Adds the passed layer to this graph. More... | |
boolean | containsLayer (String layerId) |
Returns whether this graph contains a Layer corresponding to the passed id. 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.IdentifiableElement | |
String | getId () |
Returns the id of this object, which is the value of the contained Identifier object. More... | |
void | setId (String id) |
Creates a new Identifier object and sets its value to the passed id. More... | |
Identifier | getIdentifier () |
Returns the Identifier label for this object. More... | |
void | setIdentifier (Identifier identifier) |
Sets the Identifier label for this object. More... | |
Public Member Functions inherited from org.corpus_tools.salt.graph.LabelableElement | |
Collection< Label > | getLabels () |
Returns all labels being contained by this object. More... | |
void | addLabel (Label label) |
Adds the given Label object to the list of labels. More... | |
Label | getLabel (String namespace, String name) |
Returns a label having the passed namespace and name, if such a label is contained by this object. More... | |
Label | getLabel (String qName) |
Returns a label having the passed qualified name. More... | |
void | removeLabel (String qName) |
Removes the label having the passed qName. More... | |
void | removeLabel (String namespace, String name) |
Removes a Label object from the list of labels of this object. More... | |
void | removeAll () |
Removes all Label objects. | |
Set< Label > | getLabelsByNamespace (String namespace) |
Returns a set containing all Label objects having the given namespace. More... | |
boolean | containsLabel (String qName) |
Checks if this object has a Label object in its list having the given qualified name. More... | |
Integer | sizeLabels () |
returns the number of Label objects contained by this object. More... | |
The here defined graph is given by G=(V, E, L, {label a , ...label b }) with:
void org.corpus_tools.salt.graph.Graph< 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 |
Implemented in org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >, and org.corpus_tools.salt.extensions.notification.graph.impl.GraphNotifierImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
void org.corpus_tools.salt.graph.Graph< 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 |
Implemented in org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >, and org.corpus_tools.salt.extensions.notification.graph.impl.GraphNotifierImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
void org.corpus_tools.salt.graph.Graph< 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 |
Implemented in org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >, and org.corpus_tools.salt.extensions.notification.graph.impl.GraphNotifierImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
boolean org.corpus_tools.salt.graph.Graph< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.containsLayer | ( | String | layerId | ) |
Returns whether this graph contains a Layer corresponding to the passed id.
layerId | id of the node to be checked |
Implemented in org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
boolean org.corpus_tools.salt.graph.Graph< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.containsNode | ( | String | nodeId | ) |
Returns whether this graph contains a Node corresponding to the passed id.
nodeId | id of the node to be checked |
Implemented in org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
boolean org.corpus_tools.salt.graph.Graph< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.containsRelation | ( | String | relationId | ) |
Returns whether this graph contains an Relation corresponding to the passed id.
relationId | id of the node to be checked |
Implemented in org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
IndexMgr org.corpus_tools.salt.graph.Graph< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.getIndexMgr | ( | ) |
Returns the index manager.
The index manager is used to register indexes for sets of nodes, relations, layers etc. or single values. The manager contains all indexes used by the Graph class. These indexes are:
Even further indexes can be added to the index manager.
Implemented in org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
List<R> org.corpus_tools.salt.graph.Graph< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.getInRelations | ( | String | nodeId | ) |
Returns all relations, which have the node corresponding to the passed id as their target node.
nodeId | id corresponding to the node, for which all incoming relations should be searched |
Implemented in org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
L org.corpus_tools.salt.graph.Graph< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.getLayer | ( | String | layerId | ) |
Returns a layer corresponding to the passed id, if such a layer is contained in the graph.
layerId | id of the layer to be searched for |
Implemented in org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
Set<L> org.corpus_tools.salt.graph.Graph< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.getLayers | ( | ) |
Returns a set of layers contained by this graph.
Implemented in org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
N org.corpus_tools.salt.graph.Graph< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.getNode | ( | String | nodeId | ) |
Returns a node corresponding to the passed id, if such a node is contained in the graph.
nodeId | id of the node to be searched for |
Implemented in org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
List<N> org.corpus_tools.salt.graph.Graph< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.getNodes | ( | ) |
Returns a list of all relations contained in this graph.
Implemented in org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
List<R> org.corpus_tools.salt.graph.Graph< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.getOutRelations | ( | String | nodeId | ) |
Returns all relations, which have the node corresponding to the passed id as their source node.
nodeId | id corresponding to the node, for which all outgoing relations should be searched |
Implemented in org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
R org.corpus_tools.salt.graph.Graph< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.getRelation | ( | String | relationId | ) |
Returns an relation corresponding to the passed id, if such an relation is contained in the graph.
relationId | id of the relation to be searched for |
Implemented in org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
List<R> org.corpus_tools.salt.graph.Graph< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.getRelations | ( | ) |
Returns a list of all relations contained in this graph.
Implemented in org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
List<R> org.corpus_tools.salt.graph.Graph< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.getRelations | ( | String | sourceNodeId, |
String | targetNodeId | ||
) |
Returns all relations,which connects the two passed nodes.
sourceNodeId | the id of the source node |
targetNodeId | the id of the target node |
Implemented in org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
void org.corpus_tools.salt.graph.Graph< 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 |
Implemented in org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >, and org.corpus_tools.salt.extensions.notification.graph.impl.GraphNotifierImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
void org.corpus_tools.salt.graph.Graph< 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 |
Implemented in org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >, and org.corpus_tools.salt.extensions.notification.graph.impl.GraphNotifierImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.
void org.corpus_tools.salt.graph.Graph< 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 |
Implemented in org.corpus_tools.salt.extensions.notification.graph.impl.GraphNotifierImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >, and org.corpus_tools.salt.graph.impl.GraphImpl< N extends Node, R extends Relation< N, N, L extends Layer< N, R >.