Package org.cip4.jdflib.extensions
Class ProductHelper
java.lang.Object
org.cip4.jdflib.extensions.BaseXJDFHelper
org.cip4.jdflib.extensions.ProductHelper
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic booleanstatic final Stringstatic final Stringstatic final Stringroot products attribute nameFields inherited from class org.cip4.jdflib.extensions.BaseXJDFHelper
log, theElement -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionappendIntent(String name) voidcleanUp()generic cleanup routineintgetChild(int nChild) get the nth child of thisget the nth child of thisDeprecated.use list / booleangetChildren(boolean recurse) get the vector of children of thisgetCreateIntent(String name) static ProductHelperfactory to create a helper from an elementgetIntentAttribute(String intentName, String attName) get an attribute from an explicit intent resourceintintget an attribute from an explicit intent resourcedoubleget the nth child of thisDeprecated.use getExternalIDgetProductResource(String name) getProductSet(String name) booleanvoidsetAmount(int amount) voidsetChild(ProductHelper phKid) voidsetChild(ProductHelper phCover, int amount) Deprecated.voidreference the customerinfo specified by phvoidvoidsetExternalID(String id) voidsetMaxAmount(int amount) voidsetMinAmount(int amount) voidsetProductType(String productType) voidsetProductType(ProductHelper.eProductType productType) voidsetRoot()voidsetRoot(boolean isRoot) Methods inherited from class org.cip4.jdflib.extensions.BaseXJDFHelper
appendElement, appendElement, copyHelper, deleteNode, ensureID, equals, getAttribute, getAttributeMap, getBaseHelper, getBaseHelper, getComment, getCreateElement, getDefaultVersion, getGeneralID, getID, getLocalName, getRoot, getRootDoc, getVersion, getXJDFRoot, getXJMFRoot, getXPathElement, getXPathValue, getXRoot, hasAttribute, hashCode, isEqual, removeAttribute, setAttribute, setAttribute, setComment, setDefaultVersion, setID, setXPathValue, toString
-
Field Details
-
PRODUCT
- See Also:
-
PRODUCTLIST
- See Also:
-
partitionProducts
public static boolean partitionProducts -
rootProduct
root products attribute name- See Also:
-
-
Constructor Details
-
ProductHelper
- Parameters:
product-
-
-
Method Details
-
getHelper
factory to create a helper from an element- Parameters:
root- the element to parse- Returns:
- the helper
-
setRoot
public void setRoot() -
setRoot
public void setRoot(boolean isRoot) - Parameters:
isRoot-
-
getCreateIntent
- Parameters:
name-- Returns:
-
appendIntent
- Parameters:
name-ih-- Returns:
-
getIntent
- Parameters:
name-- Returns:
-
getIntents
- Returns:
- the vector of intent helpers
-
getIntentAttribute
get an attribute from an explicit intent resource- Parameters:
intentName-attName-- Returns:
-
getNodeInfo
get an attribute from an explicit intent resource- Parameters:
intentName-attName-- Returns:
-
getProductSet
- Parameters:
name-- Returns:
-
getCreateProductResource
- Parameters:
name- the resource set name- Returns:
-
getProductResource
- Parameters:
name- the resource set name- Returns:
-
getAmount
public int getAmount()- Returns:
- amount the amount to get
-
setAmount
public void setAmount(int amount) - Parameters:
amount- the amount to set
-
getMaxAmount
public int getMaxAmount()- Returns:
- amount the max amount to get, defaults to the value of amount
-
getProductID
Deprecated.use getExternalID- Returns:
- the productID of the product
-
getExternalID
- Overrides:
getExternalIDin classBaseXJDFHelper- Returns:
- the productID of the product
-
setExternalID
- Parameters:
id-
-
getDescriptiveName
- Overrides:
getDescriptiveNamein classBaseXJDFHelper- Returns:
- the productID of the product
-
setDescriptiveName
- Parameters:
id-
-
getProductType
- Returns:
- the product typeof the product
-
getProductTypeEnum
- Returns:
- the productID of the product
-
setProductType
- Parameters:
productType-
-
setProductType
- Parameters:
productType-
-
getOverproduction
public double getOverproduction()- Returns:
- overproduction in %
-
setMaxAmount
public void setMaxAmount(int amount) - Parameters:
amount- the amount to set
-
getMinAmount
public int getMinAmount()- Returns:
- amount the minamount to get, if not set default to Amount
-
setMinAmount
public void setMinAmount(int amount) - Parameters:
amount- the amount to set
-
setChild
Deprecated.- Parameters:
phCover-amount-
-
setChild
- Parameters:
phCover-
-
getChild
get the nth child of this- Parameters:
nChild- the index of the child- Returns:
-
getParent
get the nth child of this- Parameters:
nChild- the index of the child- Returns:
-
getChild
get the nth child of this- Parameters:
productType- the productType attributen- the index of the child- Returns:
-
getChildren
get the vector of children of this- Returns:
-
getChildren
Deprecated.use list / booleanget the vector of children of this- Returns:
-
getProduct
- Returns:
-
isRootProduct
public boolean isRootProduct()- Returns:
- the explicit value or the heuristic value if not set
-
setCustomerInfo
reference the customerinfo specified by ph- Parameters:
cuph-
-
cleanUp
public void cleanUp()Description copied from class:BaseXJDFHelpergeneric cleanup routine- Overrides:
cleanUpin classBaseXJDFHelper- See Also:
-