Package org.apache.uima.caseditor.editor
Interface ICasDocument
- All Known Implementing Classes:
AbstractDocument
,DocumentUimaImpl
public interface ICasDocument
The
ICasDocument
represents texts with meta information.
A ICasDocument
allows manipulation of its meta information the text must not be changed.
Meta information can be retrieved over the CAS
object.
Note: All changes to meta information should be done with calls to the manipulation methods of
the document. If this is not possible, change the CAS
and after the change call the
changed()
method.-
Method Summary
Modifier and TypeMethodDescriptionvoid
addChangeListener
(ICasDocumentListener listener) Adds a given change listener.void
addFeatureStructure
(FeatureStructure structure) Adds aFeatureStructure
to the document.void
addFeatureStructures
(Collection<? extends FeatureStructure> structures) Adds theFeatureStructure
s.void
changed()
The document was changed.getAnnotations
(Type type) Returns allAnnotation
s of the given type.getCAS()
Retrieves the CAS.Retrieves the requested type.Retrieves the string representation of the applied type system.void
removeChangeListener
(ICasDocumentListener listener) Removes the given change listener.void
removeFeatureStructure
(FeatureStructure structure) Removes anFeatureStructure
from the Document.void
removeFeatureStructures
(Collection<? extends FeatureStructure> structuresToRemove) Removes the givenFeatureStructure
s.void
switchView
(String viewName) Switches the view of the underlying CAS to the provided view name.void
update
(FeatureStructure structure) Updates the givenFeatureStructure
.void
updateFeatureStructure
(Collection<? extends FeatureStructure> structures) Updates the givenFeatureStructure
s.
-
Method Details
-
addChangeListener
Adds a given change listener.- Parameters:
listener
- the listener
-
removeChangeListener
Removes the given change listener.- Parameters:
listener
- the listener
-
getCAS
CAS getCAS()Retrieves the CAS.- Returns:
- the CAS
-
addFeatureStructure
Adds aFeatureStructure
to the document.- Parameters:
structure
- - theFeatureStructure
to add.
-
addFeatureStructures
Adds theFeatureStructure
s.- Parameters:
structures
- the structures
-
removeFeatureStructure
Removes anFeatureStructure
from the Document.- Parameters:
structure
- - theFeatureStructure
to remove.
-
removeFeatureStructures
Removes the givenFeatureStructure
s.- Parameters:
structuresToRemove
- the structures to remove
-
update
Updates the givenFeatureStructure
.- Parameters:
structure
- the structure
-
updateFeatureStructure
Updates the givenFeatureStructure
s.- Parameters:
structures
- the structures
-
changed
void changed()The document was changed. Its unknown what changed. -
getAnnotations
Returns allAnnotation
s of the given type.- Parameters:
type
- - type of the requestedAnnotation
s.- Returns:
- - return all
Annotation
of the given type or null if noAnnotation
of this type exist.
-
switchView
Switches the view of the underlying CAS to the provided view name.- Parameters:
viewName
- the view name
-
getType
Retrieves the requested type.- Parameters:
type
- the type- Returns:
- the type
-
getTypeSystemText
String getTypeSystemText()Retrieves the string representation of the applied type system.- Returns:
- the string representation of the applied type system
-