psdi.util

Class PreparedScriptHelper

  • java.lang.Object
    • psdi.util.PreparedScriptHelper


  • public class PreparedScriptHelper
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method and Description
      static LinearSegment getSegment(PreparedScript script, MboRemote asset, java.lang.Double woStartMeasure, java.lang.Double woEndMeasure, java.lang.String unitMeasure) 
      static java.util.List getSegments(PreparedScript script, MboRemote asset, java.lang.Double woStartMeasure, java.lang.Double woEndMeasure, java.lang.String unitMeasure)
      Get LinearSegments for a linear asset
      static java.lang.String verifySegmentAttributesAreUnique(PreparedScript script, MboRemote asset, java.lang.Double woStartMeasure, java.lang.Double woEndMeasure)
      Check that the attributes have only 1 value for the work length.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PreparedScriptHelper

        public PreparedScriptHelper()
    • Method Detail

      • verifySegmentAttributesAreUnique

        public static java.lang.String verifySegmentAttributesAreUnique(PreparedScript script,
                                                                        MboRemote asset,
                                                                        java.lang.Double woStartMeasure,
                                                                        java.lang.Double woEndMeasure)
                                                                 throws java.rmi.RemoteException,
                                                                        MXException
        Check that the attributes have only 1 value for the work length. A case can come when we use linear asset with a dynamic jobplan and we do not want to use the linear referencement method. So for the calculation of the with attribute expressions, we must have only 1 value by attribute
        Parameters:
        asset -
        attributes -
        Returns:
        Throws:
        MXException
        java.rmi.RemoteException
      • getSegment

        public static LinearSegment getSegment(PreparedScript script,
                                               MboRemote asset,
                                               java.lang.Double woStartMeasure,
                                               java.lang.Double woEndMeasure,
                                               java.lang.String unitMeasure)
                                        throws java.rmi.RemoteException,
                                               MXException
        Parameters:
        script -
        asset -
        Returns:
        only one
        Throws:
        java.rmi.RemoteException
        MXException
        See Also:
        PreparedScriptHelper#getSegments(PreparedScript, MboRemote, Double, Double)
      • getSegments

        public static java.util.List getSegments(PreparedScript script,
                                                 MboRemote asset,
                                                 java.lang.Double woStartMeasure,
                                                 java.lang.Double woEndMeasure,
                                                 java.lang.String unitMeasure)
                                          throws java.rmi.RemoteException,
                                                 MXException
        Get LinearSegments for a linear asset
        Parameters:
        script - The script that list the attributes / functions used by the expression
        asset - The linear asset which hold the linear attributes
        woStartMeasure - the start measure of the WO (multiassetlocci start or simulation start) in which the calculation must be performed. if null the linear segments will be return as a segment (0-1)
        woEndMeasure - the end measure of the WO (multiassetlocci end or simulation end) in which the calculation must be performed. if null the linear segments will be return as a segment (0-1)
        Returns:
        an ORDERED collection representing the attribute values by segments for the script
        Throws:
        java.rmi.RemoteException
        MXException