Class SweQuantity
- java.lang.Object
-
- org.n52.shetland.ogc.swe.SweAbstractDataComponent
-
- org.n52.shetland.ogc.swe.simpleType.SweAbstractSimpleType<T>
-
- org.n52.shetland.ogc.swe.simpleType.SweAbstractUomType<BigDecimal>
-
- org.n52.shetland.ogc.swe.simpleType.SweQuantity
-
- All Implemented Interfaces:
Copyable<SweAbstractDataComponent>,HasDefaultEncoding<SweAbstractDataComponent>,Value<BigDecimal,SweAbstractSimpleType<BigDecimal>>,SweQuality
- Direct Known Subclasses:
QuantityValue
public class SweQuantity extends SweAbstractUomType<BigDecimal> implements SweQuality
SOS internal representation of SWE simpleType quantity- Since:
- 1.0.0
-
-
Constructor Summary
Constructors Constructor Description SweQuantity()constructorSweQuantity(Double value, String uom)constructorSweQuantity(Double value, UoM uom)constructorSweQuantity(BigDecimal value, String uom)constructorSweQuantity(BigDecimal value, UoM uom)constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T,X extends Throwable>
Taccept(SweDataComponentVisitor<T,X> visitor)<X extends Throwable>
voidaccept(VoidSweDataComponentVisitor<X> visitor)SweQuantitycopy()booleanequals(Object obj)StringgetAxisID()Get axis IDReferenceable<SweAllowedValues>getConstraint()SweConstants.SweDataComponentTypegetDataComponentType()StringgetStringValue()Get value asStringBigDecimalgetValue()Get valueDoublegetValueAsDouble()inthashCode()booleanisSetAxisID()booleanisSetContstraint()booleanisSetValue()Is the values setSweQuantitysetAxisID(String axisID)set axis IDvoidsetConstraint(SweAllowedValues constraint)voidsetConstraint(Referenceable<SweAllowedValues> constraint)voidsetStringValue(String s)SweQuantitysetUom(String uom)Set unit of measurementSweQuantitysetValue(Double value)SweQuantitysetValue(BigDecimal value)Set value-
Methods inherited from class org.n52.shetland.ogc.swe.simpleType.SweAbstractUomType
copyValueTo, getUom, getUomObject, isSetUom, setUom, toString
-
Methods inherited from class org.n52.shetland.ogc.swe.simpleType.SweAbstractSimpleType
copyQuality, getQuality, isSetQuality, setQuality
-
Methods inherited from class org.n52.shetland.ogc.swe.SweAbstractDataComponent
addName, addName, addName, getDefaultElementEncoding, getDefinition, getDescription, getIdentifier, getLabel, getName, getNames, getXml, isSetDefinition, isSetDescription, isSetIdentifier, isSetLabel, isSetName, isSetNames, isSetXml, setDefaultElementEncoding, setDefinition, setDescription, setIdentifier, setLabel, setName, setName, setName, setXml
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.n52.shetland.ogc.HasDefaultEncoding
isSetDefaultElementEncoding
-
-
-
-
Constructor Detail
-
SweQuantity
public SweQuantity()
constructor
-
SweQuantity
public SweQuantity(BigDecimal value, String uom)
constructor
-
SweQuantity
public SweQuantity(BigDecimal value, UoM uom)
constructor
-
-
Method Detail
-
getAxisID
public String getAxisID()
Get axis ID- Returns:
- the axisID
-
setAxisID
public SweQuantity setAxisID(String axisID)
set axis ID- Parameters:
axisID- the axisID to set- Returns:
- This SweQuantity
-
getValue
public BigDecimal getValue()
Description copied from interface:ValueGet value- Specified by:
getValuein interfaceValue<BigDecimal,SweAbstractSimpleType<BigDecimal>>- Returns:
- value
-
getValueAsDouble
public Double getValueAsDouble()
-
setValue
public SweQuantity setValue(BigDecimal value)
Description copied from interface:ValueSet value- Specified by:
setValuein interfaceValue<BigDecimal,SweAbstractSimpleType<BigDecimal>>- Parameters:
value- value to set- Returns:
- this
-
setValue
public SweQuantity setValue(Double value)
-
hashCode
public int hashCode()
- Overrides:
hashCodein classSweAbstractSimpleType<BigDecimal>
-
equals
public boolean equals(Object obj)
- Overrides:
equalsin classSweAbstractSimpleType<BigDecimal>
-
setStringValue
public void setStringValue(String s)
- Specified by:
setStringValuein classSweAbstractSimpleType<BigDecimal>
-
getStringValue
public String getStringValue()
Description copied from interface:ValueGet value asString- Specified by:
getStringValuein interfaceValue<BigDecimal,SweAbstractSimpleType<BigDecimal>>- Returns:
- The value as
String
-
isSetValue
public boolean isSetValue()
Description copied from interface:ValueIs the values set- Specified by:
isSetValuein interfaceValue<BigDecimal,SweAbstractSimpleType<BigDecimal>>- Returns:
true, if the value is set
-
isSetAxisID
public boolean isSetAxisID()
-
getConstraint
public Referenceable<SweAllowedValues> getConstraint()
- Returns:
- the constraint
-
setConstraint
public void setConstraint(SweAllowedValues constraint)
- Parameters:
constraint- the constraint to set
-
setConstraint
public void setConstraint(Referenceable<SweAllowedValues> constraint)
- Parameters:
constraint- the constraint to set
-
isSetContstraint
public boolean isSetContstraint()
-
getDataComponentType
public SweConstants.SweDataComponentType getDataComponentType()
- Specified by:
getDataComponentTypein classSweAbstractDataComponent
-
setUom
public SweQuantity setUom(String uom)
Description copied from class:SweAbstractUomTypeSet unit of measurement- Overrides:
setUomin classSweAbstractUomType<BigDecimal>- Parameters:
uom- the uom to set- Returns:
- This SweAbstractUomType
-
accept
public <T,X extends Throwable> T accept(SweDataComponentVisitor<T,X> visitor) throws X extends Throwable
- Specified by:
acceptin classSweAbstractDataComponent- Throws:
X extends Throwable
-
accept
public <X extends Throwable> void accept(VoidSweDataComponentVisitor<X> visitor) throws X extends Throwable
- Specified by:
acceptin classSweAbstractDataComponent- Throws:
X extends Throwable
-
copy
public SweQuantity copy()
- Specified by:
copyin interfaceCopyable<SweAbstractDataComponent>
-
-