|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.step.processor.ExportToP21Processor
Processes export requests generating a STEP file in Windchill Schema.
Nested Class Summary | |
private class |
ExportToP21Processor.WTInstanceMap
A Hashtable capable of comparing Windchill instances |
Field Summary | |
private Vector |
_associatedDocuments
A collection of all associated documents reference by exported instances |
private Properties |
_entityScope
A collection identifing all WT class types to be exported |
private ExportToP21Processor.WTInstanceMap |
_instanceScope
A map containing all instances to be exported (the scope of the export) |
private boolean |
_limitExportEntityScope
|
(package private) PrintWriter |
_p21FileWriter
|
private int |
_p21InstanceCounter
|
private ExpressSchema |
_theWtSchema
|
private ExportToP21Processor.WTInstanceMap |
_wtInstanceToP21IdMap
A map of windchill instances to their Part21 ids in the Step file |
private static boolean |
DEBUG_ASSOCIATIONS
Debug associations but providing extract output |
private static boolean |
DEBUG_PART21
If set (by property debug.part21) attribute names are written |
private static Object[] |
NO_ARGS
|
private static Class[] |
NO_CLASS_ARGS
|
private static int |
UNDEFINED_ENTITY_ID
|
private Hashtable |
undefined_methods
|
Constructor Summary | |
ExportToP21Processor(ExpressSchema wtSchema,
Properties exportEntityScope,
String outputFilename,
FileOutputStream outputStream,
WTObject[] objects,
boolean downloadAssociatedFiles)
|
|
ExportToP21Processor(ExpressSchema wtSchema,
Properties exportEntityScope,
String outputFilename,
PrintWriter outputWriter,
WTObject[] objects,
boolean downloadAssociatedFiles)
|
|
ExportToP21Processor(ExpressSchema wtSchema,
Properties exportEntityScope,
String outputFilename,
WTObject[] objects,
boolean downloadAssociatedFiles)
|
Method Summary | |
private boolean |
appendEntityAttributesToStatement(StringBuffer statement,
boolean isFirstAttribute,
EntityDefinition entityType,
Object windchillInstance,
Hashtable writtenTypes)
|
private void |
appendEntityAttributeToStatement(StringBuffer statement,
EntityDefinition instanceType,
Object windchillInstance,
EntityDefinition.AttributeDefinition attribute)
|
private void |
appendEntityAttributeValueToStatement(StringBuffer statement,
Object windchillValue,
String attributeTypeName)
|
private StringBuffer |
createP21EntityStatement(EntityDefinition entityType,
Object windchillInstance)
|
private void |
downloadAssociatedDocuments(String stepFilename)
Downloads document contents into subdirectories of the step files directory, one for each document with content. |
private Object |
getAssociatedWindchillObjects(Object windchillInstance,
EntityDefinition instanceType,
TypeDefinition attributeType,
EntityDefinition.AttributeDefinition attribute)
Returns associated objects by traversing Windchill ObjectToObject links for an attribute which represents a role of an association. |
private QueryResult |
getEntityLinksFrom(Object windchillInstance,
Class linkType)
|
private Throwable |
getLowestException(Throwable ex)
|
private int |
getP21IdForWindchillInstance(String attributeType,
Object windchillInstance)
Gets a Part21 step file Id for an instance. |
private Object |
getRelatedWindchillObject(Object windchillInstance,
EntityDefinition instanceType,
EntityDefinition.AttributeDefinition attribute)
|
private Object |
getWindchillAttributeValue(Object windchillInstance,
EntityDefinition instanceType,
EntityDefinition.AttributeDefinition attribute)
Gets the 'raw' value for a particular Windchill object instance. |
private void |
initialiseInstanceScope(WTObject[] scope)
|
private boolean |
isAlreadyTranslated(Object instance)
Has this instance already been translated ? |
private boolean |
isWithinEntityScope(Object instance)
Is this type of instance one of those explicitly asked to be exported |
private boolean |
isWithinInstanceScope(Persistable instance)
Is this instance one of those explicitly asked to be exported |
private void |
recordAssociatedDocument(DocumentVersion document)
|
private int |
translateWindchillInstance(EntityDefinition entityDef,
Object windchillInstance)
|
private int |
translateWindchillInstance(Object windchillInstance)
Translate a Windchill object into STEP format. |
boolean |
windchillObjectIsInstanceOfAttributeType(String attributeType,
Object windchillValue)
|
private void |
writeEntityLinksFrom(EntityDefinition entityType,
Object windchillInstance)
|
private void |
writeP21Contents(WTObject[] objects)
|
protected void |
writeP21Entity(int id,
String statement)
|
protected void |
writeP21Header(String schemaName,
String fullFilename)
|
protected void |
writeP21Tail()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static final int UNDEFINED_ENTITY_ID
private static final Object[] NO_ARGS
private static final Class[] NO_CLASS_ARGS
private ExpressSchema _theWtSchema
private int _p21InstanceCounter
private ExportToP21Processor.WTInstanceMap _wtInstanceToP21IdMap
private ExportToP21Processor.WTInstanceMap _instanceScope
private Properties _entityScope
private boolean _limitExportEntityScope
PrintWriter _p21FileWriter
private Hashtable undefined_methods
private Vector _associatedDocuments
private static boolean DEBUG_PART21
private static boolean DEBUG_ASSOCIATIONS
Constructor Detail |
public ExportToP21Processor(ExpressSchema wtSchema, Properties exportEntityScope, String outputFilename, WTObject[] objects, boolean downloadAssociatedFiles) throws TransferException, WTException, FileNotFoundException, IOException
public ExportToP21Processor(ExpressSchema wtSchema, Properties exportEntityScope, String outputFilename, FileOutputStream outputStream, WTObject[] objects, boolean downloadAssociatedFiles) throws TransferException, WTException, FileNotFoundException, IOException
public ExportToP21Processor(ExpressSchema wtSchema, Properties exportEntityScope, String outputFilename, PrintWriter outputWriter, WTObject[] objects, boolean downloadAssociatedFiles) throws TransferException, WTException, FileNotFoundException, IOException
Method Detail |
private boolean isWithinEntityScope(Object instance)
private void initialiseInstanceScope(WTObject[] scope)
private boolean isWithinInstanceScope(Persistable instance)
private void writeP21Contents(WTObject[] objects) throws TransferException, WTException
TransferException
WTException
protected void writeP21Tail()
protected void writeP21Entity(int id, String statement)
protected void writeP21Header(String schemaName, String fullFilename)
private boolean isAlreadyTranslated(Object instance)
private int translateWindchillInstance(Object windchillInstance) throws TransferException, WTException
windchillInstance
- An object to translate
TransferException
WTException
private int translateWindchillInstance(EntityDefinition entityDef, Object windchillInstance) throws TransferException, WTException
TransferException
WTException
private StringBuffer createP21EntityStatement(EntityDefinition entityType, Object windchillInstance) throws TransferException, WTException
TransferException
WTException
private QueryResult getEntityLinksFrom(Object windchillInstance, Class linkType) throws WTException
WTException
private Object getAssociatedWindchillObjects(Object windchillInstance, EntityDefinition instanceType, TypeDefinition attributeType, EntityDefinition.AttributeDefinition attribute) throws TransferException, WTException
TransferException
WTException
private Object getRelatedWindchillObject(Object windchillInstance, EntityDefinition instanceType, EntityDefinition.AttributeDefinition attribute) throws TransferException, WTException
TransferException
WTException
private void writeEntityLinksFrom(EntityDefinition entityType, Object windchillInstance) throws WTException, TransferException
WTException
TransferException
private boolean appendEntityAttributesToStatement(StringBuffer statement, boolean isFirstAttribute, EntityDefinition entityType, Object windchillInstance, Hashtable writtenTypes) throws TransferException, WTException
TransferException
WTException
private void appendEntityAttributeToStatement(StringBuffer statement, EntityDefinition instanceType, Object windchillInstance, EntityDefinition.AttributeDefinition attribute) throws TransferException, WTException
TransferException
WTException
private void appendEntityAttributeValueToStatement(StringBuffer statement, Object windchillValue, String attributeTypeName) throws TransferException, WTException
TransferException
WTException
private int getP21IdForWindchillInstance(String attributeType, Object windchillInstance) throws TransferException, WTException
TransferException
WTException
private Object getWindchillAttributeValue(Object windchillInstance, EntityDefinition instanceType, EntityDefinition.AttributeDefinition attribute) throws TransferException, WTException
TransferException
WTException
private Throwable getLowestException(Throwable ex)
public boolean windchillObjectIsInstanceOfAttributeType(String attributeType, Object windchillValue)
private void recordAssociatedDocument(DocumentVersion document)
private void downloadAssociatedDocuments(String stepFilename) throws TransferException
TransferException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |