gate
Interface SimpleDocument

All Superinterfaces:
Comparable, FeatureBearer, LanguageResource, NameBearer, Resource, Serializable
All Known Subinterfaces:
Document, TextualDocument
All Known Implementing Classes:
DocumentImpl

public interface SimpleDocument
extends LanguageResource, Comparable

Represents the commonalities between all sorts of documents.


Field Summary
static String DOCUMENT_URL_PARAMETER_NAME
          The parameter name for the document URL
 
Method Summary
 AnnotationSet getAnnotations()
          Get the default set of annotations.
 AnnotationSet getAnnotations(String name)
          Get a named set of annotations.
 Set<String> getAnnotationSetNames()
           
 DocumentContent getContent()
           
 URL getSourceUrl()
          Documents are identified by URLs
 void removeAnnotationSet(String name)
          Removes one of the named annotation sets.
 void setContent(DocumentContent newContent)
          Set method for the document content
 void setSourceUrl(URL sourceUrl)
          Set method for the document's URL
 
Methods inherited from interface gate.LanguageResource
getDataStore, getLRPersistenceId, getParent, isModified, setDataStore, setLRPersistenceId, setParent, sync
 
Methods inherited from interface gate.Resource
cleanup, getParameterValue, init, setParameterValue, setParameterValues
 
Methods inherited from interface gate.util.FeatureBearer
getFeatures, setFeatures
 
Methods inherited from interface gate.util.NameBearer
getName, setName
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

DOCUMENT_URL_PARAMETER_NAME

static final String DOCUMENT_URL_PARAMETER_NAME
The parameter name for the document URL

See Also:
Constant Field Values
Method Detail

getSourceUrl

URL getSourceUrl()
Documents are identified by URLs


setSourceUrl

void setSourceUrl(URL sourceUrl)
Set method for the document's URL


getContent

DocumentContent getContent()

setContent

void setContent(DocumentContent newContent)
Set method for the document content


getAnnotations

AnnotationSet getAnnotations()
Get the default set of annotations. The set is created if it doesn't exist yet.


getAnnotations

AnnotationSet getAnnotations(String name)
Get a named set of annotations. Creates a new set if one with this name doesn't exist yet.


getAnnotationSetNames

Set<String> getAnnotationSetNames()
Returns:
a set of all named annotation sets in existence or null if none.

removeAnnotationSet

void removeAnnotationSet(String name)
Removes one of the named annotation sets. Note that the default annotation set cannot be removed.

Parameters:
name - the name of the annotation set to be removed