Package org.cip4.lib.xjdf.builder
Class ProductBuilder
- java.lang.Object
-
- org.cip4.lib.xjdf.builder.AbstractNodeBuilder<Product>
-
- org.cip4.lib.xjdf.builder.ProductBuilder
-
public class ProductBuilder extends AbstractNodeBuilder<Product>
Implementation of a Product builder class.
-
-
Constructor Summary
Constructors Constructor Description ProductBuilder()Default constructor.ProductBuilder(java.lang.Integer amount)Custom Constructor.ProductBuilder(java.lang.Integer amount, java.lang.String productType, java.lang.String productTypeDetails)Custom Constructor.ProductBuilder(java.lang.Integer amount, java.lang.String productType, java.lang.String productTypeDetails, java.lang.String descriptiveName)Custom Constructor.ProductBuilder(Product product)Custom Constructor.ProductBuilder(org.w3c.dom.Node productNode)Custom constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddIntent(ProductIntent intent)Append Intent node to Product Definition.protected ProductgetProduct()Getter for product attribute.-
Methods inherited from class org.cip4.lib.xjdf.builder.AbstractNodeBuilder
build, getNode
-
-
-
-
Constructor Detail
-
ProductBuilder
public ProductBuilder()
Default constructor.
-
ProductBuilder
public ProductBuilder(org.w3c.dom.Node productNode) throws jakarta.xml.bind.JAXBExceptionCustom constructor. Accepting a W3C Node object for initializing.- Parameters:
productNode- W2C Node object for- Throws:
jakarta.xml.bind.JAXBException
-
ProductBuilder
public ProductBuilder(java.lang.Integer amount)
Custom Constructor. Creates a new instance of ProductBuilder which already contains attribute Amount.- Parameters:
amount- Value of Amount attribute
-
ProductBuilder
public ProductBuilder(java.lang.Integer amount, java.lang.String productType, java.lang.String productTypeDetails)Custom Constructor. Creates a new instance of ProductBuilder which already contains attributes Amount, ID, ProductType and ProductTypeDetails.- Parameters:
amount- Value of Amount attributeproductType- Value of ProductType attributeproductTypeDetails- Value of ProductTypeDetails attribute
-
ProductBuilder
public ProductBuilder(java.lang.Integer amount, java.lang.String productType, java.lang.String productTypeDetails, java.lang.String descriptiveName)Custom Constructor. Creates a new instance of ProductBuilder which already contains attributes Amount, ID, ProductType and ProductTypeDetails.- Parameters:
amount- Value of Amount attributeproductType- Value of ProductType attributeproductTypeDetails- Value of ProductTypeDetails attributedescriptiveName- String value for DescriptiveName attribute.
-
ProductBuilder
public ProductBuilder(Product product)
Custom Constructor. Creates a new instance of ProductBuilder based on a existing Product Node.- Parameters:
product- Product node for initializing.
-
-
Method Detail
-
getProduct
protected Product getProduct()
Getter for product attribute.- Returns:
- the product
-
addIntent
public void addIntent(ProductIntent intent)
Append Intent node to Product Definition.- Parameters:
intent- Intent object to append to.
-
-