Public Methods | |
| DOMTestDocumentBuilderFactory (DocumentBuilderSetting[] settings) throws DOMTestIncompatibleException | |
| abstract DOMTestDocumentBuilderFactory | newInstance (DocumentBuilderSetting[] settings) throws DOMTestIncompatibleException |
| abstract DOMImplementation | getDOMImplementation () |
| abstract boolean | hasFeature (String feature, String version) |
| abstract Document | load (java.net.URL url) throws DOMTestLoadException |
| String | addExtension (String testFileName) |
| abstract boolean | isCoalescing () |
| abstract boolean | isExpandEntityReferences () |
| abstract boolean | isIgnoringElementContentWhitespace () |
| abstract boolean | isNamespaceAware () |
| abstract boolean | isValidating () |
| final DocumentBuilderSetting[] | getActualSettings () |
Protected Methods | |
| DocumentBuilderSetting[] | mergeSettings (DocumentBuilderSetting[] newSettings) |
Definition at line 47 of file DOMTestDocumentBuilderFactory.java.
|
|
Constructor
Definition at line 58 of file DOMTestDocumentBuilderFactory.java.
00059 {
00060 if(settings == null) {
00061 this.settings = new DocumentBuilderSetting[0];
00062 }
00063 else {
00064 this.settings = (DocumentBuilderSetting[]) settings.clone();
00065 }
00066 }
|
|
|
Reimplemented in BatikTestDocumentBuilderFactory. Definition at line 128 of file DOMTestDocumentBuilderFactory.java. Referenced by DOMTest::load().
00128 {
00129 return testFileName + ".xml";
00130 }
|
|
|
Creates an array of all determinable settings for the DocumentBuilder including those at implementation defaults.
Definition at line 147 of file DOMTestDocumentBuilderFactory.java. References DocumentBuilderSetting::coalescing, DocumentBuilderSetting::expandEntityReferences, DocumentBuilderSetting::hasNullString, DocumentBuilderSetting::hasSetting(), DocumentBuilderSetting::ignoringElementContentWhitespace, DocumentBuilderSetting::namespaceAware, DocumentBuilderSetting::notCoalescing, DocumentBuilderSetting::notExpandEntityReferences, DocumentBuilderSetting::notHasNullString, DocumentBuilderSetting::notIgnoringElementContentWhitespace, DocumentBuilderSetting::notNamespaceAware, DocumentBuilderSetting::notSigned, DocumentBuilderSetting::notValidating, DocumentBuilderSetting::signed, and DocumentBuilderSetting::validating.
00147 {
00148
00149 DocumentBuilderSetting[] allSettings = new DocumentBuilderSetting[] {
00150 DocumentBuilderSetting.coalescing,
00151 DocumentBuilderSetting.expandEntityReferences,
00152 DocumentBuilderSetting.hasNullString,
00153 DocumentBuilderSetting.ignoringElementContentWhitespace,
00154 DocumentBuilderSetting.namespaceAware,
00155 DocumentBuilderSetting.signed,
00156 DocumentBuilderSetting.validating,
00157 DocumentBuilderSetting.notCoalescing,
00158 DocumentBuilderSetting.notExpandEntityReferences,
00159 DocumentBuilderSetting.notHasNullString,
00160 DocumentBuilderSetting.notIgnoringElementContentWhitespace,
00161 DocumentBuilderSetting.notNamespaceAware,
00162 DocumentBuilderSetting.notSigned,
00163 DocumentBuilderSetting.notValidating
00164 };
00165
00166 List list = new ArrayList(allSettings.length /2);
00167 for(int i = 0; i < allSettings.length; i++) {
00168 if(allSettings[i].hasSetting(this)) {
00169 list.add(allSettings[i]);
00170 }
00171 }
00172 DocumentBuilderSetting[] settings = new DocumentBuilderSetting[list.size()];
00173 for(int i = 0; i < settings.length; i++) {
00174 settings[i] = (DocumentBuilderSetting) list.get(i);
00175 }
00176 return settings;
00177 }
|
|
|
Reimplemented in BatikTestDocumentBuilderFactory, DOM4JTestDocumentBuilderFactory, and JAXPDOMTestDocumentBuilderFactory. |
|
||||||||||||
|
Reimplemented in BatikTestDocumentBuilderFactory, DOM4JTestDocumentBuilderFactory, and JAXPDOMTestDocumentBuilderFactory. Referenced by DOMTest::hasFeature(). |
|
|
Reimplemented in BatikTestDocumentBuilderFactory, DOM4JTestDocumentBuilderFactory, and JAXPDOMTestDocumentBuilderFactory. Referenced by DOMTest::isCoalescing(). |
|
|
Reimplemented in BatikTestDocumentBuilderFactory, DOM4JTestDocumentBuilderFactory, and JAXPDOMTestDocumentBuilderFactory. Referenced by DOMTest::isExpandEntityReferences(). |
|
|
Reimplemented in BatikTestDocumentBuilderFactory, DOM4JTestDocumentBuilderFactory, and JAXPDOMTestDocumentBuilderFactory. Referenced by DOMTest::isIgnoringElementContentWhitespace(). |
|
|
Reimplemented in BatikTestDocumentBuilderFactory, DOM4JTestDocumentBuilderFactory, and JAXPDOMTestDocumentBuilderFactory. Referenced by DOMTest::isNamespaceAware(). |
|
|
Reimplemented in BatikTestDocumentBuilderFactory, DOM4JTestDocumentBuilderFactory, and JAXPDOMTestDocumentBuilderFactory. Referenced by DOMTest::isValidating(). |
|
|
Reimplemented in BatikTestDocumentBuilderFactory, DOM4JTestDocumentBuilderFactory, and JAXPDOMTestDocumentBuilderFactory. Referenced by DOMTest::load(). |
|
|
Merges the settings from the specific test case or suite with the existing (typically session) settings.
Definition at line 89 of file DOMTestDocumentBuilderFactory.java. References DocumentBuilderSetting::hasConflict(). Referenced by JAXPDOMTestDocumentBuilderFactory::newInstance(), and BatikTestDocumentBuilderFactory::newInstance().
00090 {
00091 if(newSettings == null) {
00092 return (DocumentBuilderSetting[]) settings.clone();
00093 }
00094 List mergedSettings = new ArrayList(settings.length + newSettings.length);
00095 //
00096 // all new settings are respected
00097 //
00098 for(int i = 0; i < newSettings.length; i++) {
00099 mergedSettings.add(newSettings[i]);
00100 }
00101 //
00102 // for all previous settings, take only those that
00103 // do not conflict with existing settings
00104 for(int i = 0; i < settings.length; i++) {
00105 DocumentBuilderSetting setting = settings[i];
00106 boolean hasConflict = false;
00107 for(int j = 0; j < newSettings.length; j++) {
00108 DocumentBuilderSetting newSetting = newSettings[j];
00109 if(newSetting.hasConflict(setting) || setting.hasConflict(newSetting)) {
00110 hasConflict = true;
00111 break;
00112 }
00113 }
00114 if(!hasConflict) {
00115 mergedSettings.add(setting);
00116 }
00117 }
00118
00119 DocumentBuilderSetting[] mergedArray =
00120 new DocumentBuilderSetting[mergedSettings.size()];
00121 for(int i = 0; i < mergedSettings.size(); i++) {
00122 mergedArray[i] = (DocumentBuilderSetting) mergedSettings.get(i);
00123 }
00124 return mergedArray;
00125 }
|
|
|
Returns an instance of DOMTestDocumentBuilderFactory with the settings from the argument list and any non-revoked settings from the current object.
Reimplemented in BatikTestDocumentBuilderFactory, DOM4JTestDocumentBuilderFactory, and JAXPDOMTestDocumentBuilderFactory. |
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001