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 .
org.corpus_tools.salt.core.SAnnotationContainer Interface Reference

This interface defines a container to hold annotations (SAnnotation), meta-annotations (SMetaAnnotation), processing annotations ( SProcessingAnnotation) and features (SFeature). More...

Inherits org.corpus_tools.salt.graph.LabelableElement.

Inherited by org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl, org.corpus_tools.salt.core.SAbstractAnnotation, org.corpus_tools.salt.core.SGraph, org.corpus_tools.salt.core.SLayer, org.corpus_tools.salt.core.SNode, and org.corpus_tools.salt.core.SRelation< S extends SNode, T extends SNode >.

Public Member Functions

SAnnotation createAnnotation (String namespace, String name, Object value)
 Creates and returns an annotation having the passed namespace, name and value. More...
 
public< A extends SAnnotation > Set< A > createAnnotations (String annotationString)
 This method parses the given annotation String and adds an SAnnotation object for each annotation being contained in that string to the given SAnnotationContainer object. More...
 
public< A extends SAnnotation > Set< A > getAnnotations ()
 Returns all annotations contained by this object. More...
 
void addAnnotation (SAnnotation annotation)
 Adds the passed annotation to this container. More...
 
SAnnotation getAnnotation (String qName)
 Returns an annotation having the passed qualified name, if this container contains such an annotation. More...
 
SAnnotation getAnnotation (String namespace, String name)
 Returns an annotation having the passed qualified name, if this container contains such an annotation. More...
 
Iterator< SAnnotationiterator_SAnnotation ()
 Returns an iterator to iterate over the SAnnotation objects contained by this container. More...
 
SMetaAnnotation createMetaAnnotation (String namespace, String name, Object value)
 Creates and returns a meta annotation having the passed namespace, name and value. More...
 
public< A extends SMetaAnnotation > Set< A > createMetaAnnotations (String metaAnnotationString)
 This method parses the given meta annotation String and adds an SMetaAnnotation object for each meta annotation being contained in that string to the given SAnnotationContainer object. More...
 
public< A extends SMetaAnnotation > Set< A > getMetaAnnotations ()
 Returns all meta annotations contained by this object. More...
 
void addMetaAnnotation (SMetaAnnotation metaAnnotation)
 Adds the passed meta annotation to this container. More...
 
SMetaAnnotation getMetaAnnotation (String qName)
 Returns a meta annotation having the passed qualified name, if this container contains such a meta annotation. More...
 
Iterator< SMetaAnnotationiterator_SMetaAnnotation ()
 Returns an iterator to iterate over the SMetaAnnotation objects contained by this container. More...
 
SProcessingAnnotation createProcessingAnnotation (String namespace, String name, Object value)
 Creates and returns a processing-annotation having the passed namespace, name and value. More...
 
public< A extends SProcessingAnnotation > Set< A > createProcessingAnnotations (String annotationString)
 This method parses the given processing-annotation String and adds an SProcessingAnnotation object for each processing-annotation being contained in that string to the given SAnnotationContainer object. More...
 
public< A extends SProcessingAnnotation > Set< A > getProcessingAnnotations ()
 Returns all processing-annotations contained by this object. More...
 
void addProcessingAnnotation (SProcessingAnnotation processingAnnotation)
 Adds the passed processing-annotation to this container. More...
 
SProcessingAnnotation getProcessingAnnotation (String qName)
 Returns a processing-annotation having the passed qualified name, if this container contains such a processing-annotation. More...
 
Iterator< SProcessingAnnotationiterator_SProcessingAnnotation ()
 Returns an iterator to iterate over the SProcessingAnnotation objects contained by this container. More...
 
SFeature createFeature (String namespace, String name, Object value)
 Creates and returns an feature having the passed namespace, name and value. More...
 
public< A extends SFeature > Set< A > createFeatures (String featureString)
 This method parses the given feature String and adds an SFeature object for each feature being contained in that string to the given SAnnotationContainer object. More...
 
public< A extends SFeature > Set< A > getFeatures ()
 Returns all features contained by this object. More...
 
void addFeature (SFeature feature)
 Adds the passed feature to this container. More...
 
SFeature getFeature (String qName)
 Returns an feature having the passed qualified name, if this container contains such an feature. More...
 
SFeature getFeature (String namespace, String name)
 Returns an feature having the passed qualified name, if this container contains such an feature. More...
 
Iterator< SFeatureiterator_SFeature ()
 Returns an iterator to iterate over the SFeature objects contained by this container. More...
 
- Public Member Functions inherited from org.corpus_tools.salt.graph.LabelableElement
Collection< LabelgetLabels ()
 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< LabelgetLabelsByNamespace (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...
 

Detailed Description

This interface defines a container to hold annotations (SAnnotation), meta-annotations (SMetaAnnotation), processing annotations ( SProcessingAnnotation) and features (SFeature).

Author
florian

Member Function Documentation

◆ addAnnotation()

void org.corpus_tools.salt.core.SAnnotationContainer.addAnnotation ( SAnnotation  annotation)

◆ addFeature()

void org.corpus_tools.salt.core.SAnnotationContainer.addFeature ( SFeature  feature)

◆ addMetaAnnotation()

void org.corpus_tools.salt.core.SAnnotationContainer.addMetaAnnotation ( SMetaAnnotation  metaAnnotation)

◆ addProcessingAnnotation()

void org.corpus_tools.salt.core.SAnnotationContainer.addProcessingAnnotation ( SProcessingAnnotation  processingAnnotation)

◆ createAnnotation()

SAnnotation org.corpus_tools.salt.core.SAnnotationContainer.createAnnotation ( String  namespace,
String  name,
Object  value 
)

Creates and returns an annotation having the passed namespace, name and value.

Parameters
namespacenamespace of the annotation
namename of the annotation
valuevalue of the annotation
Returns
the created annotation

Implemented in org.corpus_tools.salt.core.impl.SGraphImpl, org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl, org.corpus_tools.salt.core.impl.SNodeImpl, org.corpus_tools.salt.core.impl.SRelationImpl< S extends SNode, T extends SNode >, and org.corpus_tools.salt.core.impl.SLayerImpl.

◆ createAnnotations()

public<A extends SAnnotation> Set<A> org.corpus_tools.salt.core.SAnnotationContainer.createAnnotations ( String  annotationString)

This method parses the given annotation String and adds an SAnnotation object for each annotation being contained in that string to the given SAnnotationContainer object.

The syntax for Annotations is:
(SNS::)?SNAME(=SVALUE)?(;SNS::SNAME=SVALUE)+
where SNS is the namespace of the annotation, SNAME is its name and SVALUE is the value of the annotation

Parameters
annotationStringString containing the annotations

Implemented in org.corpus_tools.salt.core.impl.SGraphImpl, org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl, org.corpus_tools.salt.core.impl.SNodeImpl, org.corpus_tools.salt.core.impl.SRelationImpl< S extends SNode, T extends SNode >, and org.corpus_tools.salt.core.impl.SLayerImpl.

◆ createFeature()

SFeature org.corpus_tools.salt.core.SAnnotationContainer.createFeature ( String  namespace,
String  name,
Object  value 
)

Creates and returns an feature having the passed namespace, name and value.

Parameters
namespacenamespace of the feature
namename of the feature
valuevalue of the feature
Returns
the created feature

Implemented in org.corpus_tools.salt.core.impl.SGraphImpl, org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl, org.corpus_tools.salt.core.impl.SNodeImpl, org.corpus_tools.salt.core.impl.SRelationImpl< S extends SNode, T extends SNode >, and org.corpus_tools.salt.core.impl.SLayerImpl.

◆ createFeatures()

public<A extends SFeature> Set<A> org.corpus_tools.salt.core.SAnnotationContainer.createFeatures ( String  featureString)

This method parses the given feature String and adds an SFeature object for each feature being contained in that string to the given SAnnotationContainer object.

The syntax for Features is:
(SNS::)?SNAME(=SVALUE)?(;SNS::SNAME=SVALUE)+
where SNS is the namespace of the feature, SNAME is its name and SVALUE is the value of the feature

Parameters
featureStringString containing the features

Implemented in org.corpus_tools.salt.core.impl.SGraphImpl, org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl, org.corpus_tools.salt.core.impl.SNodeImpl, org.corpus_tools.salt.core.impl.SRelationImpl< S extends SNode, T extends SNode >, and org.corpus_tools.salt.core.impl.SLayerImpl.

◆ createMetaAnnotation()

SMetaAnnotation org.corpus_tools.salt.core.SAnnotationContainer.createMetaAnnotation ( String  namespace,
String  name,
Object  value 
)

Creates and returns a meta annotation having the passed namespace, name and value.

Parameters
namespacenamespace of the meta annotation
namename of the meta annotation
valuevalue of the meta annotation
Returns
the created meta annotation

Implemented in org.corpus_tools.salt.core.impl.SGraphImpl, org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl, org.corpus_tools.salt.core.impl.SNodeImpl, org.corpus_tools.salt.core.impl.SRelationImpl< S extends SNode, T extends SNode >, and org.corpus_tools.salt.core.impl.SLayerImpl.

◆ createMetaAnnotations()

public<A extends SMetaAnnotation> Set<A> org.corpus_tools.salt.core.SAnnotationContainer.createMetaAnnotations ( String  metaAnnotationString)

This method parses the given meta annotation String and adds an SMetaAnnotation object for each meta annotation being contained in that string to the given SAnnotationContainer object.

The syntax for meta annotations is:
(SNS::)?SNAME(=SVALUE)?(;SNS::SNAME=SVALUE)+
where SNS is the namespace of the meta annotation, SNAME is its name and SVALUE is the value of the meta annotation

Parameters
metaAnnotationStringString containing the meta annotations

Implemented in org.corpus_tools.salt.core.impl.SGraphImpl, org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl, org.corpus_tools.salt.core.impl.SNodeImpl, org.corpus_tools.salt.core.impl.SRelationImpl< S extends SNode, T extends SNode >, and org.corpus_tools.salt.core.impl.SLayerImpl.

◆ createProcessingAnnotation()

SProcessingAnnotation org.corpus_tools.salt.core.SAnnotationContainer.createProcessingAnnotation ( String  namespace,
String  name,
Object  value 
)

Creates and returns a processing-annotation having the passed namespace, name and value.

Parameters
namespacenamespace of the processing-annotation
namename of the processing-annotation
valuevalue of the processing-annotation
Returns
the created processing-annotation

Implemented in org.corpus_tools.salt.core.impl.SGraphImpl, org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl, org.corpus_tools.salt.core.impl.SNodeImpl, org.corpus_tools.salt.core.impl.SRelationImpl< S extends SNode, T extends SNode >, and org.corpus_tools.salt.core.impl.SLayerImpl.

◆ createProcessingAnnotations()

public<A extends SProcessingAnnotation> Set<A> org.corpus_tools.salt.core.SAnnotationContainer.createProcessingAnnotations ( String  annotationString)

This method parses the given processing-annotation String and adds an SProcessingAnnotation object for each processing-annotation being contained in that string to the given SAnnotationContainer object.

The syntax for processing-annotations is:
(SNS::)?SNAME(=SVALUE)?(;SNS::SNAME=SVALUE)+
where SNS is the namespace of the processing-annotation, SNAME is its name and SVALUE is the value of the processing-annotation

Parameters
annotationStringString containing the processing-annotations

Implemented in org.corpus_tools.salt.core.impl.SGraphImpl, org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl, org.corpus_tools.salt.core.impl.SNodeImpl, org.corpus_tools.salt.core.impl.SRelationImpl< S extends SNode, T extends SNode >, and org.corpus_tools.salt.core.impl.SLayerImpl.

◆ getAnnotation() [1/2]

SAnnotation org.corpus_tools.salt.core.SAnnotationContainer.getAnnotation ( String  namespace,
String  name 
)

Returns an annotation having the passed qualified name, if this container contains such an annotation.

Parameters
namespacethe namespace of the annotation.
namethe name of the annotation.
Returns
an annotation having the qualified name, if such an annotation exists, null otherwise

Implemented in org.corpus_tools.salt.core.impl.SGraphImpl, org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl, org.corpus_tools.salt.core.impl.SNodeImpl, org.corpus_tools.salt.core.impl.SRelationImpl< S extends SNode, T extends SNode >, and org.corpus_tools.salt.core.impl.SLayerImpl.

◆ getAnnotation() [2/2]

SAnnotation org.corpus_tools.salt.core.SAnnotationContainer.getAnnotation ( String  qName)

Returns an annotation having the passed qualified name, if this container contains such an annotation.

Parameters
qNamethe qualified of the annotation. A qualified name consists of: namespace+'::'+name
Returns
an annotation having the qualified name, if such an annotation exists, null otherwise

Implemented in org.corpus_tools.salt.core.impl.SGraphImpl, org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl, org.corpus_tools.salt.core.impl.SNodeImpl, org.corpus_tools.salt.core.impl.SRelationImpl< S extends SNode, T extends SNode >, and org.corpus_tools.salt.core.impl.SLayerImpl.

◆ getAnnotations()

public<A extends SAnnotation> Set<A> org.corpus_tools.salt.core.SAnnotationContainer.getAnnotations ( )

Returns all annotations contained by this object.

Attention: This method is slow, since it iterates over all contained labels and creates a new list of all SAnnotation objects. Use iterator_SAnnotation() instead.

Returns
a list of all annotations

◆ getFeature() [1/2]

SFeature org.corpus_tools.salt.core.SAnnotationContainer.getFeature ( String  namespace,
String  name 
)

Returns an feature having the passed qualified name, if this container contains such an feature.

Parameters
namespacethe namespace of the feature.
namethe name of the feature.
Returns
an feature having the qualified name, if such an feature exists, null otherwise

Implemented in org.corpus_tools.salt.core.impl.SGraphImpl, org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl, org.corpus_tools.salt.core.impl.SNodeImpl, org.corpus_tools.salt.core.impl.SRelationImpl< S extends SNode, T extends SNode >, and org.corpus_tools.salt.core.impl.SLayerImpl.

◆ getFeature() [2/2]

SFeature org.corpus_tools.salt.core.SAnnotationContainer.getFeature ( String  qName)

Returns an feature having the passed qualified name, if this container contains such an feature.

Parameters
qNamethe qualified of the feature. A qualified name consists of: namespace+'::'+name
Returns
an feature having the qualified name, if such an feature exists, null otherwise

Implemented in org.corpus_tools.salt.core.impl.SGraphImpl, org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl, org.corpus_tools.salt.core.impl.SNodeImpl, org.corpus_tools.salt.core.impl.SRelationImpl< S extends SNode, T extends SNode >, and org.corpus_tools.salt.core.impl.SLayerImpl.

◆ getFeatures()

public<A extends SFeature> Set<A> org.corpus_tools.salt.core.SAnnotationContainer.getFeatures ( )

Returns all features contained by this object.

Attention: This method is slow, since it iterates over all contained labels and creates a new list of all SFeature objects. Use iterator_SFeature() instead.

Returns
a list of all features

◆ getMetaAnnotation()

SMetaAnnotation org.corpus_tools.salt.core.SAnnotationContainer.getMetaAnnotation ( String  qName)

Returns a meta annotation having the passed qualified name, if this container contains such a meta annotation.

Parameters
qNamethe qualified of the meta annotation. A qualified name consists of: namespace+'::'+name
Returns
a meta annotation having the qualified name, if such a meta annotation exists, null otherwise

Implemented in org.corpus_tools.salt.core.impl.SGraphImpl, org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl, org.corpus_tools.salt.core.impl.SNodeImpl, org.corpus_tools.salt.core.impl.SRelationImpl< S extends SNode, T extends SNode >, and org.corpus_tools.salt.core.impl.SLayerImpl.

◆ getMetaAnnotations()

public<A extends SMetaAnnotation> Set<A> org.corpus_tools.salt.core.SAnnotationContainer.getMetaAnnotations ( )

Returns all meta annotations contained by this object.

Attention: This method is slow, since it iterates over all contained labels and creates a new list of all SAnnotation objects. Use iterator_SAnnotation() instead.

Returns
a list of all meta annotations

◆ getProcessingAnnotation()

SProcessingAnnotation org.corpus_tools.salt.core.SAnnotationContainer.getProcessingAnnotation ( String  qName)

Returns a processing-annotation having the passed qualified name, if this container contains such a processing-annotation.

Parameters
qNamethe qualified of the processing-annotation. A qualified name consists of: namespace+'::'+name
Returns
an processing-annotation having the qualified name, if such an processing-annotation exists, null otherwise

Implemented in org.corpus_tools.salt.core.impl.SGraphImpl, org.corpus_tools.salt.core.impl.SAbstractAnnotationImpl, org.corpus_tools.salt.core.impl.SNodeImpl, org.corpus_tools.salt.core.impl.SRelationImpl< S extends SNode, T extends SNode >, and org.corpus_tools.salt.core.impl.SLayerImpl.

◆ getProcessingAnnotations()

public<A extends SProcessingAnnotation> Set<A> org.corpus_tools.salt.core.SAnnotationContainer.getProcessingAnnotations ( )

Returns all processing-annotations contained by this object.

Attention: This method is slow, since it iterates over all contained labels and creates a new list of all SProcessingAnnotation objects. Use iterator_SProcessingAnnotation() instead.

Returns
a list of all processing-annotations

◆ iterator_SAnnotation()

Iterator<SAnnotation> org.corpus_tools.salt.core.SAnnotationContainer.iterator_SAnnotation ( )

◆ iterator_SFeature()

Iterator<SFeature> org.corpus_tools.salt.core.SAnnotationContainer.iterator_SFeature ( )

◆ iterator_SMetaAnnotation()

Iterator<SMetaAnnotation> org.corpus_tools.salt.core.SAnnotationContainer.iterator_SMetaAnnotation ( )

◆ iterator_SProcessingAnnotation()

Iterator<SProcessingAnnotation> org.corpus_tools.salt.core.SAnnotationContainer.iterator_SProcessingAnnotation ( )