Class MeasureList

java.lang.Object
org.apache.sis.internal.jaxb.gml.MeasureList

public final class MeasureList extends Object
XML representation of a sequence of measurement values together with their unit of measure. This is used only at XML marshalling time.
Since:
0.6
Version:
0.6
See Also:
  • Field Details

    • values

      public List<Double> values
      The measure values.
    • unit

      public javax.measure.Unit<?> unit
      The unit of measurement.
  • Constructor Details

    • MeasureList

      public MeasureList()
      Default empty constructor for JAXB. The value is initialized to null, but JAXB will overwrite that value if a XML value is present.
    • MeasureList

      public MeasureList(Object array, Class<E> elementType, javax.measure.Unit<?> unit)
      Creates a list of measures backed by the given array.
      Type Parameters:
      E - compile-time value of elementType.
      Parameters:
      array - the measure values as a Java array.
      elementType - the type of elements in the given array. Primitive type shall be replaced by their wrapper.
      unit - the unit of measurement.
  • Method Details

    • getUOM

      public String getUOM()
      Constructs a string representation of the units.
      Returns:
      a string representation of the unit.
    • setUOM

      public void setUOM(String uom) throws URISyntaxException
      Sets the unit of measure. This method is invoked by JAXB at unmarshalling time.
      Parameters:
      uom - the unit of measure as a string.
      Throws:
      URISyntaxException - if the uom looks like a URI, but cannot be parsed.
    • toArray

      public double[] toArray()
      Returns the values as an array.
      Returns:
      the values, or null if none.