Package org.cip4.lib.xjdf
Class FinalProduct
- java.lang.Object
-
- org.cip4.lib.xjdf.FinalProduct
-
public class FinalProduct extends java.lang.ObjectHelper class to manage products involved in an xjdf document.
-
-
Constructor Summary
Constructors Constructor Description FinalProduct()Default constructor.FinalProduct(java.lang.Integer amount, java.lang.String descriptiveName)Custom constructor.FinalProduct(Product rootProductPart, java.util.List<Product> allProductParts)Custom constructor creating a final product from the root product part and the list of all product parts.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntentaddIntent(ProductIntent productIntent)Add an intent to the product.voidaddIntents(ProductIntent... productIntents)Add intents to the product.<T extends ProductIntent>
IntentgetIntent(java.lang.Class<T> productIntentType)Returns a product intent's intent element.ProductgetProduct()Return the root product part.<T extends ProductIntent>
TgetProductIntent(java.lang.Class<T> productIntentType)Returns a specific product intent.java.util.List<Product>getProductParts()Return all product parts of the final product.
-
-
-
Constructor Detail
-
FinalProduct
public FinalProduct()
Default constructor.
-
FinalProduct
public FinalProduct(java.lang.Integer amount, java.lang.String descriptiveName)Custom constructor. Accepting multiple parameters for initializing.
-
FinalProduct
public FinalProduct(Product rootProductPart, java.util.List<Product> allProductParts)
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 Detail
-
getProduct
public Product getProduct()
Return the root product part.- Returns:
- The root product part
-
addIntents
public void addIntents(ProductIntent... productIntents)
Add intents to the product.- Parameters:
productIntents- The intents to be added.
-
addIntent
public Intent addIntent(ProductIntent productIntent)
Add an intent to the product.- Parameters:
productIntent- The intent to be added.- Returns:
- The generic intent object for customization.
-
getIntent
public <T extends ProductIntent> Intent getIntent(java.lang.Class<T> productIntentType)
Returns a product intent's intent element.- Parameters:
productIntentType- The type of the product intent.- Returns:
- The generic intent element.
-
getProductIntent
public <T extends ProductIntent> T getProductIntent(java.lang.Class<T> productIntentType)
Returns a specific product intent.- Parameters:
productIntentType- The type of the product intent.- Returns:
- The specific product intent.
-
getProductParts
public java.util.List<Product> getProductParts()
Return all product parts of the final product.- Returns:
- All product parts of the final product.
-
-