Class ProductUtil
java.lang.Object
de.dlr.proseo.ingestor.rest.model.ProductUtil
Utility methods for products, e. g. for conversion between prosEO model and
REST model
- Author:
- Dr. Thomas Bassler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ProducttoModelProduct(RestProduct restProduct) Convert a REST product into a prosEO model product (scalar and embedded attributes only, no object references); does not create or update the download history.static RestProducttoRestProduct(Product modelProduct) Convert a prosEO model product into a REST product
-
Constructor Details
-
ProductUtil
public ProductUtil()
-
-
Method Details
-
toRestProduct
Convert a prosEO model product into a REST product- Parameters:
modelProduct- the prosEO model product- Returns:
- an equivalent REST product or null, if no model product was given
-
toModelProduct
Convert a REST product into a prosEO model product (scalar and embedded attributes only, no object references); does not create or update the download history.- Parameters:
restProduct- the REST product- Returns:
- a (roughly) equivalent model product or null, if no REST product was given
- Throws:
IllegalArgumentException- if the REST product violates syntax rules for date, enum or numeric values
-