BEA Systems, Inc.

BEA WebLogic Server 9.0 API Reference


weblogic.apache.xerces.dom
Class DOMInputSourceImpl

java.lang.Object
  extended byweblogic.apache.xerces.dom.DOMInputSourceImpl
All Implemented Interfaces:
DOMInputSource

Deprecated. please use JDK supplied XML parsers and transformers

public class DOMInputSourceImpl
extends Object
implements DOMInputSource

This Class DOMInputSourceImpl represents a single input source for an XML entity.

This Class allows an application to encapsulate information about an input source in a single object, which may include a public identifier, a system identifier, a byte stream (possibly with a specified encoding), and/or a character stream.

The exact definitions of a byte stream and a character stream are binding dependent.

There are two places that the application will deliver this input source to the parser: as the argument to the parse method, or as the return value of the DOMEntityResolver.resolveEntity method.

The DOMBuilder will use the DOMInputSource object to determine how to read XML input. If there is a character stream available, the parser will read that stream directly; if not, the parser will use a byte stream, if available; if neither a character stream nor a byte stream is available, the parser will attempt to open a URI connection to the resource identified by the system identifier.

An DOMInputSource object belongs to the application: the parser shall never modify it in any way (it may modify a copy if necessary). Eventhough all attributes in this interface are writable the DOM implementation is expected to never mutate a DOMInputSource.

See also the Document Object Model (DOM) Level 3 Abstract Schemas and Load and Save Specification.


Field Summary
protected  String fBaseSystemId
          Deprecated.  
protected  InputStream fByteStream
          Deprecated.  
protected  Reader fCharStream
          Deprecated.  
protected  String fData
          Deprecated.  
protected  String fEncoding
          Deprecated.  
protected  String fPublicId
          Deprecated.  
protected  String fSystemId
          Deprecated.  
 
Constructor Summary
DOMInputSourceImpl()
          Deprecated. Default Constructor, constructs an input source
DOMInputSourceImpl(String publicId, String systemId, String baseSystemId)
          Deprecated. Constructs an input source from just the public and system identifiers, leaving resolution of the entity and opening of the input stream up to the caller.
DOMInputSourceImpl(String publicId, String systemId, String baseSystemId, InputStream byteStream, String encoding)
          Deprecated. Constructs an input source from a byte stream.
DOMInputSourceImpl(String publicId, String systemId, String baseSystemId, Reader charStream, String encoding)
          Deprecated. Constructs an input source from a character stream.
DOMInputSourceImpl(String publicId, String systemId, String baseSystemId, String data, String encoding)
          Deprecated. Constructs an input source from a String.
 
Method Summary
 String getBaseURI()
          Deprecated. The base URI to be used (see section 5.1.4 in ) for resolving relative URIs to absolute URIs.
 InputStream getByteStream()
          Deprecated. An attribute of a language-binding dependent type that represents a stream of bytes.
 Reader getCharacterStream()
          Deprecated. An attribute of a language-binding dependent type that represents a stream of 16-bit units.
 String getEncoding()
          Deprecated. The character encoding, if known.
 String getPublicId()
          Deprecated. The public identifier for this input source.
 String getStringData()
          Deprecated. A string attribute that represents a sequence of 16 bit units (utf-16 encoded characters).
 String getSystemId()
          Deprecated. The system identifier, a URI reference , for this input source.
 void setBaseURI(String baseURI)
          Deprecated. The base URI to be used (see section 5.1.4 in ) for resolving relative URIs to absolute URIs.
 void setByteStream(InputStream byteStream)
          Deprecated. An attribute of a language-binding dependent type that represents a stream of bytes.
 void setCharacterStream(Reader characterStream)
          Deprecated. An attribute of a language-binding dependent type that represents a stream of 16-bit units.
 void setEncoding(String encoding)
          Deprecated. The character encoding, if known.
 void setPublicId(String publicId)
          Deprecated. The public identifier for this input source.
 void setStringData(String stringData)
          Deprecated. A string attribute that represents a sequence of 16 bit units (utf-16 encoded characters).
 void setSystemId(String systemId)
          Deprecated. The system identifier, a URI reference , for this input source.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fBaseSystemId

protected String fBaseSystemId
Deprecated. 

fByteStream

protected InputStream fByteStream
Deprecated. 

fCharStream

protected Reader fCharStream
Deprecated. 

fData

protected String fData
Deprecated. 

fEncoding

protected String fEncoding
Deprecated. 

fPublicId

protected String fPublicId
Deprecated. 

fSystemId

protected String fSystemId
Deprecated. 
Constructor Detail

DOMInputSourceImpl

public DOMInputSourceImpl()
Deprecated. 
Default Constructor, constructs an input source


DOMInputSourceImpl

public DOMInputSourceImpl(String publicId,
                          String systemId,
                          String baseSystemId)
Deprecated. 
Constructs an input source from just the public and system identifiers, leaving resolution of the entity and opening of the input stream up to the caller.


DOMInputSourceImpl

public DOMInputSourceImpl(String publicId,
                          String systemId,
                          String baseSystemId,
                          InputStream byteStream,
                          String encoding)
Deprecated. 
Constructs an input source from a byte stream.


DOMInputSourceImpl

public DOMInputSourceImpl(String publicId,
                          String systemId,
                          String baseSystemId,
                          Reader charStream,
                          String encoding)
Deprecated. 
Constructs an input source from a character stream.


DOMInputSourceImpl

public DOMInputSourceImpl(String publicId,
                          String systemId,
                          String baseSystemId,
                          String data,
                          String encoding)
Deprecated. 
Constructs an input source from a String.

Method Detail

getBaseURI

public String getBaseURI()
Deprecated. 
The base URI to be used (see section 5.1.4 in ) for resolving relative URIs to absolute URIs. If the baseURI is itself a relative URI, the behavior is implementation dependent.

Specified by:
getBaseURI in interface DOMInputSource

getByteStream

public InputStream getByteStream()
Deprecated. 
An attribute of a language-binding dependent type that represents a stream of bytes.
The parser will ignore this if there is also a character stream specified, but it will use a byte stream in preference to opening a URI connection itself.
If the application knows the character encoding of the byte stream, it should set the encoding property. Setting the encoding in this way will override any encoding specified in the XML declaration itself.

Specified by:
getByteStream in interface DOMInputSource

getCharacterStream

public Reader getCharacterStream()
Deprecated. 
An attribute of a language-binding dependent type that represents a stream of 16-bit units. Application must encode the stream using UTF-16 (defined in and Amendment 1 of ).
If a character stream is specified, the parser will ignore any byte stream and will not attempt to open a URI connection to the system identifier.

Specified by:
getCharacterStream in interface DOMInputSource

getEncoding

public String getEncoding()
Deprecated. 
The character encoding, if known. The encoding must be a string acceptable for an XML encoding declaration ( section 4.3.3 "Character Encoding in Entities").
This attribute has no effect when the application provides a character stream. For other sources of input, an encoding specified by means of this attribute will override any encoding specified in the XML claration or the Text Declaration, or an encoding obtained from a higher level protocol, such as HTTP .

Specified by:
getEncoding in interface DOMInputSource

getPublicId

public String getPublicId()
Deprecated. 
The public identifier for this input source. The public identifier is always optional: if the application writer includes one, it will be provided as part of the location information.

Specified by:
getPublicId in interface DOMInputSource

getStringData

public String getStringData()
Deprecated. 
A string attribute that represents a sequence of 16 bit units (utf-16 encoded characters).
If string data is available in the input source, the parser will ignore the character stream and the byte stream and will not attempt to open a URI connection to the system identifier.

Specified by:
getStringData in interface DOMInputSource

getSystemId

public String getSystemId()
Deprecated. 
The system identifier, a URI reference , for this input source. The system identifier is optional if there is a byte stream or a character stream, but it is still useful to provide one, since the application can use it to resolve relative URIs and can include it in error messages and warnings (the parser will attempt to fetch the ressource identifier by the URI reference only if there is no byte stream or character stream specified).
If the application knows the character encoding of the object pointed to by the system identifier, it can register the encoding by setting the encoding attribute.
If the system ID is a relative URI reference (see section 5 in ), the behavior is implementation dependent.

Specified by:
getSystemId in interface DOMInputSource

setBaseURI

public void setBaseURI(String baseURI)
Deprecated. 
The base URI to be used (see section 5.1.4 in ) for resolving relative URIs to absolute URIs. If the baseURI is itself a relative URI, the behavior is implementation dependent.

Specified by:
setBaseURI in interface DOMInputSource

setByteStream

public void setByteStream(InputStream byteStream)
Deprecated. 
An attribute of a language-binding dependent type that represents a stream of bytes.
The parser will ignore this if there is also a character stream specified, but it will use a byte stream in preference to opening a URI connection itself.
If the application knows the character encoding of the byte stream, it should set the encoding property. Setting the encoding in this way will override any encoding specified in the XML declaration itself.

Specified by:
setByteStream in interface DOMInputSource

setCharacterStream

public void setCharacterStream(Reader characterStream)
Deprecated. 
An attribute of a language-binding dependent type that represents a stream of 16-bit units. Application must encode the stream using UTF-16 (defined in and Amendment 1 of ).
If a character stream is specified, the parser will ignore any byte stream and will not attempt to open a URI connection to the system identifier.

Specified by:
setCharacterStream in interface DOMInputSource

setEncoding

public void setEncoding(String encoding)
Deprecated. 
The character encoding, if known. The encoding must be a string acceptable for an XML encoding declaration ( section 4.3.3 "Character Encoding in Entities").
This attribute has no effect when the application provides a character stream. For other sources of input, an encoding specified by means of this attribute will override any encoding specified in the XML claration or the Text Declaration, or an encoding obtained from a higher level protocol, such as HTTP .

Specified by:
setEncoding in interface DOMInputSource

setPublicId

public void setPublicId(String publicId)
Deprecated. 
The public identifier for this input source. The public identifier is always optional: if the application writer includes one, it will be provided as part of the location information.

Specified by:
setPublicId in interface DOMInputSource

setStringData

public void setStringData(String stringData)
Deprecated. 
A string attribute that represents a sequence of 16 bit units (utf-16 encoded characters).
If string data is available in the input source, the parser will ignore the character stream and the byte stream and will not attempt to open a URI connection to the system identifier.

Specified by:
setStringData in interface DOMInputSource

setSystemId

public void setSystemId(String systemId)
Deprecated. 
The system identifier, a URI reference , for this input source. The system identifier is optional if there is a byte stream or a character stream, but it is still useful to provide one, since the application can use it to resolve relative URIs and can include it in error messages and warnings (the parser will attempt to fetch the ressource identifier by the URI reference only if there is no byte stream or character stream specified).
If the application knows the character encoding of the object pointed to by the system identifier, it can register the encoding by setting the encoding attribute.
If the system ID is a relative URI reference (see section 5 in ), the behavior is implementation dependent.

Specified by:
setSystemId in interface DOMInputSource

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs90
Copyright 2005 BEA Systems Inc.