com.taursys.dom
Class DocumentAdapterBuilderFactory

java.lang.Object
  extended bycom.taursys.dom.DocumentAdapterBuilderFactory

public class DocumentAdapterBuilderFactory
extends java.lang.Object

DocumentAdapterBuilderFactory is used to create DocumentAdapterBuilders based on the factory configuration.

Version:
$Revision: 1.4 $
Author:
marty

Field Summary
static java.lang.String JAXP_BUILDER
           
static java.lang.String SYSTEM_PROPERTY_BUILDER_NAME
           
static java.lang.String TIDY_BUILDER
           
static java.lang.String XERCES_BUILDER
           
 
Method Summary
 boolean getFeature(java.lang.String featureName)
          Returns true if given featureName is enabled, otherwise false See the Specific DocumentAdapterBuilder, DocumentBuilder and/or Parser for the specific Features and Properties.
static DocumentAdapterBuilderFactory getInstance()
          Gets singleton shared instance of DocumentAdapterBuilderFactory
 java.lang.Object getProperty(java.lang.String propertyName)
          Gets the given property.
 boolean isValidating()
          Indicates whether or not the factory is configured to produce parsers which validate the XML content during parse.
 DocumentAdapterBuilder newDocumentAdapterBuilder()
          Creates a new DocumentAdapterBuilder and initializes it based on this factory's settings.
static DocumentAdapterBuilderFactory newInstance()
          Gets a new, private instance of DocumentAdapterBuilderFactory
 void setFeature(java.lang.String featureName, boolean value)
          Enables the given featureName if value is true, otherwise disables feature.
 void setProperty(java.lang.String propertyName, java.lang.Object value)
          Sets the given property to the given value.
 void setValidating(boolean b)
          Specifies that the parser produced by this code will validate documents as they are parsed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIDY_BUILDER

public static final java.lang.String TIDY_BUILDER
See Also:
Constant Field Values

JAXP_BUILDER

public static final java.lang.String JAXP_BUILDER
See Also:
Constant Field Values

XERCES_BUILDER

public static final java.lang.String XERCES_BUILDER
See Also:
Constant Field Values

SYSTEM_PROPERTY_BUILDER_NAME

public static final java.lang.String SYSTEM_PROPERTY_BUILDER_NAME
See Also:
Constant Field Values
Method Detail

newInstance

public static DocumentAdapterBuilderFactory newInstance()
Gets a new, private instance of DocumentAdapterBuilderFactory

Returns:
a new, private instance of DocumentAdapterBuilderFactory

getInstance

public static DocumentAdapterBuilderFactory getInstance()
Gets singleton shared instance of DocumentAdapterBuilderFactory

Returns:
singleton shared instance of DocumentAdapterBuilderFactory

newDocumentAdapterBuilder

public DocumentAdapterBuilder newDocumentAdapterBuilder()
                                                 throws DocumentAdapterBuilderException
Creates a new DocumentAdapterBuilder and initializes it based on this factory's settings. The specific builder class returned is determined by the following rules:

Returns:
a new DocumentAdapterBuilder
Throws:
DocumentAdapterBuilderException - if cannot create and initialize a new DocumentAdapterBuilder

setProperty

public void setProperty(java.lang.String propertyName,
                        java.lang.Object value)
Sets the given property to the given value. A null value removes the given property (un-sets the property). See the Specific DocumentAdapterBuilder, DocumentBuilder and/or Parser for the specific Features and Properties.

Parameters:
propertyName - name of the property to set
value - for the property or null to un-set

getProperty

public java.lang.Object getProperty(java.lang.String propertyName)
Gets the given property. Returns null if the property has not been set. See the Specific DocumentAdapterBuilder, DocumentBuilder and/or Parser for the specific Features and Properties.

Parameters:
propertyName - to retrieve
Returns:
value of property or null if not set.

setFeature

public void setFeature(java.lang.String featureName,
                       boolean value)
Enables the given featureName if value is true, otherwise disables feature. See the Specific DocumentAdapterBuilder, DocumentBuilder and/or Parser for the specific Features and Properties.

Parameters:
featureName - to enable/disable
value - true to enable, false to disable

getFeature

public boolean getFeature(java.lang.String featureName)
Returns true if given featureName is enabled, otherwise false See the Specific DocumentAdapterBuilder, DocumentBuilder and/or Parser for the specific Features and Properties.

Parameters:
featureName - to query
Returns:
true if enabled, otherwise false

isValidating

public boolean isValidating()
Indicates whether or not the factory is configured to produce parsers which validate the XML content during parse. Validating also controls whether or not the parser will load the external dtd for the document.

Returns:
true if the factory is configured to produce parsers which validate the XML content during parse; false otherwise.

setValidating

public void setValidating(boolean b)
Specifies that the parser produced by this code will validate documents as they are parsed. By default the value of this is set to false. Validating also controls whether or not the parser will load the external dtd for the document.

Parameters:
b - true if the parser produced will validate documents as they are parsed; false otherwise.


Copyright © 2007 Martin T Phelan. All Rights Reserved.