org.apache.tuscany.sdo.util.resource
Class ChangeSummaryStreamSerializer

java.lang.Object
  extended by org.apache.tuscany.sdo.util.resource.ChangeSummaryStreamSerializer

public class ChangeSummaryStreamSerializer
extends java.lang.Object

ChangeSummary StAX Serializer whose output conforms to the SDO Java/C++/PHP specifications. The instance isn't thread-safe, however it's safe to use the instance any times on the same thread.


Field Summary
protected static java.lang.Object CHANGE_SUMMARY
           
static java.lang.Object ChangeSummary_TYPE
           
protected static java.lang.String CREATE_ATTRIBUTE
           
protected static java.lang.String DELETE_ATTRIBUTE
           
protected static java.lang.String LOGGING_ATTRIBUTE
           
static java.lang.String OPTION_OPTIMIZE_LIST
          Root Object path String such as "#", etc.
static java.lang.String OPTION_ROOT_ELEMENT
          Root Object path String such as "#", etc.
static java.lang.String OPTION_RootObject_PATH
          Root Object path String such as "#", etc.
protected static java.lang.String REF_ATTRIBUTE
           
protected  java.lang.String rootElementNS
           
protected static java.lang.String UNSET
           
 
Constructor Summary
ChangeSummaryStreamSerializer()
           
 
Method Summary
protected static java.util.List optimize(java.util.List values, java.lang.Object featureChange, int size)
           
protected  java.lang.String rootElementName()
           
 void saveChangeSummary(commonj.sdo.ChangeSummary changeSummary, javax.xml.namespace.QName changeSummaryElement, javax.xml.stream.XMLStreamWriter writer, java.util.Map options)
          Exports ChangeSummary
protected  boolean skipDeletedModification(commonj.sdo.DataObject modifiedDataObject)
           
protected  void writeAttribute(commonj.sdo.Property property, java.lang.String value)
           
protected  void writeDeletedObject(commonj.sdo.Property property)
           
protected  void writeElement(java.lang.Object value)
           
protected  void writeElement(java.lang.Object value, commonj.sdo.Property property)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CREATE_ATTRIBUTE

protected static final java.lang.String CREATE_ATTRIBUTE
See Also:
Constant Field Values

DELETE_ATTRIBUTE

protected static final java.lang.String DELETE_ATTRIBUTE
See Also:
Constant Field Values

LOGGING_ATTRIBUTE

protected static final java.lang.String LOGGING_ATTRIBUTE
See Also:
Constant Field Values

REF_ATTRIBUTE

protected static final java.lang.String REF_ATTRIBUTE
See Also:
Constant Field Values

UNSET

protected static final java.lang.String UNSET
See Also:
Constant Field Values

rootElementNS

protected java.lang.String rootElementNS

ChangeSummary_TYPE

public static final java.lang.Object ChangeSummary_TYPE

CHANGE_SUMMARY

protected static final java.lang.Object CHANGE_SUMMARY

OPTION_RootObject_PATH

public static final java.lang.String OPTION_RootObject_PATH
Root Object path String such as "#", etc. Absent/null is the default (automatic computation)

See Also:
Constant Field Values

OPTION_OPTIMIZE_LIST

public static final java.lang.String OPTION_OPTIMIZE_LIST
Root Object path String such as "#", etc. Absent/null is the default (automatic computation)

See Also:
Constant Field Values

OPTION_ROOT_ELEMENT

public static final java.lang.String OPTION_ROOT_ELEMENT
Root Object path String such as "#", etc. Absent/null is the default (automatic computation)

See Also:
Constant Field Values
Constructor Detail

ChangeSummaryStreamSerializer

public ChangeSummaryStreamSerializer()
Method Detail

writeAttribute

protected final void writeAttribute(commonj.sdo.Property property,
                                    java.lang.String value)
                             throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

rootElementName

protected final java.lang.String rootElementName()

skipDeletedModification

protected boolean skipDeletedModification(commonj.sdo.DataObject modifiedDataObject)

writeDeletedObject

protected final void writeDeletedObject(commonj.sdo.Property property)
                                 throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeElement

protected final void writeElement(java.lang.Object value,
                                  commonj.sdo.Property property)
                           throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

writeElement

protected final void writeElement(java.lang.Object value)
                           throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

optimize

protected static java.util.List optimize(java.util.List values,
                                         java.lang.Object featureChange,
                                         int size)

saveChangeSummary

public final void saveChangeSummary(commonj.sdo.ChangeSummary changeSummary,
                                    javax.xml.namespace.QName changeSummaryElement,
                                    javax.xml.stream.XMLStreamWriter writer,
                                    java.util.Map options)
                             throws javax.xml.stream.XMLStreamException
Exports ChangeSummary

Parameters:
changeSummary - Never null
changeSummaryElement - changeSummary element; the NameSpace can be empty if no NameSpace, or null if local element; the prefix can be null(no preference)
writer - Never null
options - SDOUtil.XML_SAVE_LineBreak (absence/null is the default i.e. no Line Breaking), SDOUtil.XML_SAVE_INDENT (absence/null is the default i.e. no indentation), SDOUtil.XML_SAVE_MARGIN, OPTION_RootObject_PATH, OPTION_OPTIMIZE_LIST and XMLResource.OPTION_EXTENDED_META_DATA; can be null or empty
Throws:
javax.xml.stream.XMLStreamException


Copyright © 2007 Apache Software Foundation. All Rights Reserved.