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 .
org.corpus_tools.salt.extensions.notification.graph.impl.RelationNotifierImpl< S extends Node, T extends Node > Class Template Reference

Inherits org.corpus_tools.salt.graph.impl.RelationImpl< S extends Node, T extends Node >, org.corpus_tools.salt.graph.Relation< S extends Node, T extends Node >, and org.corpus_tools.salt.extensions.notification.graph.Notifier.

Public Member Functions

List< ListenergetListener ()
 Returns an unmodifiable list of all listeners.If no listener is registered null is returned.
Returns
all registered listeners

 
synchronized void addListener (Listener listener)
 Adds a new listener, which then will be notified about a change in this object.
Parameters
listenerto be notified

 
void addListener (Collection< Listener > listener)
 Adds a set of new listener, which then will be notified about a change in this object.
Parameters
listenerto be notified

 
synchronized void removeListener (Listener listener)
 Removes a listener, which won't be notified about a change in this object anymore.
Parameters
listenerto be notified

 
void addLabel (Label label)
 Adds the given Label object to the list of labels.
Parameters
labelthe Label object to be added
Notifies all registered listeners.
 
void removeLabel (String qName)
 Removes the label having the passed qName.
Parameters
qNamequalified name of the Label to be removed
Notifies all registered listeners.
 
void removeAll ()
 Removes all Label objects. Notifies all registered listeners.
 
void setSource (S source)
 Returns the source node of this relation object. More...
 
void setTarget (T target)
 Sets the target node of this relation object. More...
 
- Public Member Functions inherited from org.corpus_tools.salt.graph.impl.RelationImpl< S extends Node, T extends Node >
 RelationImpl ()
 Initializes an object of type Relation.
 
 RelationImpl (Relation< S, T > delegate)
 Initializes an object of type Relation. More...
 
Relation< S, T > getDelegate ()
 { Relation::getDelegate()}
 
getSource ()
 { Relation::getSource()}
 
void setSource (S source)
 { Relation::setSource(Node)} Notifies the graph, about the change of the source.
 
getTarget ()
 { Relation::getTarget()}
 
void setTarget (T target)
 { Relation::setTarget(Node)} Notifies the graph, about the change of the target.
 
Graph getGraph ()
 { Relation::getGraph()}
 
void setGraph (Graph graph)
 { Relation::setGraph(Graph)}
 
Set<?extends LayergetLayers ()
 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.
Returns
a set of layers containing this relation

 
void 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.
Parameters
layerto which this node should be added

Since the method getLayers() retrieves all layers by accessing the layers in graph, this class does not contain an own collection of layers.
 
void removeLayer (Layer layer)
 Removes this relation from the passed layer.
Parameters
layerfrom which this node should be removed

Since the method getLayers() retrieves all layers by accessing the layers in graph, this class does not contain an own collection of layers.
 
- 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.
Parameters
qNamequalified name of the Label to be removed
In case the passed qualified name is equal to SaltUtil#LABEL_ID_QNAME the internal reference to identifier is set to null.
 
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< LabelgetLabels ()
 { LabelableElement::getLabels()}
 
Label getLabel (String qName)
 { LabelableElement::getLabel(String)}
 
Label getLabel (String namespace, String name)
 { LabelableElement::getLabel(String, String)}
 
Set< LabelgetLabelsByNamespace (String namespace)
 { LabelableElement::getLabelsByNamespace(String)}
 
void addLabel (Label label)
 Adds the given Label object to the list of labels.
Parameters
labelthe Label object to be added

 
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< ListenerlistenerList = null
 
- Protected Attributes inherited from org.corpus_tools.salt.graph.impl.RelationImpl< S extends Node, T extends Node >
source = null
 source node of this relation. More...
 
Graph graph = null
 container graph
 
- 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.RelationImpl< S extends Node, T extends Node >
void basicSetGraph (Graph graph)
 This is an internally used method. More...
 
void basicSetGraph_WithoutRemoving (Graph graph)
 Same as basicSetGraph(Graph) but does not remove this relation from old graph, if it was not equal to the passed graph. 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...
 

Member Function Documentation

void org.corpus_tools.salt.extensions.notification.graph.impl.RelationNotifierImpl< S extends Node, T extends Node >.setSource ( source)

Returns the source node of this relation object.

If this relation belongs to a graph, the graph's indexes will be updated automatically.

Parameters
sourcesource node

Implements org.corpus_tools.salt.graph.Relation< S extends Node, T extends Node >.

void org.corpus_tools.salt.extensions.notification.graph.impl.RelationNotifierImpl< S extends Node, T extends Node >.setTarget ( target)

Sets the target node of this relation object.

If this relation belongs to a graph, the graph's indexes will be updated automatically.

Parameters
targettarget node

Implements org.corpus_tools.salt.graph.Relation< S extends Node, T extends Node >.