Package org.apache.abdera.util
Class AbstractParserOptions
- java.lang.Object
-
- org.apache.abdera.util.AbstractParserOptions
-
- All Implemented Interfaces:
java.lang.Cloneable
,ParserOptions
@Deprecated(since="2021-07-29") public abstract class AbstractParserOptions extends java.lang.Object implements ParserOptions, java.lang.Cloneable
Deprecated.This API is deprecated as Apache Abdera is a retired project since 2017.Non thread-safe abstract implementation of ParserOptions
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.Object
clone()
Deprecated.boolean
getAutodetectCharset()
Deprecated.Returns true if the parser should attempt to automatically detect the character encoding from the streamjava.lang.String
getCharset()
Deprecated.Returns the default character set to use for the parsed documentCompressionUtil.CompressionCodec[]
getCompressionCodecs()
Deprecated.When parsing an InputStream that contains compressed data, use these codecs to decompress the stream.Factory
getFactory()
Deprecated.Returns the factory the parser should usechar
getFilterRestrictedCharacterReplacement()
Deprecated.If getFilterRestrictedCharacters is true, restricted characters will be replaced with the specified characterboolean
getFilterRestrictedCharacters()
Deprecated.If true, the parser will attempt to silently filter out invalid XML characters appearing within the XML document.boolean
getMustPreserveWhitespace()
Deprecated.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()
Deprecated.Returns the Parse Filter.java.util.Map<javax.xml.namespace.QName,javax.xml.namespace.QName>
getQNameAliasMap()
Deprecated.Get the QName-Alias Mapping (default null)boolean
getResolveEntities()
Deprecated.True if undeclared named entities should be resolved.boolean
isQNameAliasMappingEnabled()
Deprecated.True if QName-Alias mapping is enabled (default is false)ParserOptions
registerEntity(java.lang.String name, java.lang.String value)
Deprecated.Register a named entity.java.lang.String
resolveEntity(java.lang.String name)
Deprecated.Resolves a value for a named entity.ParserOptions
setAutodetectCharset(boolean detect)
Deprecated.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(java.lang.String charset)
Deprecated.Sets the character set to use for the parsed documentParserOptions
setCompressionCodecs(CompressionUtil.CompressionCodec... codecs)
Deprecated.When parsing an InputStream that contains compressed data, use these codecs to decompress the stream.ParserOptions
setFactory(Factory factory)
Deprecated.Sets the factory the parser should useParserOptions
setFilterRestrictedCharacterReplacement(char replacement)
Deprecated.If getFilterRestrictedCharacters is true, restricted characters will be replaced with the specified characterParserOptions
setFilterRestrictedCharacters(boolean filter)
Deprecated.If true, the parser will attempt to silently filter out invalid XML characters appearing within the XML documentParserOptions
setMustPreserveWhitespace(boolean preserve)
Deprecated.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)
Deprecated.Sets the Parse Filter.ParserOptions
setQNameAliasMap(java.util.Map<javax.xml.namespace.QName,javax.xml.namespace.QName> map)
Deprecated.Set the QName-Alias MappingParserOptions
setQNameAliasMappingEnabled(boolean enabled)
Deprecated.True if QName-Alias mapping is enabledParserOptions
setResolveEntities(boolean resolve)
Deprecated.True if undeclared named entities should be resolved.
-
-
-
Method Detail
-
clone
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
Deprecated.- Specified by:
clone
in interfaceParserOptions
- Throws:
java.lang.CloneNotSupportedException
-
getFactory
public Factory getFactory()
Deprecated.Description copied from interface:ParserOptions
Returns the factory the parser should use- Specified by:
getFactory
in interfaceParserOptions
-
setFactory
public ParserOptions setFactory(Factory factory)
Deprecated.Description copied from interface:ParserOptions
Sets the factory the parser should use- Specified by:
setFactory
in interfaceParserOptions
-
getCharset
public java.lang.String getCharset()
Deprecated.Description copied from interface:ParserOptions
Returns the default character set to use for the parsed document- Specified by:
getCharset
in interfaceParserOptions
-
setCharset
public ParserOptions setCharset(java.lang.String charset)
Deprecated.Description copied from interface:ParserOptions
Sets the character set to use for the parsed document- Specified by:
setCharset
in interfaceParserOptions
-
getParseFilter
public ParseFilter getParseFilter()
Deprecated.Description copied from interface:ParserOptions
Returns the Parse Filter. The parse filter is a set of XML QNames that the parse should watch out for. If the filter is null, the parser will parse all elements in the document. I the filter is not null, the parser will only pay attention to elements whose QName's appear in the filter list.- Specified by:
getParseFilter
in interfaceParserOptions
-
setParseFilter
public ParserOptions setParseFilter(ParseFilter parseFilter)
Deprecated.Description copied from interface:ParserOptions
Sets the Parse Filter. The parse filter is a set of XML QNames that the parse should watch out for. If the filter is null, the parser will parse all elements in the document. I the filter is not null, the parser will only pay attention to elements whose QName's appear in the filter list.- Specified by:
setParseFilter
in interfaceParserOptions
-
getAutodetectCharset
public boolean getAutodetectCharset()
Deprecated.Description copied from interface:ParserOptions
Returns true if the parser should attempt to automatically detect the character encoding from the stream- Specified by:
getAutodetectCharset
in interfaceParserOptions
-
setAutodetectCharset
public ParserOptions setAutodetectCharset(boolean detect)
Deprecated.Description copied from interface:ParserOptions
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.- Specified by:
setAutodetectCharset
in interfaceParserOptions
-
getMustPreserveWhitespace
public boolean getMustPreserveWhitespace()
Deprecated.Description copied from interface:ParserOptions
If false, the parser will trim leading and trailing whitespace in element and attribute values unless there is an in-scope xml:space="preserve".- Specified by:
getMustPreserveWhitespace
in interfaceParserOptions
-
setMustPreserveWhitespace
public ParserOptions setMustPreserveWhitespace(boolean preserve)
Deprecated.Description copied from interface:ParserOptions
If false, the parser will trim leading and trailing whitespace in element and attribute values unless there is an in-scope xml:space="preserve".- Specified by:
setMustPreserveWhitespace
in interfaceParserOptions
-
getFilterRestrictedCharacters
public boolean getFilterRestrictedCharacters()
Deprecated.Description copied from interface:ParserOptions
If true, the parser will attempt to silently filter out invalid XML characters appearing within the XML document.- Specified by:
getFilterRestrictedCharacters
in interfaceParserOptions
-
setFilterRestrictedCharacters
public ParserOptions setFilterRestrictedCharacters(boolean filter)
Deprecated.Description copied from interface:ParserOptions
If true, the parser will attempt to silently filter out invalid XML characters appearing within the XML document- Specified by:
setFilterRestrictedCharacters
in interfaceParserOptions
-
getFilterRestrictedCharacterReplacement
public char getFilterRestrictedCharacterReplacement()
Deprecated.Description copied from interface:ParserOptions
If getFilterRestrictedCharacters is true, restricted characters will be replaced with the specified character- Specified by:
getFilterRestrictedCharacterReplacement
in interfaceParserOptions
-
setFilterRestrictedCharacterReplacement
public ParserOptions setFilterRestrictedCharacterReplacement(char replacement)
Deprecated.Description copied from interface:ParserOptions
If getFilterRestrictedCharacters is true, restricted characters will be replaced with the specified character- Specified by:
setFilterRestrictedCharacterReplacement
in interfaceParserOptions
-
getCompressionCodecs
public CompressionUtil.CompressionCodec[] getCompressionCodecs()
Deprecated.Description copied from interface:ParserOptions
When parsing an InputStream that contains compressed data, use these codecs to decompress the stream. Only used when parsing an InputStream. Ignored when parsing a Reader- Specified by:
getCompressionCodecs
in interfaceParserOptions
-
setCompressionCodecs
public ParserOptions setCompressionCodecs(CompressionUtil.CompressionCodec... codecs)
Deprecated.Description copied from interface:ParserOptions
When parsing an InputStream that contains compressed data, use these codecs to decompress the stream. Only used when parsing an InputStream. Ignored when parsing a Reader- Specified by:
setCompressionCodecs
in interfaceParserOptions
-
registerEntity
public ParserOptions registerEntity(java.lang.String name, java.lang.String value)
Deprecated.Description copied from interface:ParserOptions
Register a named entity. This provides an escape clause for when feeds use entities that are not supported in XML without a DTD decl. By default, all of the (X)HTML entities are preregistered- Specified by:
registerEntity
in interfaceParserOptions
-
resolveEntity
public java.lang.String resolveEntity(java.lang.String name)
Deprecated.Description copied from interface:ParserOptions
Resolves a value for a named entity. This provides an escape clause for when feeds use entities that are not supported in XML without a DTD decl. By default, all of the (X)HTML entities are preregistered- Specified by:
resolveEntity
in interfaceParserOptions
-
setResolveEntities
public ParserOptions setResolveEntities(boolean resolve)
Deprecated.Description copied from interface:ParserOptions
True if undeclared named entities should be resolved.- Specified by:
setResolveEntities
in interfaceParserOptions
-
getResolveEntities
public boolean getResolveEntities()
Deprecated.Description copied from interface:ParserOptions
True if undeclared named entities should be resolved.- Specified by:
getResolveEntities
in interfaceParserOptions
-
getQNameAliasMap
public java.util.Map<javax.xml.namespace.QName,javax.xml.namespace.QName> getQNameAliasMap()
Deprecated.Description copied from interface:ParserOptions
Get the QName-Alias Mapping (default null)- Specified by:
getQNameAliasMap
in interfaceParserOptions
-
setQNameAliasMap
public ParserOptions setQNameAliasMap(java.util.Map<javax.xml.namespace.QName,javax.xml.namespace.QName> map)
Deprecated.Description copied from interface:ParserOptions
Set the QName-Alias Mapping- Specified by:
setQNameAliasMap
in interfaceParserOptions
-
isQNameAliasMappingEnabled
public boolean isQNameAliasMappingEnabled()
Deprecated.Description copied from interface:ParserOptions
True if QName-Alias mapping is enabled (default is false)- Specified by:
isQNameAliasMappingEnabled
in interfaceParserOptions
-
setQNameAliasMappingEnabled
public ParserOptions setQNameAliasMappingEnabled(boolean enabled)
Deprecated.Description copied from interface:ParserOptions
True if QName-Alias mapping is enabled- Specified by:
setQNameAliasMappingEnabled
in interfaceParserOptions
-
-