|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.abdera.util.AbstractParserOptions
public abstract class AbstractParserOptions
Non thread-safe abstract implementation of ParserOptions
| Field Summary | |
|---|---|
protected Map<QName,QName> |
aliases
|
protected String |
charset
|
protected CompressionUtil.CompressionCodec[] |
codecs
|
protected boolean |
detect
|
protected Map<String,String> |
entities
|
protected Factory |
factory
|
protected boolean |
filterreserved
|
protected ParseFilter |
parseFilter
|
protected boolean |
preserve
|
protected boolean |
qnamealiasing
|
protected char |
replacement
|
protected boolean |
resolveentities
|
| Constructor Summary | |
|---|---|
protected |
AbstractParserOptions()
|
| Method Summary | |
|---|---|
protected abstract void |
checkFactory(Factory factory)
|
Object |
clone()
|
boolean |
getAutodetectCharset()
Returns true if the parser should attempt to automatically detect the character encoding from the stream |
String |
getCharset()
Returns the default character set to use for the parsed document |
CompressionUtil.CompressionCodec[] |
getCompressionCodecs()
When parsing an InputStream that contains compressed data, use these codecs to decompress the stream. |
Factory |
getFactory()
Returns the factory the parser should use |
char |
getFilterRestrictedCharacterReplacement()
If getFilterRestrictedCharacters is true, restricted characters will be replaced with the specified character |
boolean |
getFilterRestrictedCharacters()
If true, the parser will attempt to silently filter out invalid XML characters appearing within the XML document. |
boolean |
getMustPreserveWhitespace()
If false, the parser will trim leading and trailing whitespace in element and attribute values unless there is an in-scope xml:space="preserve". |
ParseFilter |
getParseFilter()
Returns the Parse Filter. |
Map<QName,QName> |
getQNameAliasMap()
Get the QName-Alias Mapping (default null) |
boolean |
getResolveEntities()
True if undeclared named entities should be resolved. |
protected abstract void |
initFactory()
|
boolean |
isQNameAliasMappingEnabled()
True if QName-Alias mapping is enabled (default is false) |
ParserOptions |
registerEntity(String name,
String value)
Register a named entity. |
String |
resolveEntity(String name)
Resolves a value for a named entity. |
ParserOptions |
setAutodetectCharset(boolean detect)
If true, the parser will attempt to automatically detect the character encoding from the stream by checking for the byte order mark or checking the XML prolog. |
ParserOptions |
setCharset(String charset)
Sets the character set to use for the parsed document |
ParserOptions |
setCompressionCodecs(CompressionUtil.CompressionCodec... codecs)
When parsing an InputStream that contains compressed data, use these codecs to decompress the stream. |
ParserOptions |
setFactory(Factory factory)
Sets the factory the parser should use |
ParserOptions |
setFilterRestrictedCharacterReplacement(char replacement)
If getFilterRestrictedCharacters is true, restricted characters will be replaced with the specified character |
ParserOptions |
setFilterRestrictedCharacters(boolean filter)
If true, the parser will attempt to silently filter out invalid XML characters appearing within the XML document |
ParserOptions |
setMustPreserveWhitespace(boolean preserve)
If false, the parser will trim leading and trailing whitespace in element and attribute values unless there is an in-scope xml:space="preserve". |
ParserOptions |
setParseFilter(ParseFilter parseFilter)
Sets the Parse Filter. |
ParserOptions |
setQNameAliasMap(Map<QName,QName> map)
Set the QName-Alias Mapping |
ParserOptions |
setQNameAliasMappingEnabled(boolean enabled)
True if QName-Alias mapping is enabled |
ParserOptions |
setResolveEntities(boolean resolve)
True if undeclared named entities should be resolved. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Factory factory
protected String charset
protected ParseFilter parseFilter
protected boolean detect
protected boolean preserve
protected boolean filterreserved
protected char replacement
protected CompressionUtil.CompressionCodec[] codecs
protected boolean resolveentities
protected Map<String,String> entities
protected boolean qnamealiasing
protected Map<QName,QName> aliases
| Constructor Detail |
|---|
protected AbstractParserOptions()
| Method Detail |
|---|
protected abstract void initFactory()
protected abstract void checkFactory(Factory factory)
public Object clone()
throws CloneNotSupportedException
clone in interface ParserOptionsclone in class ObjectCloneNotSupportedExceptionpublic Factory getFactory()
ParserOptions
getFactory in interface ParserOptionspublic ParserOptions setFactory(Factory factory)
ParserOptions
setFactory in interface ParserOptionspublic String getCharset()
ParserOptions
getCharset in interface ParserOptionspublic ParserOptions setCharset(String charset)
ParserOptions
setCharset in interface ParserOptionspublic ParseFilter getParseFilter()
ParserOptions
getParseFilter in interface ParserOptionspublic ParserOptions setParseFilter(ParseFilter parseFilter)
ParserOptions
setParseFilter in interface ParserOptionspublic boolean getAutodetectCharset()
ParserOptions
getAutodetectCharset in interface ParserOptionspublic ParserOptions setAutodetectCharset(boolean detect)
ParserOptions
setAutodetectCharset in interface ParserOptionspublic boolean getMustPreserveWhitespace()
ParserOptions
getMustPreserveWhitespace in interface ParserOptionspublic ParserOptions setMustPreserveWhitespace(boolean preserve)
ParserOptions
setMustPreserveWhitespace in interface ParserOptionspublic boolean getFilterRestrictedCharacters()
ParserOptions
getFilterRestrictedCharacters in interface ParserOptionspublic ParserOptions setFilterRestrictedCharacters(boolean filter)
ParserOptions
setFilterRestrictedCharacters in interface ParserOptionspublic char getFilterRestrictedCharacterReplacement()
ParserOptions
getFilterRestrictedCharacterReplacement in interface ParserOptionspublic ParserOptions setFilterRestrictedCharacterReplacement(char replacement)
ParserOptions
setFilterRestrictedCharacterReplacement in interface ParserOptionspublic CompressionUtil.CompressionCodec[] getCompressionCodecs()
ParserOptions
getCompressionCodecs in interface ParserOptionspublic ParserOptions setCompressionCodecs(CompressionUtil.CompressionCodec... codecs)
ParserOptions
setCompressionCodecs in interface ParserOptions
public ParserOptions registerEntity(String name,
String value)
ParserOptions
registerEntity in interface ParserOptionspublic String resolveEntity(String name)
ParserOptions
resolveEntity in interface ParserOptionspublic ParserOptions setResolveEntities(boolean resolve)
ParserOptions
setResolveEntities in interface ParserOptionspublic boolean getResolveEntities()
ParserOptions
getResolveEntities in interface ParserOptionspublic Map<QName,QName> getQNameAliasMap()
ParserOptions
getQNameAliasMap in interface ParserOptionspublic ParserOptions setQNameAliasMap(Map<QName,QName> map)
ParserOptions
setQNameAliasMap in interface ParserOptionspublic boolean isQNameAliasMappingEnabled()
ParserOptions
isQNameAliasMappingEnabled in interface ParserOptionspublic ParserOptions setQNameAliasMappingEnabled(boolean enabled)
ParserOptions
setQNameAliasMappingEnabled in interface ParserOptions
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||