Class GO_Decimal


public final class GO_Decimal extends PropertyType<GO_Decimal,Double>
Surrounds double values by <gco:Decimal>. The ISO 19115-3 standard requires most types to be wrapped by an element representing the value type. The JAXB default behavior is to marshal primitive Java types directly, without such wrapper element. The role of this class is to add the <gco:…> wrapper element required by ISO 19115-3.

Relationship with GO_Real

This adapter is identical to GO_Real except for the element name, which is "Decimal" instead than "Real". This adapter is used for the westBoundLongitude, eastBoundLongitude, southBoundLatitude and northBoundLatitude properties of EX_DefaultGeographicBoundingBox. The GO_Real adapter is used for about everything else.
Since:
0.3
Version:
0.3
See Also:
  • Constructor Details

    • GO_Decimal

      public GO_Decimal()
      Empty constructor used only by JAXB.
    • GO_Decimal

      private GO_Decimal(Double value)
      Constructs a wrapper for the given value.
      Parameters:
      value - the value.
  • Method Details

    • getBoundType

      protected Class<Double> getBoundType()
      Returns the Java type which is bound by this adapter.
      Specified by:
      getBoundType in class PropertyType<GO_Decimal,Double>
      Returns:
      Double.class
    • wrap

      protected GO_Decimal wrap(Double value)
      Allows JAXB to change the result of the marshalling process, according to the ISO 19115-3 standard and its requirements about primitive types.
      Specified by:
      wrap in class PropertyType<GO_Decimal,Double>
      Parameters:
      value - the double value we want to surround by an element representing its type.
      Returns:
      an adaptation of the double value, that is to say a double value surrounded by <gco:Decimal> element.
    • getElement

      public Double getElement()
      Invoked by JAXB at marshalling time for getting the actual value to write.
      Returns:
      the value to be marshalled.
    • setElement

      public void setElement(Double metadata)
      Invoked by JAXB at unmarshalling time for storing the result temporarily.
      Parameters:
      metadata - the unmarshalled value.