org.apache.axiom.om.impl.llom
Class OMSerializableImpl

java.lang.Object
  extended by org.apache.axiom.om.impl.llom.OMSerializableImpl
All Implemented Interfaces:
OMSerializable
Direct Known Subclasses:
OMDocumentImpl, OMNodeImpl

public abstract class OMSerializableImpl
extends Object
implements OMSerializable


Field Summary
 OMXMLParserWrapper builder
          Field parserWrapper
protected  boolean done
          Field done
protected  OMFactory factory
           
 
Constructor Summary
OMSerializableImpl(OMFactory factory)
           
 
Method Summary
 void build()
          Parses this node and builds the object structure in memory.
 void close(boolean build)
          If a builder and parser is associated with the node, it is closed.
 OMFactory getOMFactory()
          Returns the OMFactory that created this object
abstract  void internalSerialize(XMLStreamWriter writer, boolean cache)
          Serializes the node.
 boolean isComplete()
          Indicates whether parser has parsed this information item completely or not.
 void serialize(OutputStream output)
           
 void serialize(OutputStream output, OMOutputFormat format)
           
 void serialize(Writer writer)
           
 void serialize(Writer writer2, OMOutputFormat format)
           
 void serialize(XMLStreamWriter xmlWriter)
          Serializes the information item with caching.
 void serialize(XMLStreamWriter xmlWriter, boolean cache)
          Serializes the information item.
 void serializeAndConsume(OutputStream output)
           
 void serializeAndConsume(OutputStream output, OMOutputFormat format)
           
 void serializeAndConsume(Writer writer)
           
 void serializeAndConsume(Writer writer2, OMOutputFormat format)
           
 void serializeAndConsume(XMLStreamWriter xmlWriter)
          Serializes the information item without caching.
abstract  void setComplete(boolean state)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

builder

public OMXMLParserWrapper builder
Field parserWrapper


done

protected boolean done
Field done


factory

protected final OMFactory factory
Constructor Detail

OMSerializableImpl

public OMSerializableImpl(OMFactory factory)
Method Detail

getOMFactory

public OMFactory getOMFactory()
Description copied from interface: OMSerializable
Returns the OMFactory that created this object

Specified by:
getOMFactory in interface OMSerializable

isComplete

public boolean isComplete()
Description copied from interface: OMSerializable
Indicates whether parser has parsed this information item completely or not. If some info are not available in the item, one has to check this attribute to make sure that, this item has been parsed completely or not.

Specified by:
isComplete in interface OMSerializable
Returns:
Returns boolean.

build

public void build()
           throws OMException
Parses this node and builds the object structure in memory. However a node, created programmatically, will have done set to true by default and this will cause populateyourself not to work properly!

Specified by:
build in interface OMSerializable
Throws:
OMException

close

public void close(boolean build)
Description copied from interface: OMSerializable
If a builder and parser is associated with the node, it is closed.

Specified by:
close in interface OMSerializable
Parameters:
build - if true, the object is built first before closing the builder/parser

setComplete

public abstract void setComplete(boolean state)

internalSerialize

public abstract void internalSerialize(XMLStreamWriter writer,
                                       boolean cache)
                                throws XMLStreamException
Serializes the node.

Parameters:
writer -
Throws:
XMLStreamException

serialize

public void serialize(XMLStreamWriter xmlWriter)
               throws XMLStreamException
Description copied from interface: OMSerializable
Serializes the information item with caching. This method has the same effect as OMSerializable.serialize(XMLStreamWriter, boolean) with cache set to true.

Specified by:
serialize in interface OMSerializable
Throws:
XMLStreamException

serializeAndConsume

public void serializeAndConsume(XMLStreamWriter xmlWriter)
                         throws XMLStreamException
Description copied from interface: OMSerializable
Serializes the information item without caching. This method has the same effect as OMSerializable.serialize(XMLStreamWriter, boolean) with cache set to false.

Specified by:
serializeAndConsume in interface OMSerializable
Throws:
XMLStreamException

serialize

public void serialize(XMLStreamWriter xmlWriter,
                      boolean cache)
               throws XMLStreamException
Description copied from interface: OMSerializable
Serializes the information item.

Specified by:
serialize in interface OMSerializable
cache - indicates if caching should be enabled
Throws:
XMLStreamException

serialize

public void serialize(OutputStream output)
               throws XMLStreamException
Throws:
XMLStreamException

serialize

public void serialize(Writer writer)
               throws XMLStreamException
Throws:
XMLStreamException

serializeAndConsume

public void serializeAndConsume(OutputStream output)
                         throws XMLStreamException
Throws:
XMLStreamException

serializeAndConsume

public void serializeAndConsume(Writer writer)
                         throws XMLStreamException
Throws:
XMLStreamException

serialize

public void serialize(OutputStream output,
                      OMOutputFormat format)
               throws XMLStreamException
Throws:
XMLStreamException

serialize

public void serialize(Writer writer2,
                      OMOutputFormat format)
               throws XMLStreamException
Throws:
XMLStreamException

serializeAndConsume

public void serializeAndConsume(OutputStream output,
                                OMOutputFormat format)
                         throws XMLStreamException
Throws:
XMLStreamException

serializeAndConsume

public void serializeAndConsume(Writer writer2,
                                OMOutputFormat format)
                         throws XMLStreamException
Throws:
XMLStreamException


Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.