Package org.cip4.lib.xjdf.builder
Class ProductBuilder
Implementation of a Product builder class.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.ProductBuilder(Integer amount) Custom Constructor.ProductBuilder(Integer amount, String productType, String productTypeDetails) Custom Constructor.ProductBuilder(Integer amount, String productType, String productTypeDetails, String descriptiveName) Custom Constructor.ProductBuilder(Product product) Custom Constructor.ProductBuilder(Node productNode) Custom constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddIntent(ProductIntent intent) Append Intent node to Product Definition.protected ProductGetter for product attribute.Methods inherited from class org.cip4.lib.xjdf.builder.AbstractNodeBuilder
build, getNode
-
Constructor Details
-
ProductBuilder
public ProductBuilder()Default constructor. -
ProductBuilder
Custom constructor. Accepting a W3C Node object for initializing.- Parameters:
productNode- W2C Node object for- Throws:
javax.xml.bind.JAXBException
-
ProductBuilder
Custom Constructor. Creates a new instance of ProductBuilder which already contains attribute Amount.- Parameters:
amount- Value of Amount attribute
-
ProductBuilder
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(Integer amount, String productType, String productTypeDetails, 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
Custom Constructor. Creates a new instance of ProductBuilder based on a existing Product Node.- Parameters:
product- Product node for initializing.
-
-
Method Details
-
getProduct
Getter for product attribute.- Returns:
- the product
-
addIntent
Append Intent node to Product Definition.- Parameters:
intent- Intent object to append to.
-