Module jonix

Class BaseProduct

java.lang.Object
com.tectonica.jonix.unify.UnifiedProduct
com.tectonica.jonix.unify.base.BaseProduct
All Implemented Interfaces:
Serializable
Direct Known Subclasses:
BaseProduct2, BaseProduct3

public class BaseProduct extends UnifiedProduct
Contains the essential information included in ONIX <Product>.

Provided as part of the 'base' suite of classes whose goal is to extract the most important information from an ONIX source (be it ONIX2 or ONIX3) and make it available for other various uses (print in a tabular format, search, sort, etc.). The classes of the 'base' suite bridge the gap between ONIX versions, and provide a unified view of the content, allowing the user to write a version-agnostic code.

Given an instance of raw OnixProduct, i.e. of either ONIX2 or ONIX3, you may create a 'base' product for it:

 BaseProduct baseProduct = JonixUnifier.unifyProduct(product);
 
The resulting BaseProduct will include the essential fields from the product, regardless of the ONIX version.

NOTE: to access the information, use the public fields directly. No getters() are included..

Author:
Zach Melamed
See Also: