|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.sf.mmm.util.component.base.AbstractComponent
net.sf.mmm.util.component.base.AbstractLoggableComponent
net.sf.mmm.content.parser.base.AbstractContentParser
net.sf.mmm.content.parser.impl.xml.ContentParserXml
@Singleton @Named public class ContentParserXml
This is the implementation of the
ContentParser interface for XML
documents (content with the mimetype "text/xml").
It does NOT use a standard XML parser such as SAX or StAX to be fault
tolerant. Still it supports XML encoding declarations, entities, CDATA
sections, etc. Features like XInclude or entity-includes are (intentionally)
NOT supported.
| Field Summary | |
|---|---|
static String |
KEY_EXTENSION
The default extension. |
static String |
KEY_MIMETYPE
The mimetype. |
private net.sf.mmm.util.xml.api.XmlUtil |
xmlUtil
|
| Fields inherited from interface net.sf.mmm.content.parser.api.ContentParser |
|---|
VARIABLE_NAME_CREATOR, VARIABLE_NAME_KEYWORDS, VARIABLE_NAME_LANGUAGE, VARIABLE_NAME_TEXT, VARIABLE_NAME_TITLE |
| Constructor Summary | |
|---|---|
ContentParserXml()
The constructor. |
|
| Method Summary | |
|---|---|
protected void |
doInitialize()
|
String[] |
getAlternativeKeyArray()
|
String |
getExtension()
|
String |
getMimetype()
|
String[] |
getSecondaryKeyArray()
|
protected net.sf.mmm.util.xml.api.XmlUtil |
getXmlUtil()
|
void |
parse(BufferedReader bufferedReader,
ContentParserOptions options,
net.sf.mmm.util.context.api.MutableGenericContext context,
StringBuilder textBuffer)
This method parses the content of the given bufferedReader and
appends the textual content to the textBuffer. |
void |
parse(InputStream inputStream,
long filesize,
ContentParserOptions options,
net.sf.mmm.util.context.api.MutableGenericContext context)
|
void |
setXmlUtil(net.sf.mmm.util.xml.api.XmlUtil xmlUtil)
|
| Methods inherited from class net.sf.mmm.content.parser.base.AbstractContentParser |
|---|
getPrimaryKeys, getSecondaryKeys, parse, parse, setGenericContextFactory |
| Methods inherited from class net.sf.mmm.util.component.base.AbstractLoggableComponent |
|---|
getLogger, setLogger |
| Methods inherited from class net.sf.mmm.util.component.base.AbstractComponent |
|---|
doInitialized, getInitializationState, initialize |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String KEY_MIMETYPE
public static final String KEY_EXTENSION
private net.sf.mmm.util.xml.api.XmlUtil xmlUtil
getXmlUtil()| Constructor Detail |
|---|
public ContentParserXml()
| Method Detail |
|---|
protected void doInitialize()
doInitialize in class AbstractContentParserprotected net.sf.mmm.util.xml.api.XmlUtil getXmlUtil()
@Inject public void setXmlUtil(net.sf.mmm.util.xml.api.XmlUtil xmlUtil)
xmlUtil - is the xmlUtil to setpublic String getExtension()
public String getMimetype()
public String[] getAlternativeKeyArray()
getAlternativeKeyArray in class AbstractContentParserpublic String[] getSecondaryKeyArray()
getSecondaryKeyArray in class AbstractContentParser
public void parse(InputStream inputStream,
long filesize,
ContentParserOptions options,
net.sf.mmm.util.context.api.MutableGenericContext context)
throws Exception
parse in class AbstractContentParserException
public void parse(BufferedReader bufferedReader,
ContentParserOptions options,
net.sf.mmm.util.context.api.MutableGenericContext context,
StringBuilder textBuffer)
throws Exception
bufferedReader and
appends the textual content to the textBuffer. Additional
metadata can directly be set in the given properties.
bufferedReader - is where to read the content from.options - are the ContentParserOptions.context - is where the metadata is collected.textBuffer - is the buffer where the textual content should be
appended to.
Exception - if something goes wrong.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||