|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.softwareag.tamino.db.api.objectModel.TDataObject
com.softwareag.tamino.db.api.objectModel.TXMLObject
com.softwareag.tamino.db.api.objectModel.sax.TSAXAdapter
public class TSAXAdapter
TSAXAdapter is the adaption of a SAX event based object model to the TXMLObject class. Such an object model, given by the client, is defined by implementations of TSAXDocument, TSAXElement, TSAXDocumentDefaultHandler and TSAXElementDefaultHandler. A SAXAdapter instance usually wrapps a concrete TSAXDocument or TSAXElement instance where the latter represents the root element for the SAX based object model. The TSAXDocumentDefaultHandler is needed, so that the SAXAdapter is capable to read a XML byte or character input stream to build a new internal TSAXDocument representation.
Constructor Summary | |
---|---|
TSAXAdapter()
Default Constructor. |
|
TSAXAdapter(TSAXDocument document)
Special Constructor. |
|
TSAXAdapter(TSAXElement element)
Initializes the adapter with the given element and defaultHandler. |
Method Summary | |
---|---|
protected boolean |
canWriteToOutputStream()
Indicates if this instance can be currently written to an output stream. |
java.lang.String |
getDocname()
Gets the ino:docname from this Tamino data object. |
java.lang.String |
getDoctype()
Gets the doctype for this Tamino data object. |
java.lang.Object |
getDocument()
Gets the document instance of the underlying object model. |
java.lang.Object |
getElement()
Gets element instance of the underlying object model. |
java.lang.String |
getId()
Gets the ino:id attribute for the underlying XML data. |
void |
readFrom(java.io.InputStream inputStream)
Reads data from inputStream and initializes the concrete object. |
void |
readFrom(java.io.InputStream inputStream,
java.lang.String systemId)
Reads data from inputStream and initializes the concrete object. |
void |
readFrom(java.io.Reader reader)
Reads data from reader and initializes the concrete object. |
void |
readFrom(java.io.Reader reader,
java.lang.String systemId)
Reads data from reader and initializes the concrete object. |
void |
setDocname(java.lang.String docname)
Sets the ino:docname. |
void |
setId(java.lang.String id)
Sets the ino:id for the XML instance. |
protected void |
setProperty(java.lang.String key,
java.lang.Object value)
Sets a concrete property for the SAX specific implementation. |
void |
writeTo(java.io.OutputStream outputStream)
Writes data to the given outputStream. |
void |
writeTo(java.io.Writer writer)
Writes data to the given writer. |
Methods inherited from class com.softwareag.tamino.db.api.objectModel.TXMLObject |
---|
getEncoding, getSystemId, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, newInstance, setContentType, setEncoding, setSystemId, writeTo, writeTo |
Methods inherited from class com.softwareag.tamino.db.api.objectModel.TDataObject |
---|
getCollection, getContentType, getLastModified, getLocale, hasCollection, hasDocname, hasDoctype, hasId, readDocumentStateFrom, readStateFrom, setCollection, setDoctype, setLastModified, setLocale, writeDocumentStateTo, writeStateTo |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.softwareag.tamino.db.api.io.TStreamable |
---|
getContentType |
Constructor Detail |
---|
public TSAXAdapter()
public TSAXAdapter(TSAXDocument document)
public TSAXAdapter(TSAXElement element)
Method Detail |
---|
public void setDocname(java.lang.String docname)
setDocname
in class TXMLObject
docname
- is the ino:docname attribute of the data object.public void setId(java.lang.String id)
setId
in class TXMLObject
id
- denoted the ino:id that should be set on an underlying element instance.public java.lang.String getDocname()
getDocname
in class TXMLObject
public java.lang.String getId()
getId
in class TXMLObject
public java.lang.String getDoctype()
getDoctype
in class TDataObject
public java.lang.Object getDocument()
getDocument
in class TXMLObject
public java.lang.Object getElement()
getElement
in class TXMLObject
public void readFrom(java.io.InputStream inputStream) throws TStreamReadException
inputStream
- denotes the byte stream from which the object is newly initialized.
TStreamReadException
- due to any problems when reading the stream.public void readFrom(java.io.InputStream inputStream, java.lang.String systemId) throws TStreamReadException
inputStream
- denotes the byte stream from which the object is newly initialized.systemId
- the base URI of the data to resolve relative references.
TStreamReadException
- due to any problems when reading the stream.public void readFrom(java.io.Reader reader) throws TStreamReadException
reader
- denotes the character stream from which the object is newly initialized.
TStreamReadException
- due to any problems when reading the stream.public void readFrom(java.io.Reader reader, java.lang.String systemId) throws TStreamReadException
reader
- denotes the character stream from which the object is newly initialized.systemId
- the base URI to resolve relative references.
TStreamReadException
- due to any problems when reading the stream.public void writeTo(java.io.OutputStream outputStream) throws TStreamWriteException
writeTo
in interface TStreamable
writeTo
in class TXMLObject
outputStream
- denotes the byte stream to which the internal object representation is written.
TStreamWriteException
- due to any problems when writing the stream.public void writeTo(java.io.Writer writer) throws TStreamWriteException
writeTo
in interface TStreamable
writeTo
in class TXMLObject
writer
- denotes the character stream to which the internal object representation is written.
TStreamWriteException
- due to any problems when writing the stream.protected boolean canWriteToOutputStream()
canWriteToOutputStream
in class TDataObject
protected void setProperty(java.lang.String key, java.lang.Object value)
setProperty
in class TXMLObject
key
- denotes the values key.value
- denotes the key's value.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |