Package com.ptc.windchill.mpml.nc
Class DefaultNCFileOperationsParserDelegate
java.lang.Object
com.ptc.windchill.mpml.nc.AbstractNCFileParser
com.ptc.windchill.mpml.nc.DefaultNCFileOperationsParserDelegate
- All Implemented Interfaces:
com.ptc.windchill.mpml.nc.NCFileOperationsParser,com.ptc.windchill.mpml.nc.NCFileParser
- Direct Known Subclasses:
DefaultNCFileStepsParserDelegate
public class DefaultNCFileOperationsParserDelegate
extends com.ptc.windchill.mpml.nc.AbstractNCFileParser
implements com.ptc.windchill.mpml.nc.NCFileOperationsParser
This is the default parser for NC operations. In an NC/XML file, the operations are delared as part of the global
processs plan.
Supported API: true
Extendable: true
Supported API: true
Extendable: true
-
Field Summary
Fields inherited from class com.ptc.windchill.mpml.nc.AbstractNCFileParser
RESOURCE_BUNDLE -
Method Summary
Modifier and TypeMethodDescriptioncreateToolingAllocations(MPMOperation iOperation, WTCollection iToolingMasters, NCFileHelperData iHelperData, NCFileLog iLog, boolean isFixture, WTCollection toolingFromXMLAndProperty) Create an opeation-to-tooling link.getAllFixturesFromElement(Element element) Parse element to find all declared Fixtures based on xml tag (default: "FixtureSetupRef").getAllNotesFromElement(Element element) Parse element to find all declared Notes based on xml tag (default: "Notes").getAllStepsFromElement(Element element) Parse element to find all declared steps based on xml tag (default: "Step").getAllToolingsFromElement(Element element) Parse element to find all declared Toolings based on xml tag (default: "ToolRecords").getAllWorkCentersFromElement(Element element) Parse element to find all declared WorkCenters based on xml tag (default: "WorkcellRef").protected StringgetNamePrefix(Element iElement) Get the name prefix for this operation.getWorkCenterAllocation(MPMOperation iOperation) Get the work center allocated to an operation.voidremoveToolingAllocations(WTCollection iToolingMasters, WTCollection iToolingLinks, NCFileHelperData iHelperData, NCFileLog iLog, boolean isFixture) Remove opeation-to-tooling links.voidreplaceWorkCenter(MPMOperationToWorkCenterLink iWorkCenterLink, MPMWorkCenterMaster iNewWorkCenterMaster) Update the work center assigned to an operation.updateLongDescription(MPMOperation iOperation, Element iElement, TypeInstance iCheckedOutTI, NCFileHelperData iHelperData, NCFileLog iLog) Update the long description of an operation.Methods inherited from class com.ptc.windchill.mpml.nc.AbstractNCFileParser
getAttributeForCadDocumentUniqueId, getAttributeForUniqueId, getElementName, getId, getId, getId, getId, getId, getLatestIterationForCADDocument, getLatestIterations, isNullOrBlank, logAdd, logError, logRemove, logReplaced, logSuccess, logUpdate, queryFromDB
-
Method Details
-
getAllStepsFromElement
Parse element to find all declared steps based on xml tag (default: "Step").
Supported API: true- Parameters:
iElement- The XML element containing the declaration of the step.- Returns:
- NodeList Nodes (coming from the XML file) to process.
-
getAllWorkCentersFromElement
Parse element to find all declared WorkCenters based on xml tag (default: "WorkcellRef").
Supported API: true- Parameters:
iElement- The XML element containing the declaration of the WorkCenter.- Returns:
- NodeList Nodes (coming from the XML file) to process.
-
getWorkCenterAllocation
public MPMOperationToWorkCenterLink getWorkCenterAllocation(MPMOperation iOperation) throws WTException Get the work center allocated to an operation.
Supported API: true- Parameters:
iOperation- The operation to search.- Returns:
- The link to the work center (master) allocated to the operation or
nullif no work center is allocated. - Throws:
WTException
-
replaceWorkCenter
public void replaceWorkCenter(MPMOperationToWorkCenterLink iWorkCenterLink, MPMWorkCenterMaster iNewWorkCenterMaster) throws WTPropertyVetoException Update the work center assigned to an operation.
Supported API: true- Parameters:
iWorkCenterLink- The existing link from the operation to the work center.iNewWorkCenterMaster- The new work center to allocate to the operation.- Throws:
WTPropertyVetoException
-
getAllToolingsFromElement
Parse element to find all declared Toolings based on xml tag (default: "ToolRecords").
Supported API: true- Parameters:
iElement- The XML element containing the declaration of the Tooling.- Returns:
- NodeList Nodes (coming from the XML file) to process.
-
createToolingAllocations
public WTCollection createToolingAllocations(MPMOperation iOperation, WTCollection iToolingMasters, NCFileHelperData iHelperData, NCFileLog iLog, boolean isFixture, WTCollection toolingFromXMLAndProperty) throws WTPropertyVetoException, WTException Create an opeation-to-tooling link.
Supported API: true- Parameters:
iOperation- The operation on which the link must be created.iToolingMasters- The collection containing the toolings to link.- Returns:
- A collection containing the new link between the operation and the toolings passed, or
nullif no link could be created. - Throws:
WTPropertyVetoExceptionWTException
-
removeToolingAllocations
public void removeToolingAllocations(WTCollection iToolingMasters, WTCollection iToolingLinks, NCFileHelperData iHelperData, NCFileLog iLog, boolean isFixture) throws WTException Remove opeation-to-tooling links.
Supported API: true- Parameters:
iToolingMasters- The collection containing the toolings to remove.iToolingLinks- The collection containing the links to the toolings to remove. This collection must contain at least the links to the different toolings contained in the first parameter.- Throws:
WTException
-
getAllFixturesFromElement
Parse element to find all declared Fixtures based on xml tag (default: "FixtureSetupRef").
Supported API: true- Parameters:
iElement- The XML element containing the declaration of the Fixture.- Returns:
- NodeList Nodes (coming from the XML file) to process.
-
updateLongDescription
public TypeInstance updateLongDescription(MPMOperation iOperation, Element iElement, TypeInstance iCheckedOutTI, NCFileHelperData iHelperData, NCFileLog iLog) throws WTPropertyVetoException, WTException Update the long description of an operation. This method will replace the long description if it exists, or add a new description otherwise. The description to be added/updated is declared in the XML file.
Supported API: true- Parameters:
iOperation- The operation to update.iElement- The element inside the XML file containing the long description for this operation.iCheckedOutTI- The type instance pointing to the checked out iteration, if the operation was previously checked out. If this parameter isnulland the description must be updated, the operation will be checked out.iHelperData-iLog-- Returns:
- The type instance of the checked out (or saved) iteration. If no update was made to this operation, the
value of parameter
iCheckedOutTIis returned. - Throws:
WTPropertyVetoExceptionWTException
-
getAllNotesFromElement
Parse element to find all declared Notes based on xml tag (default: "Notes").
Supported API: true- Parameters:
iElement- The XML element containing the declaration of the Note.- Returns:
- NodeList Nodes (coming from the XML file) to process.
-
getNamePrefix
Get the name prefix for this operation. The name prefix will be displayed next to the operation name in the report.
Supported API: true- Parameters:
iElement- The XML element containing the declaration of the operation.- Returns:
- The name prefix.
-