Package org.cip4.lib.xjdf
Class FinalProduct
java.lang.Object
org.cip4.lib.xjdf.FinalProduct
Helper class to manage products involved in an xjdf document.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.FinalProduct(Integer amount, String descriptiveName) Custom constructor.FinalProduct(Product rootProductPart, List<Product> allProductParts) Custom constructor creating a final product from the root product part and the list of all product parts. -
Method Summary
Modifier and TypeMethodDescriptionaddIntent(ProductIntent productIntent) Add an intent to the product.voidaddIntents(ProductIntent... productIntents) Add intents to the product.Returns the (root) product's amount.Returns the (root) product's descriptive name.getId()Returns the (root) product's id.<T extends ProductIntent>
IntentReturns a product intent's intent element.Return list of all intents.Return the root product part.<T extends ProductIntent>
TgetProductIntent(Class<T> productIntentType) Returns a specific product intent.Return all product parts of the final product.voidSet's the (root) product's amount.voidsetDescriptiveName(String descriptiveName) Set's the (root) product's descriptive name.voidSet's the (root) product's id.
-
Constructor Details
-
FinalProduct
public FinalProduct()Default constructor. -
FinalProduct
Custom constructor. Accepting multiple parameters for initializing. -
FinalProduct
Custom constructor creating a final product from the root product part and the list of all product parts.- Parameters:
rootProductPart- The root product part.allProductParts- The list of all product parts in the XJDF.
-
-
Method Details
-
getProduct
Return the root product part.- Returns:
- The root product part
-
getDescriptiveName
Returns the (root) product's descriptive name.- Returns:
- The (root) product's descriptive name
-
setDescriptiveName
Set's the (root) product's descriptive name.- Parameters:
descriptiveName- The descriptive name to be set.
-
getAmount
Returns the (root) product's amount.- Returns:
- The (root) product's amount
-
setAmount
Set's the (root) product's amount.- Parameters:
amount- The amount value to be set.
-
getId
Returns the (root) product's id.- Returns:
- The (root) product's id
-
setId
Set's the (root) product's id.- Parameters:
id- The id to be set.
-
addIntents
Add intents to the product.- Parameters:
productIntents- The intents to be added.
-
addIntent
Add an intent to the product.- Parameters:
productIntent- The intent to be added.- Returns:
- The generic intent object for customization.
-
getIntent
Returns a product intent's intent element.- Parameters:
productIntentType- The type of the product intent.- Returns:
- The generic intent element.
-
getIntents
Return list of all intents.- Returns:
- the list of intents.
-
getProductIntent
Returns a specific product intent.- Parameters:
productIntentType- The type of the product intent.- Returns:
- The specific product intent.
-
getProductIntentTypes
-
getProductParts
Return all product parts of the final product.- Returns:
- All product parts of the final product.
-