gnu.xml.aelfred2
Class JAXPFactory
java.lang.Object
|
+--javax.xml.parsers.SAXParserFactory
|
+--gnu.xml.aelfred2.JAXPFactory
- public final class JAXPFactory
- extends SAXParserFactory
Configurable factory to create an Ælfred2 JAXP parser; required
to bootstrap using JAXP. You should use SAX2 directly where possible,
rather than through JAXP, since that gives you better control.
This class would normally be configured as a platform default factory.
- Author:
- David Brownell
Constructor Summary |
JAXPFactory()
Constructs a factory which normally returns a non-validating
parser. |
Method Summary |
boolean |
getFeature(java.lang.String name)
Retrieves a current factory feature flag setting. |
SAXParser |
newSAXParser()
Returns a new instance of a SAXParser using the platform
default implementation and the currently specified factory
feature flag settings. |
void |
setFeature(java.lang.String name,
boolean value)
Establishes a factory parameter corresponding to the
specified feature flag. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JAXPFactory
public JAXPFactory()
- Constructs a factory which normally returns a non-validating
parser.
newSAXParser
public SAXParser newSAXParser()
throws ParserConfigurationException,
SAXException
- Description copied from class:
SAXParserFactory
- Returns a new instance of a SAXParser using the platform
default implementation and the currently specified factory
feature flag settings.
- Overrides:
newSAXParser
in class SAXParserFactory
- Following copied from class:
javax.xml.parsers.SAXParserFactory
- Throws:
ParserConfigurationException
- when the parameter combination is not supportedSAXNotRecognizedException
- if one of the specified SAX2 feature flags is not recognizedSAXNotSupportedException
- if one of the specified SAX2 feature flags values can
not be set, perhaps because of sequencing requirements
(which could be met by using SAX2 directly)
setFeature
public void setFeature(java.lang.String name,
boolean value)
throws ParserConfigurationException,
SAXNotRecognizedException,
SAXNotSupportedException
- Description copied from class:
SAXParserFactory
- Establishes a factory parameter corresponding to the
specified feature flag.
- Overrides:
setFeature
in class SAXParserFactory
- Following copied from class:
javax.xml.parsers.SAXParserFactory
- Parameters:
name
- identifies the feature flagvalue
- specifies the desired flag value- Throws:
SAXNotRecognizedException
- if the specified SAX2 feature flag is not recognizedSAXNotSupportedException
- if the specified SAX2 feature flag values can not be set,
perhaps because of sequencing requirements (which could
be met by using SAX2 directly)
getFeature
public boolean getFeature(java.lang.String name)
throws ParserConfigurationException,
SAXNotRecognizedException,
SAXNotSupportedException
- Description copied from class:
SAXParserFactory
- Retrieves a current factory feature flag setting.
- Overrides:
getFeature
in class SAXParserFactory
- Following copied from class:
javax.xml.parsers.SAXParserFactory
- Parameters:
name
- identifies the feature flag- Throws:
SAXNotRecognizedException
- if the specified SAX2 feature flag is not recognizedSAXNotSupportedException
- if the specified SAX2 feature flag values can not be
accessed before parsing begins.