@NotThreadSafe public class DOMReaderSettings extends Object implements ICloneable<DOMReaderSettings>, IDOMReaderSettings
| Constructor and Description |
|---|
DOMReaderSettings()
Constructor using the default settings from
DOMReaderDefaultSettings. |
DOMReaderSettings(IDOMReaderSettings aOther)
Copy constructor.
|
public DOMReaderSettings()
DOMReaderDefaultSettings.public DOMReaderSettings(@Nonnull IDOMReaderSettings aOther)
aOther - The settings object to copy from. May not be null.public boolean isNamespaceAware()
isNamespaceAware in interface IDOMReaderSettingstrue if the parser should be namespace aware,
false if not.@Nonnull public final DOMReaderSettings setNamespaceAware(boolean bNamespaceAware)
public boolean isValidating()
isValidating in interface IDOMReaderSettingstrue if the parser should be validating,
false if not.@Nonnull public final DOMReaderSettings setValidating(boolean bValidating)
public boolean isIgnoringElementContentWhitespace()
isIgnoringElementContentWhitespace in interface IDOMReaderSettingstrue if the parser should be element content
whitespace ignoring, false if not.@Nonnull public final DOMReaderSettings setIgnoringElementContentWhitespace(boolean bIgnoringElementContentWhitespace)
public boolean isExpandEntityReferences()
isExpandEntityReferences in interface IDOMReaderSettingstrue if the parser should expand entity references,
false if not.@Nonnull public final DOMReaderSettings setExpandEntityReferences(boolean bExpandEntityReferences)
public boolean isIgnoringComments()
isIgnoringComments in interface IDOMReaderSettingstrue if the parser should ignore comments,
false if not.@Nonnull public final DOMReaderSettings setIgnoringComments(boolean bIgnoringComments)
public boolean isCoalescing()
isCoalescing in interface IDOMReaderSettingstrue if the parser should read CDATA as text,
false if not.@Nonnull public final DOMReaderSettings setCoalescing(boolean bCoalescing)
@Nullable public Schema getSchema()
getSchema in interface IDOMReaderSettingsnull if none should
be used.@Nonnull public final DOMReaderSettings setSchema(@Nullable Schema aSchema)
public boolean isXIncludeAware()
isXIncludeAware in interface IDOMReaderSettingstrue if the parser should be XInclude aware,
false if not.@Nonnull public final DOMReaderSettings setXIncludeAware(boolean bXIncludeAware)
public boolean hasAnyProperties()
hasAnyProperties in interface IBaseXMLReaderSettingstrue if at least one parser property is defined@Nullable public Object getPropertyValue(@Nullable EXMLParserProperty eProperty)
IBaseXMLReaderSettingsgetPropertyValue in interface IBaseXMLReaderSettingseProperty - The property to use. May be null.null if no such property was found.@Nonnull @ReturnsMutableCopy public ICommonsMap<EXMLParserProperty,Object> getAllPropertyValues()
getAllPropertyValues in interface IBaseXMLReaderSettingsnull.@Nonnull public final DOMReaderSettings setPropertyValue(@Nonnull EXMLParserProperty eProperty, @Nullable Object aPropertyValue)
@Nonnull public final DOMReaderSettings setPropertyValues(@Nullable Map<EXMLParserProperty,?> aProperties)
@Nonnull public final EChange removePropertyValue(@Nullable EXMLParserProperty eProperty)
@Nullable public Locale getLocale()
getLocale in interface IBaseXMLReaderSettingsnull and therefore the XML parser will use the system
default locale.public DOMReaderSettings setLocale(@Nullable Locale aLocale)
public boolean hasAnyFeature()
hasAnyFeature in interface IBaseXMLReaderSettingstrue if at least one parser feature is defined,
false if not@Nullable public Boolean getFeatureValue(@Nullable EXMLParserFeature eFeature)
IBaseXMLReaderSettingsgetFeatureValue in interface IBaseXMLReaderSettingseFeature - The feature to search. May be null.null if this feature is undefined.@Nonnull @ReturnsMutableCopy public ICommonsMap<EXMLParserFeature,Boolean> getAllFeatureValues()
getAllFeatureValues in interface IBaseXMLReaderSettings@Nonnull public final DOMReaderSettings setFeatureValue(@Nonnull EXMLParserFeature eFeature, boolean bValue)
@Nonnull public final DOMReaderSettings setFeatureValue(@Nonnull EXMLParserFeature eFeature, @Nullable Boolean aValue)
@Nonnull public final DOMReaderSettings setFeatureValues(@Nullable Map<EXMLParserFeature,Boolean> aValues)
@Nonnull public final EChange removeFeature(@Nullable EXMLParserFeature eFeature)
public boolean requiresNewXMLParser()
IDOMReaderSettingsDocumentBuilderFactory or if a pooled default
object can be used.requiresNewXMLParser in interface IBaseXMLReaderSettingsrequiresNewXMLParser in interface IDOMReaderSettingstrue if a separate
DocumentBuilderFactory is required,
false if not.@Nullable public EntityResolver getEntityResolver()
getEntityResolver in interface IBaseXMLReaderSettingsnull.@Nonnull public final DOMReaderSettings setEntityResolver(@Nullable EntityResolver aEntityResolver)
@Nullable public ErrorHandler getErrorHandler()
getErrorHandler in interface IBaseXMLReaderSettingsnull if no
special error handler is needed.@Nonnull public final DOMReaderSettings setErrorHandler(@Nullable ErrorHandler aErrorHandler)
@Nonnull public IExceptionCallback<Throwable> getExceptionHandler()
getExceptionHandler in interface IBaseXMLReaderSettingsnull.@Nonnull public final DOMReaderSettings setExceptionHandler(@Nonnull IExceptionCallback<Throwable> aExceptionHandler)
public boolean isRequiresNewXMLParserExplicitly()
isRequiresNewXMLParserExplicitly in interface IDOMReaderSettingstrue if a new XML parser is explicitly required for
this instance.@Nonnull public final DOMReaderSettings setRequiresNewXMLParserExplicitly(boolean bRequiresNewXMLParserExplicitly)
@Nonnull public DOMReaderSettings getClone()
getClone in interface ICloneable<DOMReaderSettings>public void applyToDocumentBuilderFactory(@Nonnull DocumentBuilderFactory aDocumentBuilderFactory)
IDOMReaderSettingsDocumentBuilderFactory object.applyToDocumentBuilderFactory in interface IDOMReaderSettingsaDocumentBuilderFactory - The DocumentBuilderFactory to apply the settings onto. May
not be null.public void applyToDocumentBuilder(@Nonnull DocumentBuilder aDocumentBuilder)
IDOMReaderSettingsDocumentBuilder
object.applyToDocumentBuilder in interface IDOMReaderSettingsaDocumentBuilder - The DocumentBuilder to apply the settings onto. May not be
null.Copyright © 2014–2016 Philip Helger. All rights reserved.