com.ptc.windchill.upgrade.dust
Class ExportXMLHandler

java.lang.Object
  extended bycom.ptc.windchill.upgrade.dust.ExportXMLHandler

public class ExportXMLHandler
extends Object

Provides methods to write the data files for the ExportBlobDataService class.


Field Summary
private  AttributesImpl attributes
           
private static boolean DEVELOPER_MODE
           
private  TransformerHandler handler
           
private static String RESOURCE
           
private  Hashtable serializedClasses
           
private  UpgradeEncoder upgradeEncoder
           
 
Constructor Summary
ExportXMLHandler()
           
 
Method Summary
 void addTimingStats(TimerStats timerStats)
          Creates a TIMING stats element from the given statistics.
 void close()
          End the XML document.
 void createExportedDataElement(String table_name, String class_name)
          Create the root element for this document.
 void createInstanceElement(long oid)
          Create an instance element.
 void createListOfClasses()
          Create the serialized class list element showing the classes which have been encountered while de-serializing the blobs.
 void createPropertyDescriptorElement(String prop_desc_type, String blob_name, String column_name, String class_name)
          Create a property descriptor element, showing its type, name, and database info.
 void createPropertyElement(String property_name, Serializable blob_object)
          Create a property element, writing the encoded blob as CDATA and finding the IDREFs for the classes of object contained in the blob.
 void endElement(String tag)
          Create an end element for the given tag.
 TransformerHandler getContentHandlerToWriteTo()
          Use TransformerFactory to find a TransformerHandler which will write an XML file.
 String getIdRefsForProperty(ArrayList usedClasses)
          Returns a comma delimited String of IDs which correspond to the given ArrayList of class names.
 Integer putSerializedClass(String className)
          Store the names of the classes that have been serialized along with a corresponding ID, if it hasn't already been added.
 void reset(File file)
          Resets the reusable objects
 void showStackTrace(WTException e)
          Expand the stack trace text into an element with tag XmlConstants.STACK_TRACE_ELEMENT.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEVELOPER_MODE

private static final boolean DEVELOPER_MODE
See Also:
Constant Field Values

RESOURCE

private static final String RESOURCE

upgradeEncoder

private UpgradeEncoder upgradeEncoder

serializedClasses

private Hashtable serializedClasses

handler

private TransformerHandler handler

attributes

private AttributesImpl attributes
Constructor Detail

ExportXMLHandler

public ExportXMLHandler()
                 throws WTException
Method Detail

reset

public void reset(File file)
           throws SAXException
Resets the reusable objects

Throws:
SAXException

close

public void close()
           throws SAXException
End the XML document. Perform any necessary cleanup.

Throws:
SAXException

showStackTrace

public void showStackTrace(WTException e)
                    throws SAXException
Expand the stack trace text into an element with tag XmlConstants.STACK_TRACE_ELEMENT.

Throws:
SAXException

createExportedDataElement

public void createExportedDataElement(String table_name,
                                      String class_name)
                               throws SAXException
Create the root element for this document.

Throws:
SAXException

createInstanceElement

public void createInstanceElement(long oid)
                           throws SAXException
Create an instance element.

Throws:
SAXException

endElement

public void endElement(String tag)
                throws SAXException
Create an end element for the given tag.

Throws:
SAXException

createPropertyElement

public void createPropertyElement(String property_name,
                                  Serializable blob_object)
                           throws SAXException
Create a property element, writing the encoded blob as CDATA and finding the IDREFs for the classes of object contained in the blob.

Throws:
SAXException

createPropertyDescriptorElement

public void createPropertyDescriptorElement(String prop_desc_type,
                                            String blob_name,
                                            String column_name,
                                            String class_name)
                                     throws SAXException
Create a property descriptor element, showing its type, name, and database info.

Throws:
SAXException

getContentHandlerToWriteTo

public TransformerHandler getContentHandlerToWriteTo()
                                              throws WTException
Use TransformerFactory to find a TransformerHandler which will write an XML file.

Throws:
WTException

putSerializedClass

public Integer putSerializedClass(String className)
Store the names of the classes that have been serialized along with a corresponding ID, if it hasn't already been added. Returns the id value.


createListOfClasses

public void createListOfClasses()
                         throws WTException
Create the serialized class list element showing the classes which have been encountered while de-serializing the blobs.

Throws:
WTException

getIdRefsForProperty

public String getIdRefsForProperty(ArrayList usedClasses)
Returns a comma delimited String of IDs which correspond to the given ArrayList of class names.


addTimingStats

public void addTimingStats(TimerStats timerStats)
                    throws WTException
Creates a TIMING stats element from the given statistics.

Throws:
WTException