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 getAnnotationSetNames()
          Returns a set of all named annotation sets in existence
 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

public static final String DOCUMENT_URL_PARAMETER_NAME
The parameter name for the document URL

See Also:
Constant Field Values
Method Detail

getSourceUrl

public URL getSourceUrl()
Documents are identified by URLs


setSourceUrl

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


getContent

public DocumentContent getContent()

setContent

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


getAnnotations

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


getAnnotations

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


getAnnotationSetNames

public Set getAnnotationSetNames()
Returns a set of all named annotation sets in existence


removeAnnotationSet

public 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