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 TypeMethodDescriptionvoidaddChangeListener(ICasDocumentListener listener) Adds a given change listener.voidaddFeatureStructure(FeatureStructure structure) Adds aFeatureStructureto the document.voidaddFeatureStructures(Collection<? extends FeatureStructure> structures) Adds theFeatureStructures.voidchanged()The document was changed.getAnnotations(Type type) Returns allAnnotations of the given type.getCAS()Retrieves the CAS.Retrieves the requested type.Retrieves the string representation of the applied type system.voidremoveChangeListener(ICasDocumentListener listener) Removes the given change listener.voidremoveFeatureStructure(FeatureStructure structure) Removes anFeatureStructurefrom the Document.voidremoveFeatureStructures(Collection<? extends FeatureStructure> structuresToRemove) Removes the givenFeatureStructures.voidswitchView(String viewName) Switches the view of the underlying CAS to the provided view name.voidupdate(FeatureStructure structure) Updates the givenFeatureStructure.voidupdateFeatureStructure(Collection<? extends FeatureStructure> structures) Updates the givenFeatureStructures.
-
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 aFeatureStructureto the document.- Parameters:
structure- - theFeatureStructureto add.
-
addFeatureStructures
Adds theFeatureStructures.- Parameters:
structures- the structures
-
removeFeatureStructure
Removes anFeatureStructurefrom the Document.- Parameters:
structure- - theFeatureStructureto remove.
-
removeFeatureStructures
Removes the givenFeatureStructures.- Parameters:
structuresToRemove- the structures to remove
-
update
Updates the givenFeatureStructure.- Parameters:
structure- the structure
-
updateFeatureStructure
Updates the givenFeatureStructures.- Parameters:
structures- the structures
-
changed
void changed()The document was changed. Its unknown what changed. -
getAnnotations
Returns allAnnotations of the given type.- Parameters:
type- - type of the requestedAnnotations.- Returns:
- - return all
Annotationof the given type or null if noAnnotationof 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
-