Skip navigation links

Oracle® Fusion Middleware Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-02


oracle.stellent.wcm.common.xml
Class AbstractXmlSerializer<T>

java.lang.Object
  extended by oracle.stellent.wcm.common.xml.AbstractXmlSerializer<T>


public abstract class AbstractXmlSerializer<T>
extends java.lang.Object

Serializes the given type in and out of XML format


Field Summary
static java.lang.String XPATH_PREFIX
           

 

Constructor Summary
AbstractXmlSerializer()
           

 

Method Summary
protected  XPathEvaluator createXPathEvaluator(java.io.InputStream inputStream)
          Create the XPath evaluator
protected  XPathEvaluator createXPathEvaluator(java.io.Reader reader)
           
protected abstract  java.lang.String getNamespaceUri()
           
protected abstract  java.lang.String getRootNode()
           
protected abstract  java.lang.String getSchemaLocation()
           
 T readObject(java.io.InputStream inputStream)
          Deserialize the object from the given XML InputStream
 T readObject(java.io.Reader reader)
           
protected abstract  T readXml(XPathEvaluator evaluator)
          Read the object from the XML
 void writeObject(T object, java.io.OutputStream outputStream)
          Serializes the object to the given OutputStream in XML format.
 void writeObject(T object, java.io.Writer writer)
           
protected abstract  void writeXml(T object, java.io.Writer writer)
          Write the XML for the object to the given writer

 

Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

 

Field Detail

XPATH_PREFIX

public static final java.lang.String XPATH_PREFIX
See Also:
Constant Field Values

Constructor Detail

AbstractXmlSerializer

public AbstractXmlSerializer()

Method Detail

writeObject

public void writeObject(T object,
                        java.io.OutputStream outputStream)
                 throws java.io.IOException
Serializes the object to the given OutputStream in XML format.
Parameters:
object - the object to serialize
outputStream - the outputstream to write the XML
Throws:
java.io.IOException - if an I/O error occurs

writeObject

public void writeObject(T object,
                        java.io.Writer writer)
                 throws java.io.IOException
Throws:
java.io.IOException

readObject

public T readObject(java.io.InputStream inputStream)
Deserialize the object from the given XML InputStream
Parameters:
inputStream - the inputstream of XML content
Returns:
the constructed object

readObject

public T readObject(java.io.Reader reader)

getRootNode

protected abstract java.lang.String getRootNode()
Returns:
name of the root node

getNamespaceUri

protected abstract java.lang.String getNamespaceUri()
Returns:
the default namespace URI

getSchemaLocation

protected abstract java.lang.String getSchemaLocation()
Returns:
the schema location

writeXml

protected abstract void writeXml(T object,
                                 java.io.Writer writer)
                          throws java.io.IOException
Write the XML for the object to the given writer
Parameters:
object - the object
writer - the writer
Throws:
java.io.IOException

readXml

protected abstract T readXml(XPathEvaluator evaluator)
                      throws XPathEvaluatorException
Read the object from the XML
Parameters:
evaluator - the xml evaluator
Returns:
the object instance
Throws:
XPathEvaluatorException

createXPathEvaluator

protected XPathEvaluator createXPathEvaluator(java.io.InputStream inputStream)
Create the XPath evaluator
Parameters:
inputStream - the inputstream
Returns:
the evaluator object

createXPathEvaluator

protected XPathEvaluator createXPathEvaluator(java.io.Reader reader)

Skip navigation links

Oracle® Fusion Middleware Site Studio for External Applications Java API Reference
11g Release 1 (11.1.1)

E17273-02


Copyright © 2010, 2011, Oracle and/or its affiliates. All rights reserved.