Top Description Fields Constructors Methods
org.jdom.adapters

public abstract Class AbstractDOMAdapter

extends Object
implements DOMAdapter
Class Inheritance
All Implemented Interfaces
org.jdom.adapters.DOMAdapter
Known Direct Subclasses
org.jdom.adapters.CrimsonDOMAdapter, org.jdom.adapters.JAXPDOMAdapter, org.jdom.adapters.OracleV1DOMAdapter, org.jdom.adapters.OracleV2DOMAdapter, org.jdom.adapters.XercesDOMAdapter, org.jdom.adapters.XML4JDOMAdapter
Imports
java.io.*, java.lang.reflect.*, org.jdom.*, org.w3c.dom.*, .Document

A DOMAdapter utility abstract base class.
Authors
Brett McLaughlin, Jason Hunter
Version
$Revision: 1.21 $, $Date: 2007/11/10 05:28:59 $

Field Summary

Modifier and TypeField and Description
private static final String

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public abstract Document

Returns:

Document - created DOM Document.
createDocument
()

Redeclares org.jdom.adapters.DOMAdapter.createDocument.

This creates an empty Document object based on a specific parser implementation.
public Document

Returns:

Document - created DOM Document.
createDocument
(DocType
Initial DocType of the document.
doctype
)

Implements org.jdom.adapters.DOMAdapter.createDocument.

This creates an empty Document object based on a specific parser implementation with the given DOCTYPE.
public Document

Returns:

Document - instance ready for use.
getDocument
(File
file to parse.
filename
,
boolean
boolean to indicate if validation should occur.
validate
)

Implements org.jdom.adapters.DOMAdapter.getDocument.

This creates a new Document from an existing InputStream by letting a DOM parser handle parsing using the supplied stream.
public abstract Document

Returns:

Document - instance ready for use.
getDocument
(InputStream
InputStream to parse.
in
,
boolean
boolean to indicate if validation should occur.
validate
)

Redeclares org.jdom.adapters.DOMAdapter.getDocument.

This creates a new Document from an existing InputStream by letting a DOM parser handle parsing using the supplied stream.
protected void
setInternalSubset(DocumentType
DocumentType to be altered
dt
,
String
String to use as the internal DTD subset
s
)

This attempts to change the DocumentType to have the given internal DTD subset value.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

CVS_IDback to summary
private static final String CVS_ID

Constructor Detail

AbstractDOMAdapterback to summary
public AbstractDOMAdapter()

Method Detail

createDocumentback to summary
public abstract Document createDocument() throws JDOMException

Redeclares org.jdom.adapters.DOMAdapter.createDocument.

This creates an empty Document object based on a specific parser implementation.

Returns:Document

Document - created DOM Document.

Exceptions
JDOMException:
when errors occur.
createDocumentback to summary
public Document createDocument(DocType doctype) throws JDOMException

Implements org.jdom.adapters.DOMAdapter.createDocument.

This creates an empty Document object based on a specific parser implementation with the given DOCTYPE. If the doctype parameter is null, the behavior is the same as calling createDocument().

Parameters
doctype:DocType

Initial DocType of the document.

Returns:Document

Document - created DOM Document.

Exceptions
JDOMException:
when errors occur.
getDocumentback to summary
public Document getDocument(File filename, boolean validate) throws IOException, JDOMException

Implements org.jdom.adapters.DOMAdapter.getDocument.

This creates a new Document from an existing InputStream by letting a DOM parser handle parsing using the supplied stream.

Parameters
filename:File

file to parse.

validate:boolean

boolean to indicate if validation should occur.

Returns:Document

Document - instance ready for use.

Exceptions
IOException:
when I/O error occurs.
JDOMException:
when errors occur in parsing.
getDocumentback to summary
public abstract Document getDocument(InputStream in, boolean validate) throws IOException, JDOMException

Redeclares org.jdom.adapters.DOMAdapter.getDocument.

This creates a new Document from an existing InputStream by letting a DOM parser handle parsing using the supplied stream.

Parameters
in:InputStream

InputStream to parse.

validate:boolean

boolean to indicate if validation should occur.

Returns:Document

Document - instance ready for use.

Exceptions
IOException:
when I/O error occurs.
JDOMException:
when errors occur in parsing.
setInternalSubsetback to summary
protected void setInternalSubset(DocumentType dt, String s)

This attempts to change the DocumentType to have the given internal DTD subset value. This is not a standard ability in DOM, so it's only available with some parsers. Subclasses can alter the mechanism by which the attempt is made to set the value.

Parameters
dt:DocumentType

DocumentType to be altered

s:String

String to use as the internal DTD subset