Class XTCEContainerEntryValue


  • public class XTCEContainerEntryValue
    extends Object
    This class represents the value of an entry in the container model when processing a specific Container in the XTCE data model.
    Author:
    David Overeem
    • Constructor Summary

      Constructors 
      Constructor Description
      XTCEContainerEntryValue​(String value)
      Constructor This constructs an instance of the class to represent an assigned or chosen value for an FixedValue field, which is always calibrated.
      XTCEContainerEntryValue​(XTCETypedObject item, String value, String operator, String form)
      Constructor This constructs an instance of the class to represent an assigned or chosen value for an XTCEParameter and whether or not it is Calibrated.
      XTCEContainerEntryValue​(XTCETypedObject item, BitSet rawValue)
      Constructor This constructs an instance of the class to represent a binary decoded value from a binary stream BitSet, which is always a raw value.
      XTCEContainerEntryValue​(XTCETypedObject item, BitSet rawValue, CalibratorType calibrator)
      Constructor This constructs an instance of the class to represent a binary decoded value from a binary stream BitSet, which is always a raw value.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(Object rhs)
      Equality Operator Function to compare all the attributes of the entry value to determine if it is equivalent to another entry value.
      String getAssignedValue()
      Retrieve the value that is associated with this Parameter/Argument entry.
      String getCalibratedValue()
      Retrieve the EU/Calibrated value of the entry, regardless of how it was assigned.
      String getComparisonForm()
      Retrieve the form of the value that is associated with this entry.
      String getItemFullPath()
      Retrieve the fully qualified name of the Parameter/Argument that is attached to this value.
      String getName()
      Retrieve the Name of the item for which this value is associated, which can be an Argument or Parameter name.
      String getOperator()
      Retrieve the assigning/comparison operator that associates the value to the Parameter/Argument that is represented by this value object.
      BitSet getRawValue()
      Retrieve the Raw value of the entry, regardless of how it was assigned.
      String getRawValueHex()
      Retrieve the Raw value of the entry, regardless of how it was assigned.
      String getUncalibratedValue()
      Retrieve the Uncalibrated value of the entry, regardless of how it was assigned.
      List<String> getWarnings()
      Retrieve any warnings that occurred when processing this specific value.
      int hashCode()
      Hashing Function Hashes the string representation of this entry value for used in certain types of collections.
      boolean isCompatibleWith​(XTCEContainerEntryValue that)
      Compatibility Operator This method compares this entry value with another entry value to see if they are "compatible".
      String toString()
      Retrieve a string representation of the entry value that this object contains.
      String toStringWithoutParameter()
      Retrieve a string representation of the entry value that this object contains without the Parameter/Argument in the beginning.
    • Constructor Detail

      • XTCEContainerEntryValue

        public XTCEContainerEntryValue​(XTCETypedObject item,
                                       String value,
                                       String operator,
                                       String form)
        Constructor This constructs an instance of the class to represent an assigned or chosen value for an XTCEParameter and whether or not it is Calibrated.
        Parameters:
        item - The parameter or argument to keep this value for.
        value - The value that should be used for this Parameter.
        operator - The comparison operator that is used for assigning this value, which can be "==", "!=", and others - refer to the XTCE Schema.
        form - The form of the value, either "Calibrated" or "Uncalibrated".
      • XTCEContainerEntryValue

        public XTCEContainerEntryValue​(String value)
        Constructor This constructs an instance of the class to represent an assigned or chosen value for an FixedValue field, which is always calibrated.
        Parameters:
        value - The value that should be used for this Parameter.
      • XTCEContainerEntryValue

        public XTCEContainerEntryValue​(XTCETypedObject item,
                                       BitSet rawValue)
        Constructor This constructs an instance of the class to represent a binary decoded value from a binary stream BitSet, which is always a raw value.
        Parameters:
        item - XTCETypedObject representing the parameter or argument in the XTCE document.
        rawValue - BitSet containing the raw encoded bits for this item.
      • XTCEContainerEntryValue

        public XTCEContainerEntryValue​(XTCETypedObject item,
                                       BitSet rawValue,
                                       CalibratorType calibrator)
        Constructor This constructs an instance of the class to represent a binary decoded value from a binary stream BitSet, which is always a raw value.
        Parameters:
        item - XTCETypedObject representing the parameter or argument in the XTCE document.
        rawValue - BitSet containing the raw encoded bits for this item.
        calibrator - CalibratorType element from the JAXB generated classes that is applicable for the value decom for this item based on where it is in the container.
    • Method Detail

      • getName

        public final String getName()
        Retrieve the Name of the item for which this value is associated, which can be an Argument or Parameter name.
        Returns:
        String containing the name.
      • getItemFullPath

        public final String getItemFullPath()
        Retrieve the fully qualified name of the Parameter/Argument that is attached to this value. At present, the argument will not be a path because it is local to the telecommand that defines it. A fixed value entry field will return an empty string.
        Returns:
        String containing the fully qualified path to the name.
      • getWarnings

        public final List<String> getWarnings()
        Retrieve any warnings that occurred when processing this specific value. This method is most effective if it is called last when interacting with an item value. Warnings are generated in the course of calling different methods, so they may not all exist until the accessor operations have been done already.
        Returns:
        List of String objects containing any warning messages. This list may be empty and will never be null.
      • getAssignedValue

        public final String getAssignedValue()
        Retrieve the value that is associated with this Parameter/Argument entry.
        Returns:
        String containing the value, which can be either in engineering or raw form.
      • getOperator

        public final String getOperator()
        Retrieve the assigning/comparison operator that associates the value to the Parameter/Argument that is represented by this value object.
        Returns:
        String containing the operator, which can be ==, !=, <=, <, >=, >.
      • getComparisonForm

        public final String getComparisonForm()
        Retrieve the form of the value that is associated with this entry.
        Returns:
        String containing with "Calibrated" or "Uncalibrated".
      • getCalibratedValue

        public final String getCalibratedValue()
        Retrieve the EU/Calibrated value of the entry, regardless of how it was assigned.
        Returns:
        String containing the EU/Calibrated value.
      • getUncalibratedValue

        public final String getUncalibratedValue()
        Retrieve the Uncalibrated value of the entry, regardless of how it was assigned.
        Returns:
        String containing the Uncalibrated value.
      • getRawValue

        public final BitSet getRawValue()
        Retrieve the Raw value of the entry, regardless of how it was assigned.
        Returns:
        BitSet containing the raw value.
      • getRawValueHex

        public final String getRawValueHex()
        Retrieve the Raw value of the entry, regardless of how it was assigned.
        Returns:
        String containing the raw value in hexadecimal form.
      • isCompatibleWith

        public final boolean isCompatibleWith​(XTCEContainerEntryValue that)
        Compatibility Operator This method compares this entry value with another entry value to see if they are "compatible". They are compatible if equal, taking into account that they may be in different forms (uncalibrated versus calibrated). They may also have different operators, so in the case where I have this object being equal to a value, it could be compatible with another object which is not equal to any value except this one.
        Parameters:
        that - XTCEContainerEntryValue to compare to.
        Returns:
        boolean indicating if there is compatibility between these two entry values in a container.
      • equals

        public boolean equals​(Object rhs)
        Equality Operator Function to compare all the attributes of the entry value to determine if it is equivalent to another entry value.
        Overrides:
        equals in class Object
        Parameters:
        rhs - XTCEContainerEntryValue object to compare to.
        Returns:
        boolean indicating if the two value objects are functionally the same.
      • hashCode

        public int hashCode()
        Hashing Function Hashes the string representation of this entry value for used in certain types of collections.
        Overrides:
        hashCode in class Object
        Returns:
        integer containing the hash value.
      • toString

        public String toString()
        Retrieve a string representation of the entry value that this object contains.
        Overrides:
        toString in class Object
        Returns:
        String representing the entry value, which is in the form of [PARAM][OPERATOR][VALUE]{form}.
      • toStringWithoutParameter

        public final String toStringWithoutParameter()
        Retrieve a string representation of the entry value that this object contains without the Parameter/Argument in the beginning.
        Returns:
        String representing the entry value, which is in the form of [OPERATOR][VALUE]{form}.