org.norther.tammi.core.xml
Interface SAXParserFactory

All Superinterfaces:
ObjectFactory<SAXParser>
All Known Implementing Classes:
DefaultSAXParserFactory

public interface SAXParserFactory
extends ObjectFactory<SAXParser>

An interface to JAXP XML SAX parser factories.

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

Field Summary
static String SAX_PARSER_FACTORY_PROPERTY
          The SAX parser factory system property.
 
Method Summary
 boolean getFeature(String name)
          Gets the particular property requested for in the underlying implementation of org.xml.sax.XMLReader.
 String getSaxParserFactory()
          Gets the class name of the implemention of the factory.
 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 setFeature(String name, boolean value)
          Sets the particular feature in the underlying implementation of org.xml.sax.XMLReader.
 void setNamespaceAware(boolean flag)
          Specifies that the parser produced by this code will provide support for XML namespaces.
 void setSaxParserFactory(String factory)
          Sets the class name of the implemention of the factory.
 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

SAX_PARSER_FACTORY_PROPERTY

static final String SAX_PARSER_FACTORY_PROPERTY
The SAX parser factory system property.

See Also:
Constant Field Values
Method Detail

getSaxParserFactory

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

Returns:
the class name.

setSaxParserFactory

void setSaxParserFactory(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.

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.

getFeature

boolean getFeature(String name)
                   throws LogException
Gets the particular property requested for in the underlying implementation of org.xml.sax.XMLReader.

Parameters:
name - the name of the feature to get.
Returns:
the value of the feature.
Throws:
LogException - on errors.

setFeature

void setFeature(String name,
                boolean value)
                throws LogException
Sets the particular feature in the underlying implementation of org.xml.sax.XMLReader. A list of the core features and properties can be found at http://www.megginson.com/SAX/Java/features.html .

Parameters:
name - the name of the feature to be set.
value - the value of the feature to be set.
Throws:
LogException - on errors.


Copyright © 2004 The Norther Organization. All rights reserved.