Class JDFMerge


  • public class JDFMerge
    extends java.lang.Object
    • Field Detail

      • bUpdateStati

        public boolean bUpdateStati
        set this to true if you want to update the stati of the relevant parent nodes based on the new Stati of the merged node
      • bAddMergeToProcessRun

        public boolean bAddMergeToProcessRun
        set this to true if you want to update the ProcessRun(s) timestamps for this merge
    • Constructor Detail

      • JDFMerge

        public JDFMerge​(JDFNode parentNode)
        Parameters:
        parentNode - the parent node to merge into. MAY be the actual node to be replace or any Parent thereof
    • Method Detail

      • mergeJDF

        public JDFNode mergeJDF​(JDFNode _toMerge,
                                java.lang.String urlMerge,
                                JDFNode.EnumCleanUpMerge cleanPolicy,
                                JDFResource.EnumAmountMerge amountPolicy)
        merge a previously spawned JDF into a node that is a child of, or this root

        default: mergeJDF(subJDFNode, null, JDFNode.EnumCleanUpMerge.None, JDFResource.EnumAmountMerge.None)

        Parameters:
        _toMerge - the previously spawned jdf node
        urlMerge - the url of the ???
        cleanPolicy - policy how to clean up the spawn and merge audits after merging
        amountPolicy - policy how to clean up the Resource amounts after merging
        Returns:
        JDFNode - the merged node in the new document
        note that the return value used to be boolean. The boolean value is now replaced by exceptions. This corresponds to true always.
        Throws:
        JDFException - if subJDFNode has already been merged
        JDFException - if subJDFNode was not spawned from this
        JDFException - if subJDFNode has no AncestorPool default: mergeJDF(subJDFNode, null, JDFNode.EnumCleanUpMerge.None, JDFResource.EnumAmountMerge.None)
      • mergeJDF

        public JDFNode mergeJDF​(JDFNode _toMerge)
        merge a previously spawned JDF into a node that is a child of, or this root
        Parameters:
        _toMerge - the previously spawned jdf node
        Returns:
        JDFNode - the merged node in the new document
        note that the return value used to be boolean. The boolean value is now replaced by exceptions. This corresponds to true always.
        Throws:
        JDFException - if subJDFNode has already been merged
        JDFException - if subJDFNode was not spawned from this
        JDFException - if subJDFNode has no AncestorPool
      • remergeJDF

        public JDFNode remergeJDF​(JDFNode _toMerge)
        merge a previously spawned and previously merged JDF into a node that is a child of, or this root
        Parameters:
        _toMerge - the previously spawned jdf node
        Returns:
        JDFNode - the merged node in the new document
        note that the return value used to be boolean. The boolean value is now replaced by exceptions. This corresponds to true always.
        Throws:
        JDFException - if subJDFNode has no AncestorPool
      • remergeAuditPools

        protected void remergeAuditPools()
      • mergeLocalResourcePool

        protected void mergeLocalResourcePool​(JDFNode overwriteLocalNode,
                                              JDFNode toMergeLocalNode)
      • mergePartition

        public static JDFResource mergePartition​(JDFResource targetRes,
                                                 JDFResource toMerge,
                                                 java.lang.String spawnID,
                                                 JDFResource.EnumAmountMerge amountPolicy,
                                                 boolean bLocalResource)
        Merges partitioned resources into this resource uses PartIDKey to identify the correct resources
        Parameters:
        targetRes -
        resToMerge - the resource leaf to merge into this
        spawnID - the spawnID of the spawning that will now be merged
        amountPolicy - how to clean up the Resource amounts after merging
        bLocalResource - must be true for the local resources in a spawned node and its subnodes, which default to RW
        Returns:
        Throws:
        JDFException - if here is an attempt to merge incompatible resources
        JDFException - if here is an attempt to merge incompatible partitions
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()