Class FinalProduct

java.lang.Object
org.cip4.lib.xjdf.FinalProduct

public class FinalProduct extends Object
Helper class to manage products involved in an xjdf document.
  • Constructor Details

    • FinalProduct

      public FinalProduct()
      Default constructor.
    • FinalProduct

      public FinalProduct(Integer amount, String descriptiveName)
      Custom constructor. Accepting multiple parameters for initializing.
    • FinalProduct

      public FinalProduct(Product rootProductPart, 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 Details

    • getProduct

      public Product getProduct()
      Return the root product part.
      Returns:
      The root product part
    • getDescriptiveName

      public String getDescriptiveName()
      Returns the (root) product's descriptive name.
      Returns:
      The (root) product's descriptive name
    • setDescriptiveName

      public void setDescriptiveName(String descriptiveName)
      Set's the (root) product's descriptive name.
      Parameters:
      descriptiveName - The descriptive name to be set.
    • getAmount

      public Integer getAmount()
      Returns the (root) product's amount.
      Returns:
      The (root) product's amount
    • setAmount

      public void setAmount(Integer amount)
      Set's the (root) product's amount.
      Parameters:
      amount - The amount value to be set.
    • getId

      public String getId()
      Returns the (root) product's id.
      Returns:
      The (root) product's id
    • setId

      public void setId(String id)
      Set's the (root) product's id.
      Parameters:
      id - The id to be set.
    • 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(Class<T> productIntentType)
      Returns a product intent's intent element.
      Parameters:
      productIntentType - The type of the product intent.
      Returns:
      The generic intent element.
    • getIntents

      public List<Intent> getIntents()
      Return list of all intents.
      Returns:
      the list of intents.
    • getProductIntent

      public <T extends ProductIntent> T getProductIntent(Class<T> productIntentType)
      Returns a specific product intent.
      Parameters:
      productIntentType - The type of the product intent.
      Returns:
      The specific product intent.
    • getProductIntentTypes

      public List<Class<?>> getProductIntentTypes()
    • getProductParts

      public List<Product> getProductParts()
      Return all product parts of the final product.
      Returns:
      All product parts of the final product.