public abstract class AbstractContentParserOpenDoc extends AbstractContentParser
ContentParser
for content of the
open-document format (content with the mimetypes
"application/vnd.oasis.opendocument.*").Modifier and Type | Field and Description |
---|---|
private static String |
ENTRY_CONTENT_XML
the content.xml entry of the document
|
private static String |
ENTRY_META_XML
the meta.xml entry of the document
|
private static String |
ENTRY_STYLES_XML
the styles.xml entry of the document
|
private static Set<String> |
TEXT_TAGS
The
Set of XML tags that contain relevant text. |
VARIABLE_NAME_CREATOR, VARIABLE_NAME_KEYWORDS, VARIABLE_NAME_LANGUAGE, VARIABLE_NAME_TEXT, VARIABLE_NAME_TITLE
Constructor and Description |
---|
AbstractContentParserOpenDoc()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
parse(InputStream inputStream,
long filesize,
ContentParserOptions options,
MutableGenericContext context) |
protected void |
parseContent(InputStream inputStream,
ContentParserOptions options,
MutableGenericContext context,
StringBuilder buffer)
This method parses the content of the document.
|
protected void |
parseMetadata(InputStream inputStream,
ContentParserOptions options,
MutableGenericContext context)
This method parses the metadata of the document.
|
protected void |
parseStyles(InputStream inputStream,
ContentParserOptions options,
MutableGenericContext context,
StringBuilder buffer)
This method parses the content of the document.
|
doInitialize, getAlternativeKeyArray, getPrimaryKeys, getSecondaryKeyArray, getSecondaryKeys, parse, parse, setGenericContextFactory
createLogger, getLogger
doInitialized, getInitializationState, initialize
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getExtension, getMimetype
private static final String ENTRY_CONTENT_XML
private static final String ENTRY_META_XML
private static final String ENTRY_STYLES_XML
public AbstractContentParserOpenDoc()
protected void parseMetadata(InputStream inputStream, ContentParserOptions options, MutableGenericContext context) throws Exception
inputStream
- is the InputStream
where to read the metadata
from.options
- are the ContentParserOptions
context
- is the MutableGenericContext
where the extracted
metadata from the parsed inputStream
will be
added
to.Exception
- if the operation fails for arbitrary reasons.protected void parseContent(InputStream inputStream, ContentParserOptions options, MutableGenericContext context, StringBuilder buffer) throws Exception
inputStream
- is the InputStream
where to read the metadata
from.options
- are the ContentParserOptions
context
- is the MutableGenericContext
where the extracted
metadata from the parsed inputStream
will be
added
to.buffer
- is the StringBuilder
where to append the text.Exception
- if the operation fails for arbitrary reasons.protected void parseStyles(InputStream inputStream, ContentParserOptions options, MutableGenericContext context, StringBuilder buffer) throws Exception
inputStream
- is the InputStream
where to read the metadata
from.options
- are the ContentParserOptions
context
- is the MutableGenericContext
where the extracted
metadata from the parsed inputStream
will be
added
to.buffer
- is the StringBuilder
where to append the text.Exception
- if the operation fails for arbitrary reasons.public void parse(InputStream inputStream, long filesize, ContentParserOptions options, MutableGenericContext context) throws Exception
parse
in class AbstractContentParser
inputStream
- is the fresh input stream of the content to parse.filesize
- is the size (content-length) of the content to parse in
bytes or 0
if NOT available (unknown). If available,
the parser may use this value for optimized allocations.options
- are the ContentParserOptions
.context
- is the MutableGenericContext
where the extracted
metadata from the parsed inputStream
will be
added
to.Exception
- if the operation fails for arbitrary reasons.ContentParser.parse(InputStream, long)
Copyright © 2001–2016 mmm-Team. All rights reserved.