org.w3c.domts

Class DOMTest

Known Direct Subclasses:
DOMTestCase, DOMTestSuite

public abstract class DOMTest
extends java.lang.Object

This is an abstract base class for generated DOM tests

Constructor Summary

DOMTest()
This constructor is used by tests that must create a modified document factory to meet requirements on the parser configuration.
DOMTest(DOMTestDocumentBuilderFactory factory)
This is the appropriate constructor for tests that make no requirements on the parser configuration.

Method Summary

InputStream
createStream(String bytes)
String
createTempURI(String scheme)
Object
createXPathEvaluator(Document doc)
String
getContentType()
protected DOMTestDocumentBuilderFactory
getFactory()
DOMImplementation
getImplementation()
int
getMutationCount()
Implementation of EventListener.handleEvent This method is called when a mutation is reported for a document that was declared to not be modified during testing
String
getResourceURI(String href, String scheme, String contentType)
abstract String
getTargetURI()
boolean
hasFeature(String feature, String version)
boolean
hasSetting(DocumentBuilderSetting setting)
boolean
isCoalescing()
boolean
isExpandEntityReferences()
boolean
isHasNullString()
boolean
isIgnoringElementContentWhitespace()
boolean
isNamespaceAware()
boolean
isSigned()
boolean
isValidating()
Document
load(String docURI, boolean willBeModified)
void
preload(String contentType, String docURI, boolean willBeModified)
protected void
setFactory(DOMTestDocumentBuilderFactory factory)
Should only be called in the constructor of a derived type.

Constructor Details

DOMTest

public DOMTest()
This constructor is used by tests that must create a modified document factory to meet requirements on the parser configuration. setFactory should be called within the test's constructor.

DOMTest

public DOMTest(DOMTestDocumentBuilderFactory factory)
This is the appropriate constructor for tests that make no requirements on the parser configuration.
Parameters:
factory - must not be null

Method Details

createStream

public InputStream createStream(String bytes)
            throws DOMTestLoadException,
                   IOException

createTempURI

public String createTempURI(String scheme)
            throws DOMTestLoadException

createXPathEvaluator

public Object createXPathEvaluator(Document doc)

getContentType

public final String getContentType()

getFactory

protected DOMTestDocumentBuilderFactory getFactory()

getImplementation

public DOMImplementation getImplementation()

getMutationCount

public final int getMutationCount()
Implementation of EventListener.handleEvent This method is called when a mutation is reported for a document that was declared to not be modified during testing
Parameters:

getResourceURI

public String getResourceURI(String href,
                             String scheme,
                             String contentType)
            throws DOMTestLoadException

getTargetURI

public abstract String getTargetURI()

hasFeature

public boolean hasFeature(String feature,
                          String version)

hasSetting

public boolean hasSetting(DocumentBuilderSetting setting)

isCoalescing

public final boolean isCoalescing()

isExpandEntityReferences

public final boolean isExpandEntityReferences()

isHasNullString

public final boolean isHasNullString()

isIgnoringElementContentWhitespace

public final boolean isIgnoringElementContentWhitespace()

isNamespaceAware

public final boolean isNamespaceAware()

isSigned

public final boolean isSigned()

isValidating

public final boolean isValidating()

load

public Document load(String docURI,
                     boolean willBeModified)
            throws DOMTestLoadException

preload

public void preload(String contentType,
                    String docURI,
                    boolean willBeModified)
            throws DOMTestIncompatibleException

setFactory

protected void setFactory(DOMTestDocumentBuilderFactory factory)
Should only be called in the constructor of a derived type.