Main Page Packages Class Hierarchy Compound List File List Compound Members

# JAXPDOMTestDocumentBuilderFactory Class Reference

Inherits DOMTestDocumentBuilderFactory.

List of all members.

## Public Methods
| JAXPDOMTestDocumentBuilderFactory (DocumentBuilderFactory baseFactory, DocumentBuilderSetting[] settings) throws DOMTestIncompatibleException
DOMTestDocumentBuilderFactory | newInstance (DocumentBuilderSetting[] newSettings) throws DOMTestIncompatibleException
Document | load (java.net.URL url) throws DOMTestLoadException
DOMImplementation | getDOMImplementation ()
boolean | hasFeature (String feature, String version)
boolean | isCoalescing ()
boolean | isExpandEntityReferences ()
boolean | isIgnoringElementContentWhitespace ()
boolean | isNamespaceAware ()
boolean | isValidating ()
## Static Public Methods
DocumentBuilderSetting[] | getConfiguration1 ()
DocumentBuilderSetting[] | getConfiguration2 ()

## Detailed Description

This class implements the generic parser and configuation abstract class for JAXP supporting parsers.

Definition at line 31 of file JAXPDOMTestDocumentBuilderFactory.java.

## Constructor & Destructor Documentation

JAXPDOMTestDocumentBuilderFactory::JAXPDOMTestDocumentBuilderFactory | ( | DocumentBuilderFactory | baseFactory,
|  | DocumentBuilderSetting | settings[]
| ) | `[inline]`

  | Creates a JAXP implementation of DOMTestDocumentBuilderFactory. Parameters:
  factory | null for default JAXP provider. If not null, factory will be mutated in constructor and should be released by calling code upon return.
  settings | array of settings, may be null.
Definition at line 44 of file JAXPDOMTestDocumentBuilderFactory.java. Referenced by newInstance().
    00047                                         {
    00048     super(settings);
    00049     if(baseFactory == null) {
    00050       factory = DocumentBuilderFactory.newInstance();
    00051     }
    00052     else {
    00053       factory = baseFactory;
    00054     }
    00055     //
    00056     //    apply settings to selected document builder
    00057     //         may throw exception if incompatible
    00058     if(settings != null) {
    00059       for(int i = 0; i < settings.length; i++) {
    00060         settings[i].applySetting(factory);
    00061       }
    00062     }
    00063     try {
    00064       this.builder = factory.newDocumentBuilder();
    00065     }
    00066     catch(ParserConfigurationException ex) {
    00067       throw new DOMTestIncompatibleException(ex,null);
    00068     }
    00069   }

## Member Function Documentation

DocumentBuilderSetting [] JAXPDOMTestDocumentBuilderFactory::getConfiguration1 | ( |  | ) | `[inline, static]`

| Definition at line 161 of file JAXPDOMTestDocumentBuilderFactory.java. References DocumentBuilderSetting::notCoalescing, DocumentBuilderSetting::notExpandEntityReferences, DocumentBuilderSetting::notIgnoringElementContentWhitespace, DocumentBuilderSetting::notNamespaceAware, and DocumentBuilderSetting::notValidating.
    00162   {
    00163     return new DocumentBuilderSetting[] {
    00164           DocumentBuilderSetting.notCoalescing,
    00165           DocumentBuilderSetting.notExpandEntityReferences,
    00166           DocumentBuilderSetting.notIgnoringElementContentWhitespace,
    00167           DocumentBuilderSetting.notNamespaceAware,
    00168           DocumentBuilderSetting.notValidating };
    00169   }

DocumentBuilderSetting [] JAXPDOMTestDocumentBuilderFactory::getConfiguration2 | ( |  | ) | `[inline, static]`

| Definition at line 171 of file JAXPDOMTestDocumentBuilderFactory.java. References DocumentBuilderSetting::expandEntityReferences, DocumentBuilderSetting::ignoringElementContentWhitespace, DocumentBuilderSetting::namespaceAware, DocumentBuilderSetting::notCoalescing, and DocumentBuilderSetting::validating.
    00171                                                              {
    00172       return new DocumentBuilderSetting[] {
    00173           DocumentBuilderSetting.notCoalescing,
    00174           DocumentBuilderSetting.expandEntityReferences,
    00175           DocumentBuilderSetting.ignoringElementContentWhitespace,
    00176           DocumentBuilderSetting.namespaceAware,
    00177           DocumentBuilderSetting.validating };
    00178
    00179   }

DOMImplementation JAXPDOMTestDocumentBuilderFactory::getDOMImplementation | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTestDocumentBuilderFactory. Definition at line 132 of file JAXPDOMTestDocumentBuilderFactory.java.
    00132                                                   {
    00133     return builder.getDOMImplementation();
    00134   }

boolean JAXPDOMTestDocumentBuilderFactory::hasFeature | ( | String | feature,
|  | String | version
| ) | `[inline, virtual]`

| Reimplemented from DOMTestDocumentBuilderFactory. Definition at line 136 of file JAXPDOMTestDocumentBuilderFactory.java.
    00136                                                             {
    00137     return builder.getDOMImplementation().hasFeature(feature,version);
    00138   }

boolean JAXPDOMTestDocumentBuilderFactory::isCoalescing | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTestDocumentBuilderFactory. Definition at line 141 of file JAXPDOMTestDocumentBuilderFactory.java.
    00141                                   {
    00142       return factory.isCoalescing();
    00143     }

boolean JAXPDOMTestDocumentBuilderFactory::isExpandEntityReferences | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTestDocumentBuilderFactory. Definition at line 145 of file JAXPDOMTestDocumentBuilderFactory.java.
    00145                                               {
    00146       return factory.isExpandEntityReferences();
    00147     }

boolean JAXPDOMTestDocumentBuilderFactory::isIgnoringElementContentWhitespace | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTestDocumentBuilderFactory. Definition at line 149 of file JAXPDOMTestDocumentBuilderFactory.java.
    00149                                                         {
    00150       return factory.isIgnoringElementContentWhitespace();
    00151     }

boolean JAXPDOMTestDocumentBuilderFactory::isNamespaceAware | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTestDocumentBuilderFactory. Definition at line 153 of file JAXPDOMTestDocumentBuilderFactory.java.
    00153                                       {
    00154       return factory.isNamespaceAware();
    00155     }

boolean JAXPDOMTestDocumentBuilderFactory::isValidating | ( |  | ) | `[inline, virtual]`

| Reimplemented from DOMTestDocumentBuilderFactory. Definition at line 157 of file JAXPDOMTestDocumentBuilderFactory.java.
    00157                                   {
    00158       return factory.isValidating();
    00159     }

Document JAXPDOMTestDocumentBuilderFactory::load | ( | java.net.URL | url | ) | `[inline, virtual]`

| Reimplemented from DOMTestDocumentBuilderFactory. Definition at line 113 of file JAXPDOMTestDocumentBuilderFactory.java.
    00113                                                                      {
    00114     Document doc = null;
    00115     Exception parseException = null;
    00116     try {
    00117       LoadErrorHandler errorHandler = new LoadErrorHandler();
    00118       builder.setErrorHandler(errorHandler);
    00119       doc = builder.parse(url.openStream(),url.toString());
    00120       parseException = errorHandler.getFirstException();
    00121     }
    00122     catch(Exception ex) {
    00123       parseException = ex;
    00124     }
    00125     builder.setErrorHandler(null);
    00126     if(parseException != null) {
    00127       throw new DOMTestLoadException(parseException);
    00128     }
    00129     return doc;
    00130   }

DOMTestDocumentBuilderFactory JAXPDOMTestDocumentBuilderFactory::newInstance | ( | DocumentBuilderSetting | newSettings[] | ) | `[inline, virtual]`

  | Returns an instance of DOMTestDocumentBuilderFactory with the settings from the argument list and any non-revoked settings from the current object. Parameters:
  settings | array of settings, may be null.
Reimplemented from DOMTestDocumentBuilderFactory. Definition at line 71 of file JAXPDOMTestDocumentBuilderFactory.java. References JAXPDOMTestDocumentBuilderFactory(), and DOMTestDocumentBuilderFactory::mergeSettings().
    00072                                         {
    00073     if(newSettings == null) {
    00074       return this;
    00075     }
    00076     DocumentBuilderSetting[] mergedSettings = mergeSettings(newSettings);
    00077     DocumentBuilderFactory newFactory = factory.newInstance();
    00078     return new JAXPDOMTestDocumentBuilderFactory(newFactory,mergedSettings);
    00079   }

The documentation for this class was generated from the following file:

- JAXPDOMTestDocumentBuilderFactory.java