|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Represents the commonalities between all sorts of documents.
Field Summary | |
static String |
DOCUMENT_ENCODING_PARAMETER_NAME
|
static String |
DOCUMENT_END_OFFSET_PARAMETER_NAME
|
static String |
DOCUMENT_MARKUP_AWARE_PARAMETER_NAME
The parameter name that determines whether or not a document is markup aware |
static String |
DOCUMENT_PRESERVE_CONTENT_PARAMETER_NAME
|
static String |
DOCUMENT_REPOSITIONING_PARAMETER_NAME
|
static String |
DOCUMENT_START_OFFSET_PARAMETER_NAME
|
static String |
DOCUMENT_STRING_CONTENT_PARAMETER_NAME
|
static String |
DOCUMENT_URL_PARAMETER_NAME
The parameter name for the document URL |
Method Summary | |
void |
addDocumentListener(DocumentListener l)
Adds a DocumentListener to this document. |
void |
edit(Long start,
Long end,
DocumentContent replacement)
Make changes to the content. |
AnnotationSet |
getAnnotations()
Get the default set of annotations. |
AnnotationSet |
getAnnotations(String name)
Get a named set of annotations. |
Boolean |
getCollectRepositioningInfo()
Get the collectiong and preserving of repositioning information for the Document. |
DocumentContent |
getContent()
The content of the document: wraps e.g. |
Boolean |
getMarkupAware()
Get the markup awareness status of the Document. |
Map |
getNamedAnnotationSets()
Returns a map with the named annotation sets |
Boolean |
getPreserveOriginalContent()
Get the preserving of content status of the Document. |
URL |
getSourceUrl()
Documents are identified by URLs |
Long |
getSourceUrlEndOffset()
Documents may be packed within files; in this case an optional pair of offsets refer to the location of the document. |
Long[] |
getSourceUrlOffsets()
Documents may be packed within files; in this case an optional pair of offsets refer to the location of the document. |
Long |
getSourceUrlStartOffset()
Documents may be packed within files; in this case an optional pair of offsets refer to the location of the document. |
void |
removeAnnotationSet(String name)
Removes one of the named annotation sets. |
void |
removeDocumentListener(DocumentListener l)
Removes one of the previously registered document listeners. |
void |
setCollectRepositioningInfo(Boolean b)
Allow/disallow collecting of repositioning information. |
void |
setContent(DocumentContent newContent)
Set method for the document content |
void |
setMarkupAware(Boolean b)
Make the document markup-aware. |
void |
setPreserveOriginalContent(Boolean b)
Allow/disallow preserving of the original document content. |
void |
setSourceUrl(URL sourceUrl)
Set method for the document's URL |
void |
setSourceUrlEndOffset(Long sourceUrlEndOffset)
Documents may be packed within files; in this case an optional pair of offsets refer to the location of the document. |
void |
setSourceUrlStartOffset(Long sourceUrlStartOffset)
Documents may be packed within files; in this case an optional pair of offsets refer to the location of the document. |
String |
toXml()
Returns a GateXml document. |
String |
toXml(Set aSourceAnnotationSet)
Equivalent to toXml(aSourceAnnotationSet, true). |
String |
toXml(Set aSourceAnnotationSet,
boolean includeFeatures)
Returns an XML document aming to preserve the original markups( the original markup will be in the same place and format as it was before processing the document) and include (if possible) the annotations specified in the aSourceAnnotationSet. |
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 |
public static final String DOCUMENT_URL_PARAMETER_NAME
public static final String DOCUMENT_MARKUP_AWARE_PARAMETER_NAME
public static final String DOCUMENT_ENCODING_PARAMETER_NAME
public static final String DOCUMENT_PRESERVE_CONTENT_PARAMETER_NAME
public static final String DOCUMENT_STRING_CONTENT_PARAMETER_NAME
public static final String DOCUMENT_REPOSITIONING_PARAMETER_NAME
public static final String DOCUMENT_START_OFFSET_PARAMETER_NAME
public static final String DOCUMENT_END_OFFSET_PARAMETER_NAME
Method Detail |
public URL getSourceUrl()
public void setSourceUrl(URL sourceUrl)
public Long[] getSourceUrlOffsets()
public Long getSourceUrlStartOffset()
public Long getSourceUrlEndOffset()
public DocumentContent getContent()
public void setContent(DocumentContent newContent)
public AnnotationSet getAnnotations()
public AnnotationSet getAnnotations(String name)
public Map getNamedAnnotationSets()
public void removeAnnotationSet(String name)
name
- the name of the annotation set to be removedpublic void setMarkupAware(Boolean b)
b
- markup awareness status.public Boolean getMarkupAware()
public void setPreserveOriginalContent(Boolean b)
public Boolean getPreserveOriginalContent()
public void setCollectRepositioningInfo(Boolean b)
public Boolean getCollectRepositioningInfo()
public String toXml()
public String toXml(Set aSourceAnnotationSet, boolean includeFeatures)
aSourceAnnotationSet
- is an annotation set containing all the
annotations that will be combined with the original marup set.includeFeatures
- determines whether or not features and gate IDs
of the annotations should be included as attributes on the tags or not.
If false, then only the annotation types are exported as tags, with no
attributes.
public String toXml(Set aSourceAnnotationSet)
public void edit(Long start, Long end, DocumentContent replacement) throws InvalidOffsetException
InvalidOffsetException
public void addDocumentListener(DocumentListener l)
DocumentListener
to this document.
All the registered listeners will be notified of changes occured to the
document.
public void removeDocumentListener(DocumentListener l)
public void setSourceUrlEndOffset(Long sourceUrlEndOffset)
public void setSourceUrlStartOffset(Long sourceUrlStartOffset)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |