Package org.apache.axiom.om
Interface OMSerializable
-
- All Known Subinterfaces:
OMComment,OMContainer,OMContainerEx,OMDocType,OMDocument,OMElement,OMNode,OMNodeEx,OMProcessingInstruction,OMSourcedElement,OMText,SOAPBody,SOAPEnvelope,SOAPFault,SOAPFaultClassifier,SOAPFaultCode,SOAPFaultDetail,SOAPFaultNode,SOAPFaultReason,SOAPFaultRole,SOAPFaultSubCode,SOAPFaultText,SOAPFaultValue,SOAPHeader,SOAPHeaderBlock,SOAPMessage
public interface OMSerializableInformation item that can be serialized (written to an XML stream writer) and deserialized (retrieved from an XML parser) as a unit. This is the common super-interface forOMDocumentandOMNode. Note thatOMAttributeandOMNamespaceare information items that don't match the definition of this interface because they can only be read from the parser as part of a larger unit, namely an element.In accordance with the definition given above, this interface declares two sets of methods:
- Methods allowing to control whether the information item has been completely built, i.e. whether all events corresponding to the information item have been retrieved from the parser.
- Methods to write the StAX events corresponding to the information item to an
XMLStreamWriter.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidbuild()Builds itself.voidclose(boolean build)If a builder and parser is associated with the node, it is closed.OMFactorygetOMFactory()Returns the OMFactory that created this objectbooleanisComplete()Indicates whether parser has parsed this information item completely or not.voidserialize(XMLStreamWriter xmlWriter)Serializes the information item with caching.voidserialize(XMLStreamWriter xmlWriter, boolean cache)Serializes the information item.voidserializeAndConsume(XMLStreamWriter xmlWriter)Serializes the information item without caching.
-
-
-
Method Detail
-
getOMFactory
OMFactory getOMFactory()
Returns the OMFactory that created this object
-
isComplete
boolean isComplete()
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.- Returns:
- Returns boolean.
-
build
void build()
Builds itself.
-
close
void close(boolean build)
If a builder and parser is associated with the node, it is closed.- Parameters:
build- if true, the object is built first before closing the builder/parser
-
serialize
void serialize(XMLStreamWriter xmlWriter) throws XMLStreamException
Serializes the information item with caching. This method has the same effect asserialize(XMLStreamWriter, boolean)withcacheset totrue.- Parameters:
xmlWriter-- Throws:
XMLStreamException
-
serializeAndConsume
void serializeAndConsume(XMLStreamWriter xmlWriter) throws XMLStreamException
Serializes the information item without caching. This method has the same effect asserialize(XMLStreamWriter, boolean)withcacheset tofalse.- Parameters:
xmlWriter-- Throws:
XMLStreamException
-
serialize
void serialize(XMLStreamWriter xmlWriter, boolean cache) throws XMLStreamException
Serializes the information item.- Parameters:
xmlWriter-cache- indicates if caching should be enabled- Throws:
XMLStreamException
-
-