@CreoleResource(name="GATE XML Document Format", isPrivate=true, autoinstances=) public class XmlDocumentFormat extends TextualDocumentFormat
element2StringMap, magic2mimeTypeMap, markupElementsMap, mimeString2ClassHandlerMap, mimeString2mimeTypeMap, suffixes2mimeTypeMap
dataStore, lrPersistentId
name
Constructor and Description |
---|
XmlDocumentFormat()
Default construction
|
Modifier and Type | Method and Description |
---|---|
protected static int |
indexOf(byte[] data,
byte[] pattern)
Finds the first occurrence of the pattern in the text.
|
Resource |
init()
Initialise this resource, and return it.
|
protected static boolean |
isGateXmlFormat(Document doc) |
protected static boolean |
isGateXmlFormat(String content)
Deprecated.
|
Boolean |
supportsRepositioning()
We could collect repositioning information during XML parsing
|
void |
unpackMarkup(Document doc)
Old style of unpackMarkup (without collecting of RepositioningInfo)
|
void |
unpackMarkup(Document doc,
RepositioningInfo repInfo,
RepositioningInfo ampCodingInfo)
Unpack the markup in the document.
|
annotateParagraphs, getDataStore, hasContentButNoValidUrl, setNewLineProperty
addStatusListener, areEqual, decideBetweenThreeMimeTypes, decideBetweenTwoMimeTypes, fireStatusChanged, getDocumentFormat, getDocumentFormat, getDocumentFormat, getDocumentFormat, getElement2StringMap, getFeatures, getMarkupElementsMap, getMimeType, getMimeTypeForString, getShouldCollectRepositioning, getSupportedFileSuffixes, getSupportedMimeTypes, guessTypeUsingMagicNumbers, removeStatusListener, runMagicNumbers, setElement2StringMap, setFeatures, setMarkupElementsMap, setMimeType, setShouldCollectRepositioning, unpackMarkup
cleanup, getLRPersistenceId, getParent, isModified, setDataStore, setLRPersistenceId, setParent, sync
checkParameterValues, flushBeanInfoCache, forgetBeanInfo, getBeanInfo, getInitParameterValues, getInitParameterValues, getName, getParameterValue, getParameterValue, getParameterValues, removeResourceListeners, setName, setParameterValue, setParameterValue, setParameterValues, setParameterValues, setResourceListeners, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getLRPersistenceId, getParent, isModified, setDataStore, setLRPersistenceId, setParent, sync
cleanup, getParameterValue, setParameterValue, setParameterValues
getName, setName
public XmlDocumentFormat()
public Boolean supportsRepositioning()
supportsRepositioning
in class DocumentFormat
public void unpackMarkup(Document doc) throws DocumentFormatException
unpackMarkup
in class TextualDocumentFormat
DocumentFormatException
public void unpackMarkup(Document doc, RepositioningInfo repInfo, RepositioningInfo ampCodingInfo) throws DocumentFormatException
unpackMarkup
in class TextualDocumentFormat
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.DocumentFormatException
@Deprecated protected static boolean isGateXmlFormat(String content)
protected static boolean isGateXmlFormat(Document doc) throws DocumentFormatException
DocumentFormatException
protected static int indexOf(byte[] data, byte[] pattern)
public Resource init() throws ResourceInstantiationException
init
in interface Resource
init
in class TextualDocumentFormat
ResourceInstantiationException