/*
* Geotoolkit - An Open Source Java GIS Toolkit
* http://www.geotoolkit.org
*
* (C) 2008 - 2012, Geomatys
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*/
package org.geotoolkit.gml.xml.v321;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlType;
/**
* The inherited attribute uom references the preferred unit that this conversion applies to. The conversion of a unit to the preferred unit for this physical quantity type is specified by an arithmetic conversion (scaling and/or offset). The content model extends gml:UnitOfMeasureType, which has a mandatory attribute uom which identifies the preferred unit for the physical quantity type that this conversion applies to. The conversion is specified by a choice of
* - gml:factor, which defines the scale factor, or
* - gml:formula, which defines a formula
* by which a value using the conventional unit of measure can be converted to obtain the corresponding value using the preferred unit of measure.
* The formula defines the parameters of a simple formula by which a value using the conventional unit of measure can be converted to the corresponding value using the preferred unit of measure. The formula element contains elements a, b, c and d, whose values use the XML Schema type double. These values are used in the formula y = (a + bx) / (c + dx), where x is a value using this unit, and y is the corresponding value using the base unit. The elements a and d are optional, and if values are not provided, those parameters are considered to be zero. If values are not provided for both a and d, the formula is equivalent to a fraction with numerator and denominator parameters.
*
* <p>Java class for ConversionToPreferredUnitType complex type.
*
* <p>The following schema fragment specifies the expected content contained within this class.
*
* <pre>
* <complexType name="ConversionToPreferredUnitType">
* <complexContent>
* <extension base="{http://www.opengis.net/gml/3.2}UnitOfMeasureType">
* <choice>
* <element name="factor" type="{http://www.w3.org/2001/XMLSchema}double"/>
* <element name="formula" type="{http://www.opengis.net/gml/3.2}FormulaType"/>
* </choice>
* </extension>
* </complexContent>
* </complexType>
* </pre>
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "ConversionToPreferredUnitType", propOrder = {
"factor",
"formula"
})
public class ConversionToPreferredUnitType
extends UnitOfMeasureType
{
private Double factor;
private FormulaType formula;
/**
* Gets the value of the factor property.
*
* @return
* possible object is
* {@link Double }
*
*/
public Double getFactor() {
return factor;
}
/**
* Sets the value of the factor property.
*
* @param value
* allowed object is
* {@link Double }
*
*/
public void setFactor(Double value) {
this.factor = value;
}
/**
* Gets the value of the formula property.
*
* @return
* possible object is
* {@link FormulaType }
*
*/
public FormulaType getFormula() {
return formula;
}
/**
* Sets the value of the formula property.
*
* @param value
* allowed object is
* {@link FormulaType }
*
*/
public void setFormula(FormulaType value) {
this.formula = value;
}
}