gate.corpora
Class UimaDocumentFormat
java.lang.Object
gate.util.AbstractFeatureBearer
gate.creole.AbstractResource
gate.creole.AbstractLanguageResource
gate.DocumentFormat
gate.corpora.TextualDocumentFormat
gate.corpora.XmlDocumentFormat
gate.corpora.UimaDocumentFormat
- All Implemented Interfaces:
- LanguageResource, Resource, FeatureBearer, NameBearer, Serializable
@CreoleResource(name="UIMA Document Format",
isPrivate=true,
autoinstances=)
public class UimaDocumentFormat
- extends XmlDocumentFormat
UIMA XCAS and XMICAS document formats.
- See Also:
- Serialized Form
Methods inherited from class gate.DocumentFormat |
addStatusListener, areEqual, decideBetweenThreeMimeTypes, decideBetweenTwoMimeTypes, fireStatusChanged, getDocumentFormat, getDocumentFormat, getDocumentFormat, getElement2StringMap, getFeatures, getMarkupElementsMap, getMimeType, getMimeTypeForString, getShouldCollectRepositioning, getSupportedFileSuffixes, guessTypeUsingMagicNumbers, removeStatusListener, runMagicNumbers, setElement2StringMap, setFeatures, setMarkupElementsMap, setMimeType, setShouldCollectRepositioning, unpackMarkup |
Methods inherited from class gate.creole.AbstractResource |
checkParameterValues, getBeanInfo, getInitParameterValues, getInitParameterValues, getName, getParameterValue, getParameterValue, getParameterValues, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
UimaDocumentFormat
public UimaDocumentFormat()
unpackMarkup
public void unpackMarkup(Document doc,
RepositioningInfo repInfo,
RepositioningInfo ampCodingInfo)
throws DocumentFormatException
- Description copied from class:
XmlDocumentFormat
- Unpack the markup in the document. This converts markup from the
native format (e.g. XML) into annotations in GATE format. Uses the
markupElementsMap to determine which elements to convert, and what
annotation type names to use. If the document was created from a
String, then is recomandable to set the doc's sourceUrl to null.
So, if the document has a valid URL, then the parser will try to
parse the XML document pointed by the URL.If the URL is not valid,
or is null, then the doc's content will be parsed. If the doc's
content is not a valid XML then the parser might crash.
- Overrides:
unpackMarkup
in class XmlDocumentFormat
- Parameters:
doc
- The gate document you want to parse. If
doc.getSourceUrl()
returns null
then the content of doc will be parsed. Using a URL is
recomended because the parser will report errors corectlly
if the XML document is not well formed.
- Throws:
DocumentFormatException
init
public Resource init()
throws ResourceInstantiationException
- Description copied from class:
XmlDocumentFormat
- Initialise this resource, and return it.
- Specified by:
init
in interface Resource
- Overrides:
init
in class XmlDocumentFormat
- Throws:
ResourceInstantiationException