com.metamatrix.common.types
Class BaseXMLTranslator

java.lang.Object
  extended by com.metamatrix.common.types.BaseXMLTranslator
All Implemented Interfaces:
XMLTranslator
Direct Known Subclasses:
XMLDomSourceTranslator, XMLSAXSourceTranslator, XMLStreamSourceTranslator

public abstract class BaseXMLTranslator
extends java.lang.Object
implements XMLTranslator

Implements some common menthods that can be shared.


Field Summary
 
Fields inherited from interface com.metamatrix.common.types.XMLTranslator
idenityTransform, INDENT, lineSep
 
Constructor Summary
protected BaseXMLTranslator(java.util.Properties props)
           
 
Method Summary
 byte[] getBytes()
          Get the XML contents in byte array form.
 java.io.InputStream getInputStream()
          Get a InputStream for the XMl contents;
 java.util.Properties getProperties()
          Any specific Properties needed by the translator process, such as indenting etc.
 java.io.Reader getReader()
          Get a Reader for the XML contents;
 java.lang.String getString()
          Get String form of the XML
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.metamatrix.common.types.XMLTranslator
getSource
 

Constructor Detail

BaseXMLTranslator

protected BaseXMLTranslator(java.util.Properties props)
Method Detail

getString

public java.lang.String getString()
                           throws java.io.IOException
Description copied from interface: XMLTranslator
Get String form of the XML

Specified by:
getString in interface XMLTranslator
Returns:
string representing the XML source
Throws:
java.io.IOException
See Also:
XMLTranslator.getString()

getReader

public java.io.Reader getReader()
                         throws java.io.IOException
Description copied from interface: XMLTranslator
Get a Reader for the XML contents;

Specified by:
getReader in interface XMLTranslator
Returns:
a Reader object for streaming the XML contents.
Throws:
java.io.IOException
See Also:
XMLTranslator.getReader()

getInputStream

public java.io.InputStream getInputStream()
                                   throws java.io.IOException
Description copied from interface: XMLTranslator
Get a InputStream for the XMl contents;

Specified by:
getInputStream in interface XMLTranslator
Returns:
a InputStream object for streaming the XML contents.
Throws:
java.io.IOException
See Also:
XMLTranslator.getInputStream()

getBytes

public byte[] getBytes()
                throws java.io.IOException
Get the XML contents in byte array form.

Throws:
java.io.IOException

getProperties

public java.util.Properties getProperties()
Description copied from interface: XMLTranslator
Any specific Properties needed by the translator process, such as indenting etc.

Specified by:
getProperties in interface XMLTranslator
Returns:
properties


Copyright © 2009. All Rights Reserved.