Class Value

java.lang.Object
org.projecthusky.common.model.Value

public class Value extends Object
Ein Wert bestehend aus eigentlichem Wert und der zugehörigen Einheit.
  • Constructor Details

    • Value

      public Value(ANY value)
      Instantiates a new value with a given MDHT ANY Objekt
      Parameters:
      value - value
    • Value

      public Value(ANY value, NullFlavor nullFlavor)
      Instantiates a new value with a given MDHT ANY Objekt and an nullFlavor
      Parameters:
      value - value
    • Value

      public Value(BigDecimal value)
      Creates a new BigDecimal value.
      Parameters:
      value - The value
    • Value

      public 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).
      Parameters:
      low - The lower bound
      high - The upper bound
    • Value

      public Value(BigDecimal low, Ucum lowUnit, BigDecimal high, Ucum highUnit)
    • Value

      public 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).
      Parameters:
      low - The lower bound
      high - The upper bound
    • Value

      public Value(BL bl)
      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

      public Value(CD cd)
      Instantiates a new value with a give MDHT CD Objekt.
      Parameters:
      cd - cd
    • Value

      public Value(Code code)
      Instantiates a new value with a given Code Object.
      Parameters:
      code - code
    • Value

      public Value(Double value)
      Erstellt einen neuen Wert double.
      Parameters:
      value - Der eigentliche Wert
    • Value

      public Value(Double low, Double high)
      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 bound
      high - The upper bound
    • Value

      public Value(Double low, Double high, String unit)
      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 bound
      high - The upper bound
      unit - the unit
    • Value

      public Value(Double numerator, Double denominator, Ucum ucumUnit)
      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

      public Value(ED ed)
    • Value

      public Value(int value)
      Erstellt einen neuen Wert (INT).
      Parameters:
      value - Der eigentliche Wert
    • Value

      public Value(Integer value)
      Creates a new INT value.
      Parameters:
      value - The value.
    • Value

      public Value(PQ pq)
      Instantiates a new value.
      Parameters:
      pq - pq
    • Value

      public Value(RTO rto)
      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

      public Value(ST value)
      Erstellt einen neuen Wert (ST).
      Parameters:
      value - Der eigentliche Wert
    • Value

      public Value(String text)
    • Value

      public Value(String value, boolean isText)
      Instantiates a new value.
      Parameters:
      value - code system
      isText - indicates, if the given value is a text (/value will be created) or a reference (/value/reference[@value] will be created)
    • Value

      public Value(String codeSystem, String code)
      Instantiates a new value.
      Parameters:
      codeSystem - code system
      code - code
    • Value

      public Value(String value, Ucum unit)
      Erstellt einen neuen Wert.
      Parameters:
      value - Der eigentliche Wert
      unit - Die Einheit
  • Method Details

    • getBlText

      public String 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

      public Code getCode()
      Gets the code.
      Returns:
      Code the convenience API Code object
    • getEdReferenceValue

      public String getEdReferenceValue()
      Returns the reference value of the underlying MDHT type ED (text)
      Returns:
      the text of the underlying type ED
    • getEdText

      public String getEdText()
      Returns the text of the underlying MDHT type ED (text)
      Returns:
      the text of the underlying type ED
    • getIntText

      public String getIntText()
      Returns the text of the underlying MDHT type INT
      Returns:
      the text of the underlying type INT
    • getOriginalTextReference

      public String getOriginalTextReference()
    • setOriginalTextReference

      public void setOriginalTextReference(String originalText)
    • getPhysicalQuantity

      public PQ getPhysicalQuantity()
      Get mdht physical quantity.
      Returns:
      PQ the PQ object
    • getPhysicalQuantityIntervalHighValue

      public BigDecimal getPhysicalQuantityIntervalHighValue()
      Returns the higher bound of an interval of physical measurements
      Returns:
      the measurement
    • getPqElement

      public Map<String,PQ> getPqElement(IVLPQ range)
      extracts all PQ elements of passed IVLPQ. Extracted elements are stored in a map, where key is element name like "high" and value is extracted PQ.
      Parameters:
      range - to be extracted
      Returns:
      map of element name and value
    • getPhysicalQuantityIntervalLowValue

      public BigDecimal getPhysicalQuantityIntervalLowValue()
      Returns the lower bound of an interval of physical measurements
      Returns:
      the measurement
    • getPhysicalQuantityUnit

      public String getPhysicalQuantityUnit()
      Gibt die Einheit zurück.
      Returns:
      Die Einheit
    • getPhysicalQuantityValue

      public String getPhysicalQuantityValue()
      Gibt den Wert zurück.
      Returns:
      Der eigentlich Wert
    • getRtoUnitText

      public String getRtoUnitText()
      Returns the unit of the underlying MDHT type RTO (Ratio)
      Returns:
      the unit of the underlying type RTO
    • getRtoValueText

      public String getRtoValueText()
      Returns the text of the underlying MDHT type RTO (Ratio)
      Returns:
      the text of the underlying type RTO
    • getValue

      public ANY 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

      public void setUcumUnit(String unit)
    • toString

      public String toString()
      Gets the value as String (e.g. "200 ml" )
      Overrides:
      toString in class Object
      Returns:
      the value