org.w3c.domts

Class DocumentBuilderSetting


public final class DocumentBuilderSetting
extends java.lang.Object

This class is an parser setting, such as non-validating or entity-expanding.

Field Summary

static DocumentBuilderSetting
coalescing
coalescing = true.
static DocumentBuilderSetting
expandEntityReferences
expandEntityReferences = false.
static DocumentBuilderSetting
hasNullString
hasNullString = true.
static DocumentBuilderSetting
ignoringComments
Comments ignored.
static DocumentBuilderSetting
ignoringElementContentWhitespace
ignoringElementContentWhitespace = true.
static DocumentBuilderSetting
namespaceAware
namespaceAware = true.
static DocumentBuilderSetting
notCoalescing
coalescing = false.
static DocumentBuilderSetting
notExpandEntityReferences
expandEntityReferences = true.
static DocumentBuilderSetting
notHasNullString
hasNullString = false.
static DocumentBuilderSetting
notIgnoringComments
Comments preserved.
static DocumentBuilderSetting
notIgnoringElementContentWhitespace
ignoringElementContentWhitespace = false.
static DocumentBuilderSetting
notNamespaceAware
namespaceAware = false.
static DocumentBuilderSetting
notSchemaValidating
Schema validating disabled.
static DocumentBuilderSetting
notSigned
signed = false.
static DocumentBuilderSetting
notValidating
validating = false.
static DocumentBuilderSetting
schemaValidating
Schema validating enabled.
static DocumentBuilderSetting
signed
signed = true.
static DocumentBuilderSetting
validating
validating = true.

Constructor Summary

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

Method Summary

void
applySetting(DocumentBuilderFactory factory)
Attempts to change builder to have this setting.
String
getProperty()
Gets the property name.
boolean
getValue()
Gets the property value.
boolean
hasConflict(DocumentBuilderSetting other)
Returns true if the settings have a conflict or are identical.
boolean
hasSetting(DOMTestDocumentBuilderFactory factory)
Determines current value of setting.
String
toString()
Gets a string representation of the setting.

Field Details

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 Details

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 Details

applySetting

public final void applySetting(DocumentBuilderFactory factory)
            throws DOMTestIncompatibleException
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