Package de.dlr.proseo.api.prip.odata
Class ProductUtil
java.lang.Object
de.dlr.proseo.api.prip.odata.ProductUtil
Utility class to convert product objects from prosEO database model to PRIP (OData) REST API
- Author:
- Dr. Thomas Bassler
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.apache.olingo.commons.api.data.EntitytoPripProduct(Product modelProduct) Create a PRIP interface product from a prosEO interface product; when setting PRIP product attributes the product metadata attributes are overridden by product parameters, if a product parameter with the intended attribute name exists
-
Constructor Details
-
ProductUtil
public ProductUtil()
-
-
Method Details
-
toPripProduct
public static org.apache.olingo.commons.api.data.Entity toPripProduct(Product modelProduct) throws IllegalArgumentException, URISyntaxException Create a PRIP interface product from a prosEO interface product; when setting PRIP product attributes the product metadata attributes are overridden by product parameters, if a product parameter with the intended attribute name exists- Parameters:
modelProduct- the prosEO model product to convert- Returns:
- an OData entity object representing the prosEO interface product
- Throws:
IllegalArgumentException- if any mandatory information is missing from the prosEO interface productURISyntaxException- if a valid URI cannot be generated from any product UUID
-