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
  • Method Details

    • getAllStepsFromElement

      public NodeList getAllStepsFromElement(Element element)
      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

      public NodeList getAllWorkCentersFromElement(Element element)
      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 null if 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

      public NodeList getAllToolingsFromElement(Element element)
      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 null if no link could be created.
      Throws:
      WTPropertyVetoException
      WTException
    • 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

      public NodeList getAllFixturesFromElement(Element element)
      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 is null and 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 iCheckedOutTI is returned.
      Throws:
      WTPropertyVetoException
      WTException
    • getAllNotesFromElement

      public NodeList getAllNotesFromElement(Element element)
      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

      protected String getNamePrefix(Element iElement)
      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.