org.cip4.jdflib.extensions
Class XJDF20

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

public class XJDF20
extends BaseElementWalker

Author:
Dr. Rainer Prosi, Heidelberger Druckmaschinen AG
conversion class to convert JDF 1.x to the experimental JDF 2.0
very experimental and subject to change without notice 15.01.2009

Nested Class Summary
protected  class XJDF20.WalkAudit
           
protected  class XJDF20.WalkAuditPool
           
protected  class XJDF20.WalkColor
           
 class XJDF20.WalkColorIntentResLink
           
protected  class XJDF20.WalkColorPoolLink
           
protected  class XJDF20.WalkColorPoolRef
           
 class XJDF20.WalkCompany
           
protected  class XJDF20.WalkComponent
           
protected  class XJDF20.WalkContainer
          take a container/FileSpec(Ref) and convert it into a ContainerRef
protected  class XJDF20.WalkDependencies
           
 class XJDF20.WalkDevCap
           
protected  class XJDF20.WalkDevcapElement
           
 class XJDF20.WalkDeviceCap
          simply stop walking on these
protected  class XJDF20.WalkElement
           
 class XJDF20.WalkEvaluation
          simply stop walking on these
protected  class XJDF20.WalkIgnore
          any matching class will be removed with extreme prejudice...
protected  class XJDF20.WalkInlineAllElement
           
protected  class XJDF20.WalkInlineAllRes
           
protected  class XJDF20.WalkInlineResource
           
 class XJDF20.WalkJDF
           
 class XJDF20.WalkJDFElement
           
 class XJDF20.WalkJMF
           
protected  class XJDF20.WalkLayout
           
protected  class XJDF20.WalkLayoutElement
           
protected  class XJDF20.WalkMediaLink
           
protected  class XJDF20.WalkMediaRefByType
           
 class XJDF20.WalkMessage
           
 class XJDF20.WalkModifyQueueEntry
           
protected  class XJDF20.WalkPhaseTimeAudit
           
 class XJDF20.WalkProduct
           
 class XJDF20.WalkRefElement
           
 class XJDF20.WalkResLink
           
 class XJDF20.WalkResLinkPool
           
 class XJDF20.WalkResource
           
protected  class XJDF20.WalkResourceAudit
           
 class XJDF20.WalkResourceInfo
           
protected  class XJDF20.WalkRunList
           
protected  class XJDF20.WalkSeparationList
           
protected  class XJDF20.WalkSeparationSpec
           
protected  class XJDF20.WalkSkip
          any matching class will be ignored and all children will be moved into the respective parent element
protected  class XJDF20.WalkSpan
           
 class XJDF20.WalkState
          simply stop walking on these
protected  class XJDF20.WalkStrippingParams
           
 
Field Summary
 boolean bAbstractMessage
          set to define one type for query, command and registration
 boolean bConvertTilde
          if true tildes are retained as range delimitors
 boolean bHTMLColor
          if true add an htmlcolor attribute to color elements for xsl display purposes
 boolean bIntentPartition
          if true, Intents are partitioned
 boolean bMergeLayout
          if true merge stripping and layout
 boolean bMergeLayoutPrep
          if true merge stripping and layout
 boolean bMergeRunList
          if true clean up runlist/LayoutElement
 boolean bRetainSpawnInfo
          set to retain spawn information
 boolean bSingleNode
          set to update version stamps
 boolean bSpanAsAttribute
          if true, spans are made to a simple attribute rather than retained as span
 boolean bTypeSafeMessage
          set to define type safe messages
protected  Set<String> first
           
protected  KElement newRoot
           
protected  JDFNode oldRoot
           
protected  VString resAttribs
           
static String rootJMF
          the root JMF name
static String rootName
          the root node name
protected  boolean walkingProduct
           
 
Fields inherited from class org.cip4.jdflib.elementwalker.BaseElementWalker
log
 
Fields inherited from class org.cip4.jdflib.elementwalker.ElementWalker
theFactory
 
Constructor Summary
XJDF20()
           
 
Method Summary
 KElement convert(KElement root)
           
protected  VString generateResourceAttributes()
          TODO Please insert comment!
 String getClassName(JDFResource r)
          TODO Please insert comment!
 String getClassName(String name)
          TODO Please insert comment!
static String getExtension()
          calculate a file extension name based of rootName
protected static VJDFAttributeMap getPartMapVector(KElement res)
           
static String getSchemaURL()
          returns the official JDF schema URI for 2.0
 boolean isUpdateVersion()
          Getter for bUpdateVersion attribute.
 KElement makeNewJDF(JDFNode node, VJDFAttributeMap vMap)
           
 KElement makeNewJMF(JDFJMF jmf)
           
 void retainAll()
          set to keep as much of the original structure as possible - used e.g. for xslt display of JDF nodes
 void saveZip(String fileName, JDFNode rootNode, boolean replace)
           
protected  VElement setResource(JDFElement rl, JDFResource linkTarget, KElement xRoot)
           
 void setTrackAudits(boolean trackAudits)
          if true, add a modified audit
 void setUpdateVersion(boolean bUpdateVersion)
          Setter for bUpdateVersion attribute.
 
Methods inherited from class org.cip4.jdflib.elementwalker.BaseElementWalker
constructWalkers, getFactory
 
Methods inherited from class org.cip4.jdflib.elementwalker.ElementWalker
toString, walkTree, walkTreeKidsFirst
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rootName

public static final String rootName
the root node name

See Also:
Constant Field Values

rootJMF

public static final String rootJMF
the root JMF name

See Also:
Constant Field Values

resAttribs

protected VString resAttribs

newRoot

protected KElement newRoot

oldRoot

protected JDFNode oldRoot

walkingProduct

protected boolean walkingProduct

first

protected Set<String> first

bMergeLayout

public boolean bMergeLayout
if true merge stripping and layout


bMergeLayoutPrep

public boolean bMergeLayoutPrep
if true merge stripping and layout


bMergeRunList

public boolean bMergeRunList
if true clean up runlist/LayoutElement


bRetainSpawnInfo

public boolean bRetainSpawnInfo
set to retain spawn information


bSingleNode

public boolean bSingleNode
set to update version stamps


bTypeSafeMessage

public boolean bTypeSafeMessage
set to define type safe messages


bAbstractMessage

public boolean bAbstractMessage
set to define one type for query, command and registration


bSpanAsAttribute

public boolean bSpanAsAttribute
if true, spans are made to a simple attribute rather than retained as span


bIntentPartition

public boolean bIntentPartition
if true, Intents are partitioned


bHTMLColor

public boolean bHTMLColor
if true add an htmlcolor attribute to color elements for xsl display purposes


bConvertTilde

public boolean bConvertTilde
if true tildes are retained as range delimitors

Constructor Detail

XJDF20

public XJDF20()
Method Detail

setTrackAudits

public void setTrackAudits(boolean trackAudits)
if true, add a modified audit

Parameters:
trackAudits -

getSchemaURL

public static String getSchemaURL()
returns the official JDF schema URI for 2.0

Returns:
the URL that fits to majorVersion and minorVersion - null if not supported

convert

public KElement convert(KElement root)
Parameters:
root - the jdf or jmf to transform
Returns:
the root of the XJDF document

makeNewJMF

public KElement makeNewJMF(JDFJMF jmf)
Parameters:
jmf - the jmf to transform
Returns:
the root of the XJDF document

makeNewJDF

public KElement makeNewJDF(JDFNode node,
                           VJDFAttributeMap vMap)
Parameters:
node - the node to transform
vMap - the partmap to transform, null if all
Returns:
the root of the XJDF document

generateResourceAttributes

protected VString generateResourceAttributes()
TODO Please insert comment!

Returns:

getClassName

public String getClassName(String name)
TODO Please insert comment!

Parameters:
name -
Returns:

getClassName

public String getClassName(JDFResource r)
TODO Please insert comment!

Parameters:
r -
Returns:

getExtension

public static String getExtension()
calculate a file extension name based of rootName

Returns:
String

saveZip

public void saveZip(String fileName,
                    JDFNode rootNode,
                    boolean replace)
Parameters:
fileName - the filename of the zip file to save to
rootNode - the root jdf to save
replace - if true, overwrite existing files

setResource

protected VElement setResource(JDFElement rl,
                               JDFResource linkTarget,
                               KElement xRoot)
Parameters:
rl -
linkTarget -
xRoot -
Returns:
the vector of partitions

getPartMapVector

protected static VJDFAttributeMap getPartMapVector(KElement res)
Parameters:
res -
Returns:
omaMaps

retainAll

public void retainAll()
set to keep as much of the original structure as possible - used e.g. for xslt display of JDF nodes


setUpdateVersion

public void setUpdateVersion(boolean bUpdateVersion)
Setter for bUpdateVersion attribute.

Parameters:
bUpdateVersion - the bUpdateVersion to set

isUpdateVersion

public boolean isUpdateVersion()
Getter for bUpdateVersion attribute.

Returns:
the bUpdateVersion


Copyright © 2013. All Rights Reserved.