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 .
|
In graph theory an relation is a relation between two nodes, often an relation is realized as a pair of nodes. More...
Inherits org.corpus_tools.salt.graph.IdentifiableElement.
Inherited by org.corpus_tools.salt.core.SRelation< S extends SNode, T extends SNode >, org.corpus_tools.salt.extensions.notification.graph.impl.RelationNotifierImpl< S extends Node, T extends Node >, and org.corpus_tools.salt.graph.impl.RelationImpl< S extends Node, T extends Node >.
Public Member Functions | |
Relation< S, T > | getDelegate () |
Returns the delegate object. More... | |
S | getSource () |
Returns the source node of this relation object. More... | |
void | setSource (S source) |
Returns the source node of this relation object. More... | |
T | getTarget () |
Returns the target node of this relation object. More... | |
void | setTarget (T target) |
Sets the target node of this relation object. More... | |
Graph | getGraph () |
Returns the container graph of this relation. More... | |
void | setGraph (Graph graph) |
Sets the container graph of this relation. More... | |
Set<? extends Layer > | getLayers () |
Returns all layers containing this relation. More... | |
void | addLayer (Layer layer) |
Adds this relation to the passed layer. More... | |
void | removeLayer (Layer layer) |
Removes this relation from the passed layer. 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... | |
In graph theory an relation is a relation between two nodes, often an relation is realized as a pair of nodes.
This interface defines a directed and labeled relation. A directed relation is a not symmetric relation. For instance if an relation relates a node a with a node b, it is not the case for the way around. A labeled relation is an relation, which can contain labels as defined in Label. An relation always belong to 0..1 Graphs and can also be contained in one or more Layer s.
<S> | source node of the relation |
<T> | target node of the relation |
void org.corpus_tools.salt.graph.Relation< S extends Node, T extends Node >.addLayer | ( | Layer | layer | ) |
Adds this relation to the passed layer.
If this relation is not already contained in the layer's graph, it will be added to the graph.
layer | to which this node should be added |
Implemented in org.corpus_tools.salt.graph.impl.RelationImpl< S extends Node, T extends Node >.
Relation<S, T> org.corpus_tools.salt.graph.Relation< S extends Node, T extends Node >.getDelegate | ( | ) |
Returns the delegate object.
If delegate is not null, all functions of this method are delegated to the delegate object. Setting delegate makes this object to a container.
Implemented in org.corpus_tools.salt.graph.impl.RelationImpl< S extends Node, T extends Node >.
Graph org.corpus_tools.salt.graph.Relation< S extends Node, T extends Node >.getGraph | ( | ) |
Returns the container graph of this relation.
Implemented in org.corpus_tools.salt.graph.impl.RelationImpl< S extends Node, T extends Node >, org.corpus_tools.salt.common.impl.SOrderRelationImpl, org.corpus_tools.salt.common.impl.SDominanceRelationImpl, org.corpus_tools.salt.common.impl.SPointingRelationImpl, and org.corpus_tools.salt.common.impl.SSpanningRelationImpl.
Set<? extends Layer> org.corpus_tools.salt.graph.Relation< S extends Node, T extends Node >.getLayers | ( | ) |
Returns all layers containing this relation.
This is a computed set and only works, when this relation is contained in a graph. If this list is used multiple times, it makes sense to store that set.
Implemented in org.corpus_tools.salt.core.impl.SRelationImpl< S extends SNode, T extends SNode >, org.corpus_tools.salt.graph.impl.RelationImpl< S extends Node, T extends Node >, and org.corpus_tools.salt.core.SRelation< S extends SNode, T extends SNode >.
S org.corpus_tools.salt.graph.Relation< S extends Node, T extends Node >.getSource | ( | ) |
Returns the source node of this relation object.
Implemented in org.corpus_tools.salt.graph.impl.RelationImpl< S extends Node, T extends Node >.
T org.corpus_tools.salt.graph.Relation< S extends Node, T extends Node >.getTarget | ( | ) |
Returns the target node of this relation object.
Implemented in org.corpus_tools.salt.graph.impl.RelationImpl< S extends Node, T extends Node >.
void org.corpus_tools.salt.graph.Relation< S extends Node, T extends Node >.removeLayer | ( | Layer | layer | ) |
Removes this relation from the passed layer.
layer | from which this node should be removed |
Implemented in org.corpus_tools.salt.graph.impl.RelationImpl< S extends Node, T extends Node >.
void org.corpus_tools.salt.graph.Relation< S extends Node, T extends Node >.setGraph | ( | Graph | graph | ) |
Sets the container graph of this relation.
graph | object which contains this relation. Sets the container graph of this relation. The passed graph and this relation will be double chained, which means the method Graph#getRelations() will return a list containing this relation. |
graph | graph which contains this relation |
Implemented in org.corpus_tools.salt.graph.impl.RelationImpl< S extends Node, T extends Node >.
void org.corpus_tools.salt.graph.Relation< S extends Node, T extends Node >.setSource | ( | S | source | ) |
Returns the source node of this relation object.
If this relation belongs to a graph, the graph's indexes will be updated automatically.
source | source node |
Implemented in org.corpus_tools.salt.extensions.notification.graph.impl.RelationNotifierImpl< S extends Node, T extends Node >, and org.corpus_tools.salt.graph.impl.RelationImpl< S extends Node, T extends Node >.
void org.corpus_tools.salt.graph.Relation< S extends Node, T extends Node >.setTarget | ( | T | target | ) |
Sets the target node of this relation object.
If this relation belongs to a graph, the graph's indexes will be updated automatically.
target | target node |
Implemented in org.corpus_tools.salt.extensions.notification.graph.impl.RelationNotifierImpl< S extends Node, T extends Node >, and org.corpus_tools.salt.graph.impl.RelationImpl< S extends Node, T extends Node >.