org.w3c.domts
Class DocumentBuilderSetting

java.lang.Object
  extended byorg.w3c.domts.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
protected DocumentBuilderSetting(java.lang.String property, boolean value, DocumentBuilderSettingStrategy strategy)
          Protected constructor, use static members for supported settings.
 
Method Summary
 void applySetting(javax.xml.parsers.DocumentBuilderFactory factory)
          Attempts to change builder to have this setting.
 java.lang.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.
 java.lang.String toString()
          Gets a string representation of the setting.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

coalescing

public static final DocumentBuilderSetting coalescing
coalescing = true.


notCoalescing

public static final DocumentBuilderSetting notCoalescing
coalescing = false.


expandEntityReferences

public static final DocumentBuilderSetting expandEntityReferences
expandEntityReferences = false.


notExpandEntityReferences

public static final DocumentBuilderSetting notExpandEntityReferences
expandEntityReferences = true.


ignoringElementContentWhitespace

public static final DocumentBuilderSetting ignoringElementContentWhitespace
ignoringElementContentWhitespace = true.


notIgnoringElementContentWhitespace

public static final DocumentBuilderSetting notIgnoringElementContentWhitespace
ignoringElementContentWhitespace = false.


namespaceAware

public static final DocumentBuilderSetting namespaceAware
namespaceAware = true.


notNamespaceAware

public static final DocumentBuilderSetting notNamespaceAware
namespaceAware = false.


validating

public static final DocumentBuilderSetting validating
validating = true.


notValidating

public static final DocumentBuilderSetting notValidating
validating = false.


signed

public static final DocumentBuilderSetting signed
signed = true.


notSigned

public static final DocumentBuilderSetting notSigned
signed = false.


hasNullString

public static final DocumentBuilderSetting hasNullString
hasNullString = true.


notHasNullString

public static final DocumentBuilderSetting notHasNullString
hasNullString = false.


schemaValidating

public static final DocumentBuilderSetting schemaValidating
Schema validating enabled.


notSchemaValidating

public static final DocumentBuilderSetting notSchemaValidating
Schema validating disabled.


ignoringComments

public static final DocumentBuilderSetting ignoringComments
Comments ignored.


notIgnoringComments

public static final DocumentBuilderSetting notIgnoringComments
Comments preserved.

Constructor Detail

DocumentBuilderSetting

protected DocumentBuilderSetting(java.lang.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

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.

applySetting

public final void applySetting(javax.xml.parsers.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 java.lang.String getProperty()
Gets the property name.

Returns:
property name

getValue

public final boolean getValue()
Gets the property value.

Returns:
property value

toString

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

Returns:
string representation