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 .
|
Inherits org.corpus_tools.salt.core.impl.SNodeImpl, and org.corpus_tools.salt.common.SDocument.
Public Member Functions | |||||||
SDocumentImpl () | |||||||
Initializes an object of type SLayerImpl. More... | |||||||
SDocumentImpl (Node delegate) | |||||||
Initializes an object of type SLayerImpl. More... | |||||||
SDocumentGraph | getDocumentGraph () | ||||||
Returns the document structure which belongs to this document.
| |||||||
SDocumentGraph | createDocumentGraph () | ||||||
Returns the document structure which belongs to this document. More... | |||||||
void | setDocumentGraph (final SDocumentGraph documentGraph) | ||||||
void | basic_setDocumentGraph (SDocumentGraph documentGraph) | ||||||
This is an internally used method. More... | |||||||
void | setId (String id) | ||||||
Creates a new Identifier object and sets its value to the passed id.
| |||||||
void | setIdentifier (Identifier identifier) | ||||||
Sets the Identifier label for this object.If this object alredy had an identifier, the old one is removed and the new one is added.
| |||||||
URI | getDocumentGraphLocation () | ||||||
Returns the location of the contained SDocumentGraph object, in case it is persisted.The location is stored via a SFeature object having the namespace { SaltFactory::NAMESPACE_SALT} and the name { SFEATURE_NAME::SDOCUMENT_GRAPH_LOCATION}.
| |||||||
void | setDocumentGraphLocation (URI location) | ||||||
Sets the location as URI, of where the contained SDocumentGraph object is persisted.The location is stored as SFeature having the namespace { SaltFactory::NAMESPACE_SALT} and the name { SFEATURE_NAME::SDOCUMENT_GRAPH_LOCATION}.
| |||||||
void | saveDocumentGraph (URI documentGraphLocation) | ||||||
Persists the SDocumentGraph object contained by this object as SaltXML file at the location given by the passed URI object.The URI is stored as SFeature by calling setSDocumentGraphLocation(URI). The relation between SDocument and given SDocumentGraph will be removed.
| |||||||
void | loadDocumentGraph () | ||||||
Loads a SDocumentGraph object and sets it to the contained SDocumentGraph object.The location of where to find the SaltXML containing the SDocumentGraph object must be given as SFeature. It will be read via calling getSDocumentGraphLocation(). After loading, the feature accessible via getSDocumentGraphLocation() will be removed. | |||||||
void | loadDocumentGraph (URI documentGraphLocation) | ||||||
Loads a SDocumentGraph object and sets it to the contained SDocumentGraph object.The location of where to find the SaltXML containing the SDocumentGraph object is given by the passed URI object. After loading, the feature accessible via getSDocumentGraphLocation() if exist will be removed.
| |||||||
String | toString () | ||||||
SCorpusGraph | getGraph () | ||||||
Returns the container graph of this node.
| |||||||
Public Member Functions inherited from org.corpus_tools.salt.core.impl.SNodeImpl | |||||||
SNodeImpl () | |||||||
Initializes an object of type SNodeImpl. More... | |||||||
SNodeImpl (Node delegate) | |||||||
Initializes an object of type SNodeImpl. More... | |||||||
List< SRelation > | getOutRelations () | ||||||
{ SNode::getOutgoingSRelations()} | |||||||
List< SRelation > | getInRelations () | ||||||
{ SNode::getIncomingSRelations()} | |||||||
Set< SLayer > | getLayers () | ||||||
Returns all layers containing this node. More... | |||||||
SAnnotation | createAnnotation (String namespace, String name, Object value) | ||||||
Creates and returns an annotation having the passed namespace, name and value.
| |||||||
Set< SAnnotation > | 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
| |||||||
void | addAnnotation (SAnnotation annotation) | ||||||
Adds the passed annotation to this container.
| |||||||
SAnnotation | getAnnotation (String qName) | ||||||
Returns an annotation having the passed qualified name, if this container contains such an annotation.
| |||||||
SAnnotation | getAnnotation (String namespace, String name) | ||||||
Returns an annotation having the passed qualified name, if this container contains such an annotation.
| |||||||
Iterator< SAnnotation > | iterator_SAnnotation () | ||||||
Returns an iterator to iterate over the SAnnotation objects contained by this container.Using an iterator is slightly faster than getAnnotations().
| |||||||
void | addMetaAnnotation (SMetaAnnotation metaAnnotation) | ||||||
Adds the passed meta annotation to this container.
| |||||||
SMetaAnnotation | createMetaAnnotation (String namespace, String name, Object value) | ||||||
Creates and returns a meta annotation having the passed namespace, name and value.
| |||||||
Set< SMetaAnnotation > | createMetaAnnotations (String annotationString) | ||||||
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
| |||||||
SMetaAnnotation | getMetaAnnotation (String qName) | ||||||
Returns a meta annotation having the passed qualified name, if this container contains such a meta annotation.
| |||||||
Iterator< SMetaAnnotation > | iterator_SMetaAnnotation () | ||||||
Returns an iterator to iterate over the SMetaAnnotation objects contained by this container.Using an iterator is slightly faster than getMetaAnnotations().
| |||||||
SProcessingAnnotation | createProcessingAnnotation (String namespace, String name, Object value) | ||||||
Creates and returns a processing-annotation having the passed namespace, name and value.
| |||||||
Set< SProcessingAnnotation > | 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
| |||||||
void | addProcessingAnnotation (SProcessingAnnotation annotation) | ||||||
Adds the passed processing-annotation to this container.
| |||||||
SProcessingAnnotation | getProcessingAnnotation (String qName) | ||||||
Returns a processing-annotation having the passed qualified name, if this container contains such a processing-annotation.
| |||||||
Iterator< SProcessingAnnotation > | iterator_SProcessingAnnotation () | ||||||
Returns an iterator to iterate over the SProcessingAnnotation objects contained by this container.Using an iterator is slightly faster than getProcessingAnnotations().
| |||||||
SFeature | createFeature (String namespace, String name, Object value) | ||||||
Creates and returns an feature having the passed namespace, name and value.
| |||||||
Set< SFeature > | 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
| |||||||
void | addFeature (SFeature feature) | ||||||
Adds the passed feature to this container.
| |||||||
SFeature | getFeature (String qName) | ||||||
Returns an feature having the passed qualified name, if this container contains such an feature.
| |||||||
SFeature | getFeature (String namespace, String name) | ||||||
Returns an feature having the passed qualified name, if this container contains such an feature.
| |||||||
Iterator< SFeature > | iterator_SFeature () | ||||||
Returns an iterator to iterate over the SFeature objects contained by this container.Using an iterator is slightly faster than getFeatures().
| |||||||
void | removeLabel (String qName) | ||||||
Removes the label having the passed qName. More... | |||||||
String | getName () | ||||||
Returns the name of this element.The name of the element is not the identifier of the element. The identifier is given by the graph and constructed as a URI, where the name is used as fragment. If this is not unique, the graph will add a number to the fragment to make it unique.
| |||||||
void | setName (String name) | ||||||
Sets the name of the element.The name of the element is not the identifier of the element. The identifier is given by the graph and constructed as a URI, where the name is used as fragment. If this is not unique, the graph will add a number to the fragment to make it unique.
| |||||||
URI | getPath () | ||||||
Returns the id of this object as a URI path If no Id exists, null is returned.
| |||||||
SGraph | getGraph () | ||||||
Returns the container graph of this node.
| |||||||
Public Member Functions inherited from org.corpus_tools.salt.graph.impl.NodeImpl | |||||||
NodeImpl () | |||||||
Initializes an object of type Node. | |||||||
NodeImpl (Node delegate) | |||||||
Initializes an object of type Node. More... | |||||||
Graph | getGraph () | ||||||
{ Relation::getGraph()} | |||||||
void | setGraph (Graph graph) | ||||||
{ Relation::setGraph(Graph)} | |||||||
Set<?extends Layer > | getLayers () | ||||||
Returns all layers containing this node.This is a computed set and only works, when this node is contained in a graph. If this list is used multiple times, it makes sense to store that set.
| |||||||
void | addLayer (Layer layer) | ||||||
Adds this node to the passed layer.If this node is not already contained in the layer's graph, it will be added to the graph.
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 node from the passed layer.
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.
| |||||||
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< Label > | getLabels () | ||||||
{ LabelableElement::getLabels()} | |||||||
Label | getLabel (String qName) | ||||||
{ LabelableElement::getLabel(String)} | |||||||
Label | getLabel (String namespace, String name) | ||||||
{ LabelableElement::getLabel(String, String)} | |||||||
Set< Label > | getLabelsByNamespace (String namespace) | ||||||
{ LabelableElement::getLabelsByNamespace(String)} | |||||||
void | addLabel (Label label) | ||||||
Adds the given Label object to the list of labels.
| |||||||
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()} | |||||||
Public Member Functions inherited from org.corpus_tools.salt.common.SDocument | |||||||
void | setDocumentGraph (SDocumentGraph documentGraph) | ||||||
Sets the document structure which belongs to this document. 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.NodeImpl | |
Node | getDelegate () |
Returns the delegate object. More... | |
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 node 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... | |
Protected Attributes inherited from org.corpus_tools.salt.core.impl.SNodeImpl | |
SFeature | name = null |
The feature object containing the name of the node. | |
Protected Attributes inherited from org.corpus_tools.salt.graph.impl.NodeImpl | |
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... | |
org.corpus_tools.salt.common.impl.SDocumentImpl.SDocumentImpl | ( | ) |
Initializes an object of type SLayerImpl.
org.corpus_tools.salt.common.impl.SDocumentImpl.SDocumentImpl | ( | Node | delegate | ) |
Initializes an object of type SLayerImpl.
If delegate is not null, all functions of this method are delegated to the delegate object. Setting delegate makes this object to a container.
a | delegate object of the same type. |
void org.corpus_tools.salt.common.impl.SDocumentImpl.basic_setDocumentGraph | ( | SDocumentGraph | documentGraph | ) |
This is an internally used method.
To implement a double chaining of SDocument and SDocumentGraph object when a document is set to avoid an endless invocation. The invocation of methods is implement as follows:
setSDocument(SDocument) SDocument#setDocumentGraph(Graph) || \ / || || X || \/ / \ \/ basicSDocument(SDocument) SDocument#basicSetSDocumentGraph(Graph)
document | the container document of this document graph |
SDocumentGraph org.corpus_tools.salt.common.impl.SDocumentImpl.createDocumentGraph | ( | ) |
Returns the document structure which belongs to this document.
If no document structure was created so far, a new one is created and returned
Implements org.corpus_tools.salt.common.SDocument.
void org.corpus_tools.salt.common.impl.SDocumentImpl.setId | ( | String | id | ) |
Creates a new Identifier object and sets its value to the passed id.
value | the id String |
The identifier has the same id value as this document.
Implements org.corpus_tools.salt.graph.IdentifiableElement.
void org.corpus_tools.salt.common.impl.SDocumentImpl.setIdentifier | ( | Identifier | identifier | ) |
Sets the Identifier label for this object.If this object alredy had an identifier, the old one is removed and the new one is added.
the | Identifier object |
The identifier has the same id value as this document.
Implements org.corpus_tools.salt.graph.IdentifiableElement.