wt.step.processor
Class StepProcessor

java.lang.Object
  extended bywt.step.processor.StepProcessor
Direct Known Subclasses:
WTStepProcessor

public class StepProcessor
extends Object

Performs import and export from/to local STEP files and associated document structures.


Field Summary
private  Properties _exportScope
          The Windchill classes that should be exported
private  ExpressSchema _wtSchema
          The Windchill Schema containing entities with fields
private static String EXPORT_SCOPE_FILE
           
private static String ITERATIONS_IMPORT_SCHEME_PROPERTY
           
private static String LOG_FILENAME
           
private static String LOGDIR_PROPERTY
           
private  Vector mkrObjectList
           
private static String VERSIONS_IMPORT_SCHEME_PROPERTY
           
 
Constructor Summary
StepProcessor()
           
 
Method Summary
private  void ensureWindchillSchemaLoaded()
          Ensures that the Windchill Schema file has been loaded providing access to object types and their attributes.
 void exportObjects(String p21Filename, String exportSchemaName, WTObject[] objects, boolean downloadFiles)
          Exports a collection of Windchill Objects.
 Vector getImportedInstances()
           
protected  void importStepFile(String p21Filename, String schemaName, ImportScheme versionsImportScheme, String importFolder, String[] importFilesList, ManagedBaseline baseline)
          Import a STEP data file by converting it to the Windchill Schema and then importing that data.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

mkrObjectList

private Vector mkrObjectList

LOGDIR_PROPERTY

private static final String LOGDIR_PROPERTY
See Also:
Constant Field Values

LOG_FILENAME

private static final String LOG_FILENAME
See Also:
Constant Field Values

VERSIONS_IMPORT_SCHEME_PROPERTY

private static final String VERSIONS_IMPORT_SCHEME_PROPERTY
See Also:
Constant Field Values

ITERATIONS_IMPORT_SCHEME_PROPERTY

private static final String ITERATIONS_IMPORT_SCHEME_PROPERTY
See Also:
Constant Field Values

EXPORT_SCOPE_FILE

private static final String EXPORT_SCOPE_FILE
See Also:
Constant Field Values

_wtSchema

private ExpressSchema _wtSchema
The Windchill Schema containing entities with fields


_exportScope

private Properties _exportScope
The Windchill classes that should be exported

Constructor Detail

StepProcessor

public StepProcessor()
Method Detail

ensureWindchillSchemaLoaded

private void ensureWindchillSchemaLoaded()
                                  throws TransferException
Ensures that the Windchill Schema file has been loaded providing access to object types and their attributes.

Throws:
TransferException
See Also:
ExpressSchema

importStepFile

protected void importStepFile(String p21Filename,
                              String schemaName,
                              ImportScheme versionsImportScheme,
                              String importFolder,
                              String[] importFilesList,
                              ManagedBaseline baseline)
                       throws TransferException
Import a STEP data file by converting it to the Windchill Schema and then importing that data.

Parameters:
p21Filename - The name of the Part21/STEP file to import.
schemaName - The name of the Schema used by the step file.
versionsImportScheme - How to handle imported versions
importFolder - The Folder to create new instances in
importFilesList - A list of the associated files names which should be imported/uploaded. Null if all referenced files should be imported.
baseline - Optional baseline for addition of imported items
Throws:
TransferException
See Also:
ImportScheme, SchemaConverter

getImportedInstances

public Vector getImportedInstances()

exportObjects

public void exportObjects(String p21Filename,
                          String exportSchemaName,
                          WTObject[] objects,
                          boolean downloadFiles)
                   throws TransferException
Exports a collection of Windchill Objects. This is performed by exporting all data about the objects as a Step file in Windchill schema and then using the SchemaConverter to map this data to the required schema.

Parameters:
p21Filename - The file to write the export to.
exportSchemaName - The name of the schema to export as.
downloadFiles - Should the content of associated files be downloaded.
Throws:
TransferException