org.norther.tammi.core.xml
Interface DOMBuilderFactory

All Superinterfaces:
ObjectFactory<DocumentBuilder>
All Known Implementing Classes:
DefaultDOMBuilderFactory

public interface DOMBuilderFactory
extends ObjectFactory<DocumentBuilder>

An interface to JAXP XML DOM builder factories.

Version:
$Id: DOMBuilderFactory.java,v 1.13 2009/09/28 15:08:44 cvsimp Exp $
Author:
Ilkka Priha

Field Summary
static String DOM_BUILDER_FACTORY_PROPERTY
          The DOM builder factory system property.
 
Method Summary
 Object getAttribute(String name)
          Gets an attribute of the factory.
 String getDocumentBuilderFactory()
          Gets the class name of the implemention of the factory.
 boolean isCoalescing()
          Indicates whether or not the factory is configured to produce parsers which converts CDATA nodes to Text nodes and appends it to the adjacent (if any) Text node.
 boolean isExpandEntityReferences()
          Indicates whether or not the factory is configured to produce parsers which expand entity reference nodes.
 boolean isIgnoreElementContentWhitespace()
          Indicates whether or not the factory is configured to produce parsers which ignore ignorable whitespace in element content.
 boolean isIgnoringComments()
          Indicates whether or not the factory is configured to produce parsers which ignores comments.
 boolean isNamespaceAware()
          Indicates whether or not the factory is configured to produce parsers which are namespace aware.
 boolean isValidating()
          Indicates whether or not the factory is configured to produce parsers which validate the XML content during parse.
 void setAttribute(String name, Object value)
          Sets an attribute of the factory.
 void setCoalescing(boolean flag)
          Specifies that the parser produced by this code will convert CDATA nodes to Text nodes and append it to the adjacent (if any) text node.
 void setDocumentBuilderFactory(String factory)
          Sets the class name of the implemention of the factory.
 void setExpandEntityReferences(boolean flag)
          Specifies that the parser produced by this code will expand entity reference nodes.
 void setIgnoreElementContentWhitespace(boolean flag)
          Specifies that the parsers created by this factory must eliminate whitespace in element content (sometimes known loosely as 'ignorable whitespace') when parsing XML documents (see XML Rec 2.10).
 void setIgnoringComments(boolean flag)
          Specifies that the parser produced by this code will ignore comments.
 void setNamespaceAware(boolean flag)
          Specifies that the parser produced by this code will provide support for XML namespaces.
 void setValidating(boolean flag)
          Specifies that the parser produced by this code will validate documents as they are parsed.
 
Methods inherited from interface org.norther.tammi.core.base.ObjectFactory
getInstance, getInstance, getInstance, getInstance, isLoaderSupported
 

Field Detail

DOM_BUILDER_FACTORY_PROPERTY

static final String DOM_BUILDER_FACTORY_PROPERTY
The DOM builder factory system property.

See Also:
Constant Field Values
Method Detail

getDocumentBuilderFactory

String getDocumentBuilderFactory()
Gets the class name of the implemention of the factory.

Returns:
the class name.

setDocumentBuilderFactory

void setDocumentBuilderFactory(String factory)
                               throws LogException
Sets the class name of the implemention of the factory.

Parameters:
factory - the class name.
Throws:
LogException - if the factory is already initialized.

getAttribute

Object getAttribute(String name)
Gets an attribute of the factory.

Parameters:
name - the name of the attribute.
Returns:
the value of the attribute.

setAttribute

void setAttribute(String name,
                  Object value)
                  throws LogException
Sets an attribute of the factory.

Parameters:
name - the name of the attribute.
value - the value of the attribute.
Throws:
LogException - for attribute errors.

isCoalescing

boolean isCoalescing()
Indicates whether or not the factory is configured to produce parsers which converts CDATA nodes to Text nodes and appends it to the adjacent (if any) Text node.

Returns:
true for coalescing parsers, false otherwise.

setCoalescing

void setCoalescing(boolean flag)
Specifies that the parser produced by this code will convert CDATA nodes to Text nodes and append it to the adjacent (if any) text node. By default the value of this is set to false.

Parameters:
flag - true to convert CDATA nodes to Text nodes, false otherwise.

isExpandEntityReferences

boolean isExpandEntityReferences()
Indicates whether or not the factory is configured to produce parsers which expand entity reference nodes.

Returns:
true for expanding parsers, false otherwise.

setExpandEntityReferences

void setExpandEntityReferences(boolean flag)
Specifies that the parser produced by this code will expand entity reference nodes. By default the value of this is set to true.

Parameters:
flag - true to expand entity reference nodes, false otherwise.

isIgnoreElementContentWhitespace

boolean isIgnoreElementContentWhitespace()
Indicates whether or not the factory is configured to produce parsers which ignore ignorable whitespace in element content.

Returns:
true for parsers ignoring whitespace, false otherwise.

setIgnoreElementContentWhitespace

void setIgnoreElementContentWhitespace(boolean flag)
Specifies that the parsers created by this factory must eliminate whitespace in element content (sometimes known loosely as 'ignorable whitespace') when parsing XML documents (see XML Rec 2.10). Note that only whitespace which is directly contained within element content that has an element only content model (see XML Rec 3.2.1) will be eliminated. Due to reliance on the content model this setting requires the parser to be in validating mode. By default the value of this is set to false.

Parameters:
flag - true to ignore whitespace, false otherwise.

isIgnoringComments

boolean isIgnoringComments()
Indicates whether or not the factory is configured to produce parsers which ignores comments.

Returns:
true for parsers ignoring comments, false otherwise.

setIgnoringComments

void setIgnoringComments(boolean flag)
Specifies that the parser produced by this code will ignore comments. By default the value of this is set to false.

Parameters:
flag - true to ignore comments, false otherwise.

isNamespaceAware

boolean isNamespaceAware()
Indicates whether or not the factory is configured to produce parsers which are namespace aware.

Returns:
true for namespace aware parsers, false otherwise.

setNamespaceAware

void setNamespaceAware(boolean flag)
Specifies that the parser produced by this code will provide support for XML namespaces. By default the value of this is set to false.

Parameters:
flag - true to support XML namespaces, false otherwise.

isValidating

boolean isValidating()
Indicates whether or not the factory is configured to produce parsers which validate the XML content during parse.

Returns:
true for validating parsers, false otherwise.

setValidating

void setValidating(boolean flag)
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.

Parameters:
flag - true to validate documents, false otherwise.


Copyright © 2004 The Norther Organization. All rights reserved.