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

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

public class ChangeSummaryStreamSerializer
extends 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 Object CHANGE_SUMMARY
           
static Object ChangeSummary_TYPE
           
protected static String CREATE_ATTRIBUTE
           
protected static String DELETE_ATTRIBUTE
           
protected static String LOGGING_ATTRIBUTE
           
static String OPTION_OPTIMIZE_LIST
          Root Object path String such as "#", etc.
static String OPTION_ROOT_ELEMENT
          Root Object path String such as "#", etc.
static String OPTION_RootObject_PATH
          Root Object path String such as "#", etc.
protected static String REF_ATTRIBUTE
           
protected  String rootElementNS
           
protected static String UNSET
           
 
Constructor Summary
ChangeSummaryStreamSerializer()
           
 
Method Summary
protected static List optimize(List values, Object featureChange, int size)
           
protected  String rootElementName()
           
 void saveChangeSummary(ChangeSummary changeSummary, javax.xml.namespace.QName changeSummaryElement, javax.xml.stream.XMLStreamWriter writer, Map options)
          Exports ChangeSummary
protected  boolean skipDeletedModification(DataObject modifiedDataObject)
           
protected  void writeAttribute(Property property, String value)
           
protected  void writeDeletedObject(Property property)
           
protected  void writeElement(Object value)
           
protected  void writeElement(Object value, 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 String CREATE_ATTRIBUTE
See Also:
Constant Field Values

DELETE_ATTRIBUTE

protected static final String DELETE_ATTRIBUTE
See Also:
Constant Field Values

LOGGING_ATTRIBUTE

protected static final String LOGGING_ATTRIBUTE
See Also:
Constant Field Values

REF_ATTRIBUTE

protected static final String REF_ATTRIBUTE
See Also:
Constant Field Values

UNSET

protected static final String UNSET
See Also:
Constant Field Values

rootElementNS

protected String rootElementNS

ChangeSummary_TYPE

public static final Object ChangeSummary_TYPE

CHANGE_SUMMARY

protected static final Object CHANGE_SUMMARY

OPTION_RootObject_PATH

public static final 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 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 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(Property property,
                                    String value)
                             throws javax.xml.stream.XMLStreamException
Throws:
javax.xml.stream.XMLStreamException

rootElementName

protected final String rootElementName()

skipDeletedModification

protected boolean skipDeletedModification(DataObject modifiedDataObject)

writeDeletedObject

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

writeElement

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

writeElement

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

optimize

protected static List optimize(List values,
                               Object featureChange,
                               int size)

saveChangeSummary

public final void saveChangeSummary(ChangeSummary changeSummary,
                                    javax.xml.namespace.QName changeSummaryElement,
                                    javax.xml.stream.XMLStreamWriter writer,
                                    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 © 2013 The Apache Software Foundation. All Rights Reserved.