Package org.projecthusky.common.model
Class Value
java.lang.Object
org.projecthusky.common.model.Value
Ein Wert bestehend aus eigentlichem Wert und der zugehörigen Einheit.
-
Constructor Summary
ConstructorsConstructorDescriptionValue
(boolean code) Instantiates a new value with a given boolean Object.Value
(int value) Erstellt einen neuen Wert (INT).Erstellt einen neuen Wert double.Instantiates a new value with the parameters for a MDHT IVL_PQ Objekt with two PQ Values (A low and high bound of physical quantities).Instantiates a new value with the parameters for a MDHT IVL_PQ Objekt with two PQ Values (A low and high bound of physical quantities).Instantiates a new value with the parameters for a MDHT RTO Objekt (A quantity constructed as the quotient of a numerator quantity divided by a denominator quantity.).Creates a new INT value.Instantiates a new value.Instantiates a new value.Erstellt einen neuen Wert.Value
(BigDecimal value) Creates a new BigDecimal value.Value
(BigDecimal low, String lowUnit, BigDecimal high, String highUnit) Instantiates a new value with the parameters for a MDHT IVL_PQ Objekt with two PQ Values (A low and high bound of physical quantities).Value
(BigDecimal low, Ucum lowUnit, BigDecimal high, Ucum highUnit) Value
(BigInteger low, BigInteger high) Instantiates a new value with the parameters for a MDHT IVL_INT Objekt with two INT Values (A low and high bound of the interval).Instantiates a new value with a given MDHT ANY ObjektValue
(ANY value, NullFlavor nullFlavor) Instantiates a new value with a given MDHT ANY Objekt and an nullFlavorInstantiates a new value with a given boolean Object.Instantiates a new value with a give MDHT CD Objekt.Instantiates a new value.Instantiates a new value with a give MDHT RTO Objekt (A quantity constructed as the quotient of a numerator quantity divided by a denominator quantity.).Erstellt einen neuen Wert (ST).Instantiates a new value with a given Code Object. -
Method Summary
Modifier and TypeMethodDescriptionReturns the text of the underlying MDHT type BLboolean
Return if this Value of the underlying MDHT type BL (boolean) is true or falsegetCode()
Gets the code.Returns the reference value of the underlying MDHT type ED (text)Returns the text of the underlying MDHT type ED (text)Returns the text of the underlying MDHT type INTGet mdht physical quantity.Returns the higher bound of an interval of physical measurementsReturns the lower bound of an interval of physical measurementsGibt die Einheit zurück.Gibt den Wert zurück.getPqElement
(IVLPQ range) Returns the unit of the underlying MDHT type RTO (Ratio)Returns the text of the underlying MDHT type RTO (Ratio)getValue()
Gets the value.boolean
isBl()
Checks if the Value object is a BL (Boolean).boolean
isCode()
Checks if the Value Object is a code.boolean
isEd()
Checks if the Value object has the Datatype ED (Text).boolean
isInt()
Checks if the Value object is an INT.boolean
Checks if the Value object is a physical quantity.boolean
isRto()
Checks if the Value object is a RTO (A quantity constructed as the quotient of a numerator quantity divided by a denominator quantity.).boolean
isSt()
Checks if the Value object has the Datatype ST (String).void
setOriginalTextReference
(String originalText) void
setUcumUnit
(String unit) toString()
Gets the value as String (e.g.
-
Constructor Details
-
Value
Instantiates a new value with a given MDHT ANY Objekt- Parameters:
value
- value
-
Value
Instantiates a new value with a given MDHT ANY Objekt and an nullFlavor- Parameters:
value
- value
-
Value
Creates a new BigDecimal value.- Parameters:
value
- The value
-
Value
Instantiates a new value with the parameters for a MDHT IVL_PQ Objekt with two PQ Values (A low and high bound of physical quantities).- Parameters:
low
- The lower boundhigh
- The upper bound
-
Value
-
Value
Instantiates a new value with the parameters for a MDHT IVL_INT Objekt with two INT Values (A low and high bound of the interval).- Parameters:
low
- The lower boundhigh
- The upper bound
-
Value
Instantiates a new value with a given boolean Object.- Parameters:
bl
- the boolean value
-
Value
public Value(boolean code) Instantiates a new value with a given boolean Object.- Parameters:
code
- code
-
Value
Instantiates a new value with a give MDHT CD Objekt.- Parameters:
cd
- cd
-
Value
Instantiates a new value with a given Code Object.- Parameters:
code
- code
-
Value
Erstellt einen neuen Wert double.- Parameters:
value
- Der eigentliche Wert
-
Value
Instantiates a new value with the parameters for a MDHT IVL_PQ Objekt with two PQ Values (A low and high bound of physical quantities).- Parameters:
low
- The lower boundhigh
- The upper bound
-
Value
Instantiates a new value with the parameters for a MDHT IVL_PQ Objekt with two PQ Values (A low and high bound of physical quantities).- Parameters:
low
- The lower boundhigh
- The upper boundunit
- the unit
-
Value
Instantiates a new value with the parameters for a MDHT RTO Objekt (A quantity constructed as the quotient of a numerator quantity divided by a denominator quantity.).- Parameters:
numerator
- The nominator value (nominator/denominator)denominator
- The denominator value (nominator/denominator)ucumUnit
- the UCUM Unit
-
Value
-
Value
public Value(int value) Erstellt einen neuen Wert (INT).- Parameters:
value
- Der eigentliche Wert
-
Value
Creates a new INT value.- Parameters:
value
- The value.
-
Value
Instantiates a new value.- Parameters:
pq
- pq
-
Value
Instantiates a new value with a give MDHT RTO Objekt (A quantity constructed as the quotient of a numerator quantity divided by a denominator quantity.).- Parameters:
rto
- The RTO object
-
Value
Erstellt einen neuen Wert (ST).- Parameters:
value
- Der eigentliche Wert
-
Value
-
Value
Instantiates a new value.- Parameters:
value
- code systemisText
- indicates, if the given value is a text (/value will be created) or a reference (/value/reference[@value] will be created)
-
Value
Instantiates a new value.- Parameters:
codeSystem
- code systemcode
- code
-
Value
Erstellt einen neuen Wert.- Parameters:
value
- Der eigentliche Wertunit
- Die Einheit
-
-
Method Details
-
getBlText
Returns the text of the underlying MDHT type BL- Returns:
- the text of the underlying type BL
-
getBoolean
public boolean getBoolean()Return if this Value of the underlying MDHT type BL (boolean) is true or false- Returns:
- the value of the underlying type BL
-
getCode
Gets the code.- Returns:
- Code the convenience API Code object
-
getEdReferenceValue
Returns the reference value of the underlying MDHT type ED (text)- Returns:
- the text of the underlying type ED
-
getEdText
Returns the text of the underlying MDHT type ED (text)- Returns:
- the text of the underlying type ED
-
getIntText
Returns the text of the underlying MDHT type INT- Returns:
- the text of the underlying type INT
-
getOriginalTextReference
-
setOriginalTextReference
-
getPhysicalQuantity
Get mdht physical quantity.- Returns:
- PQ the PQ object
-
getPhysicalQuantityIntervalHighValue
Returns the higher bound of an interval of physical measurements- Returns:
- the measurement
-
getPqElement
extracts allPQ
elements of passedIVLPQ
. Extracted elements are stored in a map, where key is element name like "high" and value is extractedPQ
.- Parameters:
range
- to be extracted- Returns:
- map of element name and value
-
getPhysicalQuantityIntervalLowValue
Returns the lower bound of an interval of physical measurements- Returns:
- the measurement
-
getPhysicalQuantityUnit
Gibt die Einheit zurück.- Returns:
- Die Einheit
-
getPhysicalQuantityValue
Gibt den Wert zurück.- Returns:
- Der eigentlich Wert
-
getRtoUnitText
Returns the unit of the underlying MDHT type RTO (Ratio)- Returns:
- the unit of the underlying type RTO
-
getRtoValueText
Returns the text of the underlying MDHT type RTO (Ratio)- Returns:
- the text of the underlying type RTO
-
getValue
Gets the value.- Returns:
- ANY the value as MDHT ANY object
-
isBl
public boolean isBl()Checks if the Value object is a BL (Boolean).- Returns:
- boolean true, if it is Boolean, false otherwise
-
isCode
public boolean isCode()Checks if the Value Object is a code.- Returns:
- boolean true, if the Value is a code, false otherwise
-
isEd
public boolean isEd()Checks if the Value object has the Datatype ED (Text).- Returns:
- boolean true, if it is ED, false otherwise
-
isInt
public boolean isInt()Checks if the Value object is an INT.- Returns:
- boolean true, if it is INT, false otherwise
-
isPhysicalQuantity
public boolean isPhysicalQuantity()Checks if the Value object is a physical quantity.- Returns:
- boolean true, if it is physical quantity, false otherwise
-
isRto
public boolean isRto()Checks if the Value object is a RTO (A quantity constructed as the quotient of a numerator quantity divided by a denominator quantity.).- Returns:
- boolean true, if it is physical quantity, false otherwise
-
isSt
public boolean isSt()Checks if the Value object has the Datatype ST (String).- Returns:
- boolean true, if it is ST, false otherwise
-
setUcumUnit
-
toString
Gets the value as String (e.g. "200 ml" )
-