org.cip4.jdflib.elementwalker
Class FixVersion

java.lang.Object
  extended by org.cip4.jdflib.elementwalker.ElementWalker
      extended by org.cip4.jdflib.elementwalker.BaseElementWalker
          extended by org.cip4.jdflib.elementwalker.FixVersion

public class FixVersion
extends BaseElementWalker

Author:
Dr. Rainer Prosi, Heidelberger Druckmaschinen AG
fixes versions within JDF 1.x June 7, 2009
uses heuristics to modify this element and its children to be compatible with a given version
in general, it will be able to move from low to high versions, but potentially fail when attempting to move from higher to lower versions This class is the result of refactoring the recursive fixVersion routines from the dom node tree into one class

Nested Class Summary
 class FixVersion.WalkAncestor
           
 class FixVersion.WalkApprovalSuccess
           
 class FixVersion.WalkAssembly
           
 class FixVersion.WalkAssemblySection
           
 class FixVersion.WalkAudit
           
 class FixVersion.WalkColor
           
 class FixVersion.WalkComment
           
 class FixVersion.WalkComponent
           
 class FixVersion.WalkCustomerInfo
           
 class FixVersion.WalkDevice
           
 class FixVersion.WalkElement
          the resource walker note the naming convention Walkxxx so that it is automagically instantiated by the super classes
 class FixVersion.WalkEmployee
           
 class FixVersion.WalkGeneralID
           
 class FixVersion.WalkGeneralIDNamedFeature
           
 class FixVersion.WalkJDF
           
 class FixVersion.WalkJMF
           
 class FixVersion.WalkJMFCommand
           
 class FixVersion.WalkJMFCommandAbortQueueEntry
           
 class FixVersion.WalkJMFCommandQueueFilter
           
 class FixVersion.WalkJMFMessage
           
 class FixVersion.WalkJMFQuery
           
 class FixVersion.WalkJMFResponseAcknowledge
           
 class FixVersion.WalkJMFResponseQueue
           
 class FixVersion.WalkLayout
           
 class FixVersion.WalkLayoutPrep
           
 class FixVersion.WalkNodeInfo
           
 class FixVersion.WalkPageData
           
 class FixVersion.WalkPageList
           
 class FixVersion.WalkPool
           
 class FixVersion.WalkResLink
           
 class FixVersion.WalkResource
           
 class FixVersion.WalkSpanBase
           
 class FixVersion.WalkState
           
 class FixVersion.WalkStrippingParams
           
 class FixVersion.WalkTool
           
 
Field Summary
protected  boolean bFixIDs
           
protected  boolean bLayoutPrepToStripping
           
protected  boolean bOK
           
protected  boolean bZappInvalid
           
protected  boolean fixICSVersions
           
protected  JDFElement.EnumVersion version
           
 
Fields inherited from class org.cip4.jdflib.elementwalker.BaseElementWalker
log
 
Fields inherited from class org.cip4.jdflib.elementwalker.ElementWalker
theFactory
 
Constructor Summary
FixVersion(FixVersion fixVersion)
           
FixVersion(JDFElement.EnumVersion _version)
           
 
Method Summary
 boolean convert(KElement e)
          convert the element e to whichever version has been set up here
protected  BaseWalkerFactory getFactory()
           
 boolean isFixICSVersions()
           
 boolean isFixVersionIDFix()
           
 boolean isOK()
          any problems on the way?
protected  boolean lessThanVersion(JDFElement.EnumVersion v)
          returns true if v is less than the target version
 void setBZappInvalid(boolean zappInvalid)
           
 void setFixICSVersions(boolean pFixICSVersions)
           
 void setFixVersionIDFix(boolean fixVersionIDFix)
           
 void setLayoutPrepToStripping(boolean layoutPrepToStripping)
           
 String toString()
           
protected  void updateAssemblyIDS(JDFElement e)
           
 
Methods inherited from class org.cip4.jdflib.elementwalker.BaseElementWalker
constructWalkers
 
Methods inherited from class org.cip4.jdflib.elementwalker.ElementWalker
walkTree, walkTreeKidsFirst
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bFixIDs

protected boolean bFixIDs

bZappInvalid

protected boolean bZappInvalid

version

protected final JDFElement.EnumVersion version

bOK

protected boolean bOK

fixICSVersions

protected boolean fixICSVersions

bLayoutPrepToStripping

protected boolean bLayoutPrepToStripping
Constructor Detail

FixVersion

public FixVersion(JDFElement.EnumVersion _version)
Parameters:
_version -

FixVersion

public FixVersion(FixVersion fixVersion)
Parameters:
fixVersion -
Method Detail

isFixICSVersions

public boolean isFixICSVersions()
Returns:
the fixICSVersions

setFixICSVersions

public void setFixICSVersions(boolean pFixICSVersions)
Parameters:
pFixICSVersions - the fixICSVersions to set

isFixVersionIDFix

public boolean isFixVersionIDFix()
Returns:
the bFixVersionIDFix if true then invalid, i.e. numeric ID, IDREF and IDREFS are prefixed with an '_' when calling fixVersion

isOK

public boolean isOK()
any problems on the way?

Returns:
the bOK

setFixVersionIDFix

public void setFixVersionIDFix(boolean fixVersionIDFix)
Parameters:
fixVersionIDFix - the bFixVersionIDFix to set if true then invalid, i.e. numeric ID, IDREF and IDREFS are prefixed with an '_' when calling fixVersion

getFactory

protected BaseWalkerFactory getFactory()
Overrides:
getFactory in class BaseElementWalker
Returns:
the factory for this worker

setLayoutPrepToStripping

public void setLayoutPrepToStripping(boolean layoutPrepToStripping)
Parameters:
layoutPrepToStripping - the bLayoutPrepToStripping to set

convert

public boolean convert(KElement e)
convert the element e to whichever version has been set up here

Parameters:
e - the element to convert - typically a JDF element
Returns:
true if all went well

updateAssemblyIDS

protected void updateAssemblyIDS(JDFElement e)
Parameters:
e - the assembly or assemblysection to update

lessThanVersion

protected boolean lessThanVersion(JDFElement.EnumVersion v)
returns true if v is less than the target version

Parameters:
v -
Returns:

toString

public String toString()
Overrides:
toString in class ElementWalker
Returns:
See Also:
Object.toString()

setBZappInvalid

public void setBZappInvalid(boolean zappInvalid)
Parameters:
zappInvalid - the bZappInvalid to set


Copyright © 2013. All Rights Reserved.