|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.cip4.jdflib.elementwalker.ElementWalker
org.cip4.jdflib.elementwalker.BaseElementWalker
org.cip4.jdflib.extensions.xjdfwalker.XJDFToJDFConverter
public class XJDFToJDFConverter
| Field Summary | |
|---|---|
boolean |
convertUnits
|
boolean |
createProduct
if true, create the product, else ignore it |
protected JDFNode |
currentJDFNode
|
(package private) boolean |
firstConvert
|
(package private) boolean |
firstproductInList
|
(package private) boolean |
foundProduct
|
(package private) java.util.Map<java.lang.String,IDFinder.IDPart> |
idMap
|
(package private) JDFDoc |
jdfDoc
|
private JDFElement.EnumVersion |
version
|
| Fields inherited from class org.cip4.jdflib.elementwalker.ElementWalker |
|---|
theFactory |
| Constructor Summary | |
|---|---|
XJDFToJDFConverter(JDFDoc template)
|
|
| Method Summary | |
|---|---|
protected void |
attributesToSpan(KElement e)
|
protected KElement |
attributeToSpan(KElement e,
java.lang.String name)
|
boolean |
canConvert(KElement xjdf)
|
private void |
cleanResources(JDFNode theNode)
|
JDFDoc |
convert(KElement xjdf)
|
protected void |
convertUnits(KElement e2)
|
protected JDFNode |
createProductRoot(JDFNode theNode)
make sure we have a product in case we have multiple nodes |
protected JDFSeparationList |
createSeparationList(KElement rPart,
java.lang.String elem)
make a separationlist from an attribute |
private JDFNode |
findNode(KElement xjdf,
boolean create)
find and optionally create the appropriate node |
private void |
fixDependencies(JDFNode root)
TODO Please insert comment! |
private void |
fixOneDependencies(JDFDependencies dep)
TODO Please insert comment! |
JDFElement.EnumVersion |
getVersion()
|
(package private) boolean |
isXResource(KElement toCheck)
|
(package private) boolean |
isXResourceElement(KElement toCheck)
|
private void |
mergeProductLink(JDFNode theNode,
JDFNode parent,
java.lang.String resName,
JDFResourceLink.EnumUsage enumUsage)
|
private void |
mergeProductLinks(JDFNode theNode,
JDFNode parent)
|
protected void |
moveAmountsToLink(JDFAttributeMap partmap,
JDFAttributeMap map,
JDFResourceLink rl)
|
protected void |
moveToLink(JDFResourceLink rl,
JDFAttributeMap partmap,
JDFAttributeMap map,
java.lang.String a)
|
private JDFNode |
prepareRoot()
|
protected KElement |
reparse(KElement xjdf)
|
void |
resetProduct()
reset the product so that multiple independent product xjdf elements can be merged |
void |
setVersion(JDFElement.EnumVersion version)
|
| 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 |
|---|
JDFDoc jdfDoc
java.util.Map<java.lang.String,IDFinder.IDPart> idMap
boolean firstConvert
boolean firstproductInList
boolean foundProduct
protected JDFNode currentJDFNode
public boolean createProduct
public boolean convertUnits
private JDFElement.EnumVersion version
| Constructor Detail |
|---|
public XJDFToJDFConverter(JDFDoc template)
template - the jdfdoc to fill this into| Method Detail |
|---|
public void resetProduct()
public JDFDoc convert(KElement xjdf)
xjdf -
private void fixDependencies(JDFNode root)
root - private void fixOneDependencies(JDFDependencies dep)
dep - protected KElement reparse(KElement xjdf)
private JDFNode prepareRoot()
private void cleanResources(JDFNode theNode)
theNode - public boolean canConvert(KElement xjdf)
xjdf -
private JDFNode findNode(KElement xjdf,
boolean create)
xjdf - create - if true, creat the new node
boolean isXResourceElement(KElement toCheck)
toCheck -
boolean isXResource(KElement toCheck)
toCheck -
protected JDFSeparationList createSeparationList(KElement rPart,
java.lang.String elem)
rPart - elem - the separation list attribute / element
protected JDFNode createProductRoot(JDFNode theNode)
theNode -
protected void convertUnits(KElement e2)
e2 -
private void mergeProductLinks(JDFNode theNode,
JDFNode parent)
theNode - parent -
private void mergeProductLink(JDFNode theNode,
JDFNode parent,
java.lang.String resName,
JDFResourceLink.EnumUsage enumUsage)
theNode - parent - resName - enumUsage - public void setVersion(JDFElement.EnumVersion version)
version - the version to setpublic JDFElement.EnumVersion getVersion()
protected void attributesToSpan(KElement e)
e -
protected KElement attributeToSpan(KElement e,
java.lang.String name)
e - name -
protected void moveToLink(JDFResourceLink rl,
JDFAttributeMap partmap,
JDFAttributeMap map,
java.lang.String a)
rl - partmap - map - a -
protected void moveAmountsToLink(JDFAttributeMap partmap,
JDFAttributeMap map,
JDFResourceLink rl)
partmap - map - rl -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||