Class XJDFToJDFImpl
java.lang.Object
org.cip4.jdflib.elementwalker.ElementWalker
org.cip4.jdflib.elementwalker.PackageElementWalker
org.cip4.jdflib.extensions.xjdfwalker.xjdftojdf.XJDFToJDFImpl
- Direct Known Subclasses:
XJDFToJDFConverter
-
Field Summary
Fields inherited from class org.cip4.jdflib.elementwalker.ElementWalker
theFactory -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected KElementattributeToSpan(KElement e, String name) static booleancanConvert(KElement xjdf) protected BaseWalkerconstructWalker(String name) protected JDFDocprotected voidconvertTilde(KElement e2) protected voidconvertUnits(KElement element) protected JDFNodemake sure we have a product in case we have multiple nodesbooleanGetter for bConvertTilde attribute.booleanGetter for convertUnits attribute.booleanGetter for createProduct attribute.booleanbooleanGetter for typeLinks attribute.protected voidmoveAmountsToLink(JDFAttributeMap partmap, JDFAttributeMap map, JDFResourceLink rl) protected voidpostConvert(JDFNode theNode) protected XJDFHelperprotected KElementvoidvoidreset the product so that multiple independent product xjdf elements can be mergedvoidsetConvertTilde(boolean b) if true tildes are converted to pairs in xjdf 2.0voidsetConvertUnits(boolean convertUnits) Setter for convertUnits attribute.voidsetCreateProduct(boolean createProduct) Setter for createProduct attribute.voidsetHeuristicLink(boolean heuristicLink) if true, we will find a @Usage for sets with no Usage using fuzzy heuristicsvoidsetTypeLinks(boolean typeLinks) Setter for typeLinks attribute.voidsetVersion(JDFElement.EnumVersion version) Methods inherited from class org.cip4.jdflib.elementwalker.PackageElementWalker
getFactoryMethods inherited from class org.cip4.jdflib.elementwalker.ElementWalker
toString, walkTree, walkTreeKidsFirst
-
Constructor Details
-
XJDFToJDFImpl
- Parameters:
template- the jdfdoc to fill this into
-
-
Method Details
-
setVersion
- Parameters:
version- the version to set - unused
-
constructWalker
- Overrides:
constructWalkerin classPackageElementWalker- Returns:
- See Also:
-
isCreateProduct
public boolean isCreateProduct()Getter for createProduct attribute.- Returns:
- the createProduct
-
setCreateProduct
public void setCreateProduct(boolean createProduct) Setter for createProduct attribute.- Parameters:
createProduct- the createProduct to set
-
isConvertUnits
public boolean isConvertUnits()Getter for convertUnits attribute.- Returns:
- the convertUnits
-
setConvertUnits
public void setConvertUnits(boolean convertUnits) Setter for convertUnits attribute.- Parameters:
convertUnits- the convertUnits to set
-
isbConvertTilde
public boolean isbConvertTilde()Getter for bConvertTilde attribute.- Returns:
- the bConvertTilde
-
reset
-
resetProduct
public void resetProduct()reset the product so that multiple independent product xjdf elements can be merged -
convert
- Parameters:
_xjdf-- Returns:
- the converted jdf
-
postConvert
- Parameters:
theNode-
-
presplit
-
reparse
- Parameters:
xjdf-- Returns:
-
canConvert
- Parameters:
xjdf-- Returns:
- true if the element can be converted
-
createProductRoot
make sure we have a product in case we have multiple nodes- Returns:
-
convertUnits
- Parameters:
element-
-
convertTilde
- Parameters:
e2-
-
getVersion
- Returns:
- the version
-
attributesToSpan
- Parameters:
e-
-
attributeToSpan
- Parameters:
e-name-- Returns:
- the new span element
-
moveAmountsToLink
- Parameters:
partmap-map-rl-
-
setConvertTilde
public void setConvertTilde(boolean b) if true tildes are converted to pairs in xjdf 2.0- Parameters:
b-
-
setTypeLinks
public void setTypeLinks(boolean typeLinks) Setter for typeLinks attribute. if true, we will only create links that are appropriate for the respective type or types- Parameters:
heuristicLink- the typeLinks to set
-
isTypeLinks
public boolean isTypeLinks()Getter for typeLinks attribute.- Returns:
- the typeLinks
-
isHeuristicLink
public boolean isHeuristicLink()- Returns:
-
setHeuristicLink
public void setHeuristicLink(boolean heuristicLink) if true, we will find a @Usage for sets with no Usage using fuzzy heuristics- Parameters:
heuristicLink-
-
getXJDFVersion
-