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.graph.impl.LabelableElementImpl Class Referenceabstract

This class is an abstract container containing a set of Label objects. More...

Inherits org.corpus_tools.salt.graph.LabelableElement, and Serializable.

Inherited by org.corpus_tools.salt.graph.impl.IdentifiableElementImpl, and org.corpus_tools.salt.graph.impl.LabelImpl.

Public Member Functions

 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()}
 

Static Public Attributes

static final int EXPECTED_NUMBER_OF_LABELS = 5
 Determines the expected number of labels. More...
 

Protected Member Functions

LabelableElement getDelegate ()
 Returns the delegate object. More...
 

Protected Attributes

LabelableElement delegate = null
 A delegate object of the same type. More...
 

Detailed Description

This class is an abstract container containing a set of Label objects.

Author
florian

Constructor & Destructor Documentation

org.corpus_tools.salt.graph.impl.LabelableElementImpl.LabelableElementImpl ( LabelableElement  delegatee)

Initializes a new object and sets an internal delegate.

This means, all method invocations are passed to the delegate.

Parameters
delegateeobject to pass method invocations to.

Member Function Documentation

void org.corpus_tools.salt.graph.impl.LabelableElementImpl.basicAddLabel ( Label  label)

This is an internally used method.

To implement a double chaining of LabelableElement and label object. When a label is inserted into this container and to avoid an endless invocation the insertion of a label is split into the two methods addLabel(Label) and basicAddLabel(Label). The invocation of methods is implement as follows:

addLabel(Label)                      Label#setContainer(LabelableElement)
        ||             \ /                   ||
        ||              X                    ||
        \/             / \                   \/
basicAddLabel(Label)            LabelImpl#basicSetLabelableElement(LabelableElement)

That means method addLabel(Label) calls basicAddLabel(Label) and Label#basicSetGraph(Graph). And method Label#setContainer(LabelableElement) calls basicAddLabel(Label) and LabelImpl#basicSetLabelableElement(LabelableElement).

Parameters
labellabel to be inserted
void org.corpus_tools.salt.graph.impl.LabelableElementImpl.basicRemoveLabel ( String  qName)

This is an internally used method.

To implement a double chaining of LabelableElement and label object. When a label is inserted into this container and to avoid an endless invocation the insertion of a label is split into the two methods removeLabel(String) and basicRemoveLabel(String). The invocation of methods is implement as follows:

removeLabel(String)                      Label#setContainer(LabelableElement)
        ||             \ /                   ||
        ||              X                    ||
        \/             / \                   \/
basicRemoveLabel(STring)            LabelImpl#basicSetLabelableElement(LabelableElement)

That means method removeLabel(String) calls basicRemoveLabel(String) and Label#basicSetGraph(Graph). And method Label#setContainer(LabelableElement) calls basicRemoveLabel(String) and LabelImpl#basicSetLabelableElement(LabelableElement).

Parameters
labellabel to be inserted
LabelableElement org.corpus_tools.salt.graph.impl.LabelableElementImpl.getDelegate ( )
protected

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.

Returns
the delegate object

Member Data Documentation

LabelableElement org.corpus_tools.salt.graph.impl.LabelableElementImpl.delegate = null
protected

A delegate object of the same type.

If delegate is not null, all functions of this method are delegated to the delegate object. Setting delegate makes this object to a container.

final int org.corpus_tools.salt.graph.impl.LabelableElementImpl.EXPECTED_NUMBER_OF_LABELS = 5
static

Determines the expected number of labels.