Klasse ProductUtil

java.lang.Object
de.dlr.proseo.ingestor.rest.model.ProductUtil

public class ProductUtil extends Object
Utility methods for products, e. g. for conversion between prosEO model and REST model
Autor:
Dr. Thomas Bassler
  • Konstruktordetails

    • ProductUtil

      public ProductUtil()
  • Methodendetails

    • toRestProduct

      public static RestProduct toRestProduct(Product modelProduct)
      Convert a prosEO model product into a REST product
      Parameter:
      modelProduct - the prosEO model product
      Gibt zurück:
      an equivalent REST product or null, if no model product was given
    • toModelProduct

      public static Product toModelProduct(RestProduct restProduct) throws IllegalArgumentException
      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.
      Parameter:
      restProduct - the REST product
      Gibt zurück:
      a (roughly) equivalent model product or null, if no REST product was given
      Löst aus:
      IllegalArgumentException - if the REST product violates syntax rules for date, enum or numeric values