org.w3c.domts

Class DocumentBuilderSetting

public final class DocumentBuilderSetting extends Object

This class is an parser setting, such as non-validating or entity-expanding.
Field Summary
static DocumentBuilderSettingcoalescing
coalescing = true.
static DocumentBuilderSettingexpandEntityReferences
expandEntityReferences = false.
static DocumentBuilderSettinghasNullString
hasNullString = true.
static DocumentBuilderSettingignoringComments
Comments ignored.
static DocumentBuilderSettingignoringElementContentWhitespace
ignoringElementContentWhitespace = true.
static DocumentBuilderSettingnamespaceAware
namespaceAware = true.
static DocumentBuilderSettingnotCoalescing
coalescing = false.
static DocumentBuilderSettingnotExpandEntityReferences
expandEntityReferences = true.
static DocumentBuilderSettingnotHasNullString
hasNullString = false.
static DocumentBuilderSettingnotIgnoringComments
Comments preserved.
static DocumentBuilderSettingnotIgnoringElementContentWhitespace
ignoringElementContentWhitespace = false.
static DocumentBuilderSettingnotNamespaceAware
namespaceAware = false.
static DocumentBuilderSettingnotSchemaValidating
Schema validating disabled.
static DocumentBuilderSettingnotSigned
signed = false.
static DocumentBuilderSettingnotValidating
validating = false.
static DocumentBuilderSettingschemaValidating
Schema validating enabled.
static DocumentBuilderSettingsigned
signed = true.
static DocumentBuilderSettingvalidating
validating = true.
Constructor Summary
protected DocumentBuilderSetting(String property, boolean value, DocumentBuilderSettingStrategy strategy)
Protected constructor, use static members for supported settings.
Method Summary
voidapplySetting(DocumentBuilderFactory factory)
Attempts to change builder to have this setting.
StringgetProperty()
Gets the property name.
booleangetValue()
Gets the property value.
booleanhasConflict(DocumentBuilderSetting other)
Returns true if the settings have a conflict or are identical.
booleanhasSetting(DOMTestDocumentBuilderFactory factory)
Determines current value of setting.
StringtoString()
Gets a string representation of the setting.

Field Detail

coalescing

public static final DocumentBuilderSetting coalescing
coalescing = true.

expandEntityReferences

public static final DocumentBuilderSetting expandEntityReferences
expandEntityReferences = false.

hasNullString

public static final DocumentBuilderSetting hasNullString
hasNullString = true.

ignoringComments

public static final DocumentBuilderSetting ignoringComments
Comments ignored.

ignoringElementContentWhitespace

public static final DocumentBuilderSetting ignoringElementContentWhitespace
ignoringElementContentWhitespace = true.

namespaceAware

public static final DocumentBuilderSetting namespaceAware
namespaceAware = true.

notCoalescing

public static final DocumentBuilderSetting notCoalescing
coalescing = false.

notExpandEntityReferences

public static final DocumentBuilderSetting notExpandEntityReferences
expandEntityReferences = true.

notHasNullString

public static final DocumentBuilderSetting notHasNullString
hasNullString = false.

notIgnoringComments

public static final DocumentBuilderSetting notIgnoringComments
Comments preserved.

notIgnoringElementContentWhitespace

public static final DocumentBuilderSetting notIgnoringElementContentWhitespace
ignoringElementContentWhitespace = false.

notNamespaceAware

public static final DocumentBuilderSetting notNamespaceAware
namespaceAware = false.

notSchemaValidating

public static final DocumentBuilderSetting notSchemaValidating
Schema validating disabled.

notSigned

public static final DocumentBuilderSetting notSigned
signed = false.

notValidating

public static final DocumentBuilderSetting notValidating
validating = false.

schemaValidating

public static final DocumentBuilderSetting schemaValidating
Schema validating enabled.

signed

public static final DocumentBuilderSetting signed
signed = true.

validating

public static final DocumentBuilderSetting validating
validating = true.

Constructor Detail

DocumentBuilderSetting

protected DocumentBuilderSetting(String property, boolean value, DocumentBuilderSettingStrategy strategy)
Protected constructor, use static members for supported settings.

Parameters: property property name, follows JAXP. value property value strategy strategy, may not be null

Method Detail

applySetting

public final void applySetting(DocumentBuilderFactory factory)
Attempts to change builder to have this setting.

Parameters: factory DocumentBuilderFactory Factory for DOM builders

Throws: DOMTestIncompatibleException if factory does not support the setting

getProperty

public final String getProperty()
Gets the property name.

Returns: property name

getValue

public final boolean getValue()
Gets the property value.

Returns: property value

hasConflict

public final boolean hasConflict(DocumentBuilderSetting other)
Returns true if the settings have a conflict or are identical.

Parameters: other other setting, may not be null.

Returns: true if this setting and the specified setting conflict

hasSetting

public final boolean hasSetting(DOMTestDocumentBuilderFactory factory)
Determines current value of setting.

Parameters: factory DOMTestDocumentBuilderFactory factory

Returns: boolean true if property enabled.

toString

public final String toString()
Gets a string representation of the setting.

Returns: string representation