com.ptc.hli.ecad
Class ECADDesign

java.lang.Object
  extended bycom.ptc.hli.ecad.ECADDesign

public class ECADDesign
extends Object

The ECADDesign class holds the Windchill objects which taken together represent an variant structure. It includes 2 ECADDocuments: the Board and the Source, as well as a table of all ECADDocuments used or referenced by the design, a table of all assemblies(variants), and the name of the designFile,

The iterations of the structure are stored as a EPMAsStoredConfig containing all the EPMDocuments related to that iteration.

When an design is checked out, an EPMWorkspace is created to hold the current objects until checkin.



Supported API: true

Extendable: false


Field Summary
private  HashMap assemblies
           
private  EPMAsStoredConfig asStored
           
private  ECADDocument boardDoc
           
private  HashMap documents
           
private  Folder folderCache
           
private  ECADDocument schematicDoc
           
private  ECADDocument sourceDoc
           
private  WTContainerRef workingContainerRef
           
private  EPMWorkspace workspace
           
 
Constructor Summary
protected ECADDesign(ECADDocument _sourceDoc)
           
protected ECADDesign(ECADDocument _sourceDoc, ECADDocument _boardDoc)
           
protected ECADDesign(ECADDocument _sourceDoc, ECADDocument _boardDoc, ECADDocument _schematicDoc)
           
protected ECADDesign(ECADDocument _sourceDoc, ECADDocument _boardDoc, ECADDocument _schematicDoc, Baseline baseline)
           
 
Method Summary
 void addAssembly(ECADAssembly assembly)
          Add an assembly

Supported API: false
 void addECADDoc(ECADDocument ecadDoc)
          Add an ECADDocument to the document list for this design

Supported API: false
 ECADAssembly getAssembly(String assmNumber)
          Get the ECADAssembly with the given number.
 ECADDocument getBoardDoc()
          Return the ECADDocument representing the board

Supported API: true
 EPMCheckpoint getCheckpoint()
          Get the EPMCheckpoint of the ECADDesign

Supported API: true
 ECADDocument getComponentDoc(String number)
          Get the ECADDocument with the given number which is also a COMPONENT Document.
 HashMap getComponentDocMap()
           
 Vector getComponentDocs()
          Retrieve all COMPONENT documents.
 ECADDocument getContentDoc(String docNumber)
          Get the ECADDocument with the given number which is also a CONTENT Document.
 HashMap getContentDocMap()
           
 Vector getContentDocs()
          Retrieve all CONTENT documents.
 String getDescription()
          Return the description of the ECADDesign

Supported API: true
static ECADDesign getDesign(Baseline baseline)
          Static method to build an ECADDesign structure for the variant design which is defined by a specific Baseline.
static ECADDesign getDesign(String assemblyNumber, String version, WTContainerRef containerRef)
          Static method to build an ECADDesign structure for the variant design which contains the given assembly

Supported API: true
 ECADDocument getDocument(String docNumber)
          Get the ECADDocument with the given number

Supported API: true
private static Vector getDocuments(EPMDocument[] docArray, EPMDocumentType type)
           
 Vector getECADAssemblies()
          Return an array of ECADAssemblies contained in the Design

Supported API: false
 EPMAsStoredConfig getEPMAsStoredConfig()
          Return the EPMAsStoredConfig representing the stored ECADSource

Supported API: false
 EPMDocument[] getEPMDocuments()
          Get an array of all EPMDocuments in the design

Supported API: false
 EPMWorkspace getEPMWorkspace()
           
 Folder getFolder()
          Return the Folder for the ECADDesign

Supported API: true
static Baseline getLatestBaseline(String assemblyNumber, String version, WTContainerRef containerRef)
           
 String getName()
           
 String getNumber()
          Return the name and number of the ECADDesign as represented by the name and number of the Source document

Supported API: true
 ECADDocument getSchematicDoc()
          Return the ECADDocument representing the schematic - if it exists

Supported API: true
 ECADDocument getSourceDoc()
          Return the ECADDocument representing the source

Supported API: true
 String getVersion()
           
 WTContainerRef getworkingContainer()
          Return the WTContainerRef representing the workingContainer

Supported API: true
 EPMWorkspace getWorkspace()
          Get the EPMWorkspace of the ECADDesign

Supported API: true
protected static ECADDocument intializeContent(EPMDocument epmDoc, ECADDesign design)
           
protected static void intializeContent(EPMDocument epmDoc, ECADDocument doc)
           
 boolean isCheckedOut()
           
protected  EPMCheckpoint lookupCheckpoint()
           
protected static EPMCheckpoint lookupCheckpoint(EPMDocument epmDoc)
           
static ECADDesign newECADDesign(ECADDocument sourceDoc, ECADDocument boardDoc)
          Factory method to construct a new ECADDesign containing the given ECADDocuments.
static ECADDesign newECADDesign(ECADDocument sourceDoc, ECADDocument boardDoc, ECADDocument schematicDoc)
           
 void removeAssembly(ECADAssembly assembly)
          Remove an assembly

Supported API: false
 void removeECADDoc(ECADDocument ecadDoc)
          Remove an ECADDocument from the document list for this design

Supported API: false
 void setDescription(String newDescription)
          Set the description of the ECADDesign

Supported API: true
 void setEPMAsStoredConfig(EPMAsStoredConfig _asStored)
          Set the EPMAsStoredConfig representing the stored ECADSource

Supported API: false
 void setEPMWorkspace(EPMWorkspace workspace)
           
 void setFolder(Folder _folder)
          Set the Folder for the ECADDesign

Supported API: true input Folder folder for initial creation of design
 void setSchematicDoc(ECADDocument schematicDoc)
          Set the ECADDocument representing the schematic This will replace the current schematic document if one exists.
 void setworkingContainer(WTContainerRef _workingContainerRef)
          Set the WTContainerRef representing the workingContainer

Supported API: false
 String toString()
          Override of the toString method for outputting the ECADAssembly

Supported API: false
 void update(ECADTransaction transaction)
          Update the design with the results of a transaction

Supported API: false
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

sourceDoc

private ECADDocument sourceDoc

boardDoc

private ECADDocument boardDoc

schematicDoc

private ECADDocument schematicDoc

asStored

private EPMAsStoredConfig asStored

workspace

private EPMWorkspace workspace

assemblies

private HashMap assemblies

documents

private HashMap documents

folderCache

private Folder folderCache

workingContainerRef

private WTContainerRef workingContainerRef
Constructor Detail

ECADDesign

protected ECADDesign(ECADDocument _sourceDoc,
                     ECADDocument _boardDoc,
                     ECADDocument _schematicDoc,
                     Baseline baseline)
              throws WTException

ECADDesign

protected ECADDesign(ECADDocument _sourceDoc,
                     ECADDocument _boardDoc,
                     ECADDocument _schematicDoc)
              throws WTException

ECADDesign

protected ECADDesign(ECADDocument _sourceDoc,
                     ECADDocument _boardDoc)
              throws WTException

ECADDesign

protected ECADDesign(ECADDocument _sourceDoc)
              throws WTException
Method Detail

getBoardDoc

public ECADDocument getBoardDoc()
Return the ECADDocument representing the board

Supported API: true

Returns:
ECADDocument

getSchematicDoc

public ECADDocument getSchematicDoc()
Return the ECADDocument representing the schematic - if it exists

Supported API: true

Returns:
ECADDocument

setSchematicDoc

public void setSchematicDoc(ECADDocument schematicDoc)
Set the ECADDocument representing the schematic This will replace the current schematic document if one exists.

Supported API: true


getSourceDoc

public ECADDocument getSourceDoc()
Return the ECADDocument representing the source

Supported API: true

Returns:
ECADDocument

getNumber

public String getNumber()
Return the name and number of the ECADDesign as represented by the name and number of the Source document

Supported API: true

Returns:
String

getName

public String getName()

getVersion

public String getVersion()

getAssembly

public ECADAssembly getAssembly(String assmNumber)
Get the ECADAssembly with the given number.

Supported API: true


getEPMAsStoredConfig

public EPMAsStoredConfig getEPMAsStoredConfig()
                                       throws WTException
Return the EPMAsStoredConfig representing the stored ECADSource

Supported API: false

Returns:
EPMAsStoredConfig
Throws:
WTException

setEPMAsStoredConfig

public void setEPMAsStoredConfig(EPMAsStoredConfig _asStored)
                          throws WTException
Set the EPMAsStoredConfig representing the stored ECADSource

Supported API: false

Throws:
WTException

setFolder

public void setFolder(Folder _folder)
               throws WTException
Set the Folder for the ECADDesign

Supported API: true input Folder folder for initial creation of design

Throws:
WTException

getFolder

public Folder getFolder()
                 throws WTException
Return the Folder for the ECADDesign

Supported API: true

Returns:
Folder
Throws:
WTException

getDescription

public String getDescription()
Return the description of the ECADDesign

Supported API: true

Returns:
String - the description of the ECADDesign.

setDescription

public void setDescription(String newDescription)
                    throws WTPropertyVetoException
Set the description of the ECADDesign

Supported API: true

Throws:
WTPropertyVetoException

getWorkspace

public EPMWorkspace getWorkspace()
                          throws WTException
Get the EPMWorkspace of the ECADDesign

Supported API: true

Returns:
EPMWorkspace or null if Design not checkedout
Throws:
WTException

getCheckpoint

public EPMCheckpoint getCheckpoint()
                            throws WTException
Get the EPMCheckpoint of the ECADDesign

Supported API: true

Returns:
EPMCheckpoint or null if Design not checkedout
Throws:
WTException

removeAssembly

public void removeAssembly(ECADAssembly assembly)
Remove an assembly

Supported API: false


addAssembly

public void addAssembly(ECADAssembly assembly)
Add an assembly

Supported API: false


getECADAssemblies

public Vector getECADAssemblies()
Return an array of ECADAssemblies contained in the Design

Supported API: false

Returns:
Vector

getContentDoc

public ECADDocument getContentDoc(String docNumber)
Get the ECADDocument with the given number which is also a CONTENT Document.

Supported API: true


getDocument

public ECADDocument getDocument(String docNumber)
Get the ECADDocument with the given number

Supported API: true


getComponentDoc

public ECADDocument getComponentDoc(String number)
Get the ECADDocument with the given number which is also a COMPONENT Document.

Supported API: true


getContentDocs

public Vector getContentDocs()
Retrieve all CONTENT documents.

Supported API: true

Returns:
Vector of ECADDocuments.

getContentDocMap

public HashMap getContentDocMap()

getComponentDocs

public Vector getComponentDocs()
Retrieve all COMPONENT documents.

Supported API: true

Returns:
Vector of ECADDocuments.

getComponentDocMap

public HashMap getComponentDocMap()

toString

public String toString()
Override of the toString method for outputting the ECADAssembly

Supported API: false

Returns:
String - detailed contents of the ECADAssembly

addECADDoc

public void addECADDoc(ECADDocument ecadDoc)
                throws WTException
Add an ECADDocument to the document list for this design

Supported API: false

Throws:
WTException

removeECADDoc

public void removeECADDoc(ECADDocument ecadDoc)
Remove an ECADDocument from the document list for this design

Supported API: false


update

public void update(ECADTransaction transaction)
Update the design with the results of a transaction

Supported API: false


getEPMDocuments

public EPMDocument[] getEPMDocuments()
Get an array of all EPMDocuments in the design

Supported API: false

Returns:
EPMDocument[]

getEPMWorkspace

public EPMWorkspace getEPMWorkspace()

setEPMWorkspace

public void setEPMWorkspace(EPMWorkspace workspace)

getDesign

public static ECADDesign getDesign(String assemblyNumber,
                                   String version,
                                   WTContainerRef containerRef)
                            throws WTException
Static method to build an ECADDesign structure for the variant design which contains the given assembly

Supported API: true

Throws:
WTException

getLatestBaseline

public static Baseline getLatestBaseline(String assemblyNumber,
                                         String version,
                                         WTContainerRef containerRef)
                                  throws WTException
Throws:
WTException

getDesign

public static ECADDesign getDesign(Baseline baseline)
                            throws WTException
Static method to build an ECADDesign structure for the variant design which is defined by a specific Baseline.

Supported API: true

Throws:
WTException

newECADDesign

public static ECADDesign newECADDesign(ECADDocument sourceDoc,
                                       ECADDocument boardDoc)
                                throws WTException
Factory method to construct a new ECADDesign containing the given ECADDocuments.

Supported API: true

Throws:
IllegalArgumentException, - WTException
WTException

newECADDesign

public static ECADDesign newECADDesign(ECADDocument sourceDoc,
                                       ECADDocument boardDoc,
                                       ECADDocument schematicDoc)
                                throws WTException
Throws:
WTException

lookupCheckpoint

protected static EPMCheckpoint lookupCheckpoint(EPMDocument epmDoc)
                                         throws WTException
Throws:
WTException

lookupCheckpoint

protected EPMCheckpoint lookupCheckpoint()
                                  throws WTException
Throws:
WTException

getDocuments

private static Vector getDocuments(EPMDocument[] docArray,
                                   EPMDocumentType type)

intializeContent

protected static ECADDocument intializeContent(EPMDocument epmDoc,
                                               ECADDesign design)
                                        throws WTException
Throws:
WTException

intializeContent

protected static void intializeContent(EPMDocument epmDoc,
                                       ECADDocument doc)
                                throws WTException
Throws:
WTException

getworkingContainer

public WTContainerRef getworkingContainer()
Return the WTContainerRef representing the workingContainer

Supported API: true

Returns:
WTContainerRef

setworkingContainer

public void setworkingContainer(WTContainerRef _workingContainerRef)
Set the WTContainerRef representing the workingContainer

Supported API: false


isCheckedOut

public boolean isCheckedOut()
                     throws WTException
Throws:
WTException