Class SparkTimeseriesData

    • Method Detail

      • of

        public static TimeseriesData of​(@NonNull
                                        @NonNull org.apache.spark.sql.Row row)
      • of

        public static TimeseriesData of​(@NonNull
                                        @NonNull java.sql.Timestamp timestamp,
                                        @NonNull
                                        @NonNull cern.cmw.datax.ImmutableEntry data)
      • ofDouble

        public static TimeseriesData ofDouble​(@NonNull
                                              @NonNull java.sql.Timestamp timestamp,
                                              double value)
      • ofDataDistribution

        public static TimeseriesData ofDataDistribution​(@NonNull
                                                        @NonNull org.apache.spark.sql.Row row)
      • ofFundamental

        public static TimeseriesData ofFundamental​(@NonNull
                                                   @NonNull org.apache.spark.sql.Row row)
      • type

        public java.lang.Class<?> type()
        Description copied from interface: TimeseriesData
        Gets the data type of time series data.
        Specified by:
        type in interface TimeseriesData
        Returns:
        the data type of time series data.
      • dimensions

        public int[] dimensions()
        Description copied from interface: TimeseriesData
        Gets the data dimensions of time series data.
        Specified by:
        dimensions in interface TimeseriesData
        Returns:
        the data dimensions of time series data.
      • getFormattedStamp

        public java.lang.String getFormattedStamp​(LoggingTimeZone timeZone)
        Specified by:
        getFormattedStamp in interface TimeseriesData
        Parameters:
        timeZone - - the timezone which should be used to format the timestamp of this data
        Returns:
        - a String representing the timestamp of this data, formatted according to the given timezone
      • getNumericStatus

        public java.lang.String getNumericStatus()
                                          throws java.lang.NoSuchMethodException
        Description copied from interface: TimeseriesData
        Gets the Status associated with the time series data.
        Specified by:
        getNumericStatus in interface TimeseriesData
        Returns:
        the Status associated with the time series data.
        Throws:
        java.lang.NoSuchMethodException - - if an attempt is made to retrieve the Status of time series data that does not have a status associated with it i.e. it is not of the relevant datatype.
      • getDestination

        public java.lang.String getDestination()
                                        throws java.lang.NoSuchMethodException
        Description copied from interface: TimeseriesData
        Gets the Varchar value associated with the time series data.
        Specified by:
        getDestination in interface TimeseriesData
        Returns:
        the Varchar value associated with the time series data.
        Throws:
        java.lang.NoSuchMethodException - - if an attempt is made to retrieve the destination value of time series data that does not have a destination value associated with it i.e. it is not of the fundamental datatype.
      • getNumericValue

        @Deprecated
        public java.math.BigDecimal getNumericValue()
                                             throws java.lang.NoSuchMethodException
        Deprecated.
        (never use, major performance hit)
        Description copied from interface: TimeseriesData
        Gets the Numeric value associated with the time series data.
        Specified by:
        getNumericValue in interface TimeseriesData
        Returns:
        the Numeric value associated with the time series data.
        Throws:
        java.lang.NoSuchMethodException - - if an attempt is made to retrieve the Numeric value of time series data that does not have a Numeric Value associated with it i.e. it is not of the relevant datatype.
      • getDoubleValue

        public double getDoubleValue()
                              throws java.lang.NoSuchMethodException
        Description copied from interface: TimeseriesData
        Gets the Numeric value associated with the time series data.
        Specified by:
        getDoubleValue in interface TimeseriesData
        Returns:
        the Numeric value associated with the time series data.
        Throws:
        java.lang.NoSuchMethodException - - if an attempt is made to retrieve the Numeric value of time series data that does not have a Numeric Value associated with it i.e. it is not of the relevant datatype.
      • getLongValue

        public long getLongValue()
                          throws java.lang.NoSuchMethodException
        Description copied from interface: TimeseriesData
        Gets the Numeric value associated with the time series data.
        Specified by:
        getLongValue in interface TimeseriesData
        Returns:
        the Numeric value associated with the time series data.
        Throws:
        java.lang.NoSuchMethodException - - if an attempt is made to retrieve the Numeric value of time series data that does not have a Numeric Value associated with it i.e. it is not of the relevant datatype.
      • getVarcharValue

        public java.lang.String getVarcharValue()
                                         throws java.lang.NoSuchMethodException
        Description copied from interface: TimeseriesData
        Gets the Varchar value associated with the time series data.
        Specified by:
        getVarcharValue in interface TimeseriesData
        Returns:
        the Varchar value associated with the time series data.
        Throws:
        java.lang.NoSuchMethodException - - if an attempt is made to retrieve the Varchar value of time series data that does not have a Varchar value associated with it i.e. it is not of the relevant datatype.
      • getVectorNumericValues

        @Deprecated
        public java.math.BigDecimal[] getVectorNumericValues()
                                                      throws java.lang.NoSuchMethodException
        Deprecated.
        (never use, major performance hit)
        Description copied from interface: TimeseriesData
        Gets the Vector of Numeric values associated with the time series data.
        Specified by:
        getVectorNumericValues in interface TimeseriesData
        Returns:
        the Vector of Numeric values associated with the time series data.
        Throws:
        java.lang.NoSuchMethodException - - if an attempt is made to retrieve the Vector of Numeric values of the time series data that does not have a Vector of Numeric values associated with it i.e. it is not of the relevant datatype.
      • getDoubleValues

        public double[] getDoubleValues()
                                 throws java.lang.NoSuchMethodException
        Description copied from interface: TimeseriesData
        Gets the Vector of Numeric values associated with the time series data.
        Specified by:
        getDoubleValues in interface TimeseriesData
        Returns:
        the Vector of Numeric values associated with the time series data.
        Throws:
        java.lang.NoSuchMethodException - - if an attempt is made to retrieve the Vector of Numeric values of the time series data that does not have a Vector of Numeric values associated with it i.e. it is not of the relevant datatype.
      • getLongValues

        public long[] getLongValues()
                             throws java.lang.NoSuchMethodException
        Description copied from interface: TimeseriesData
        Gets the Vector of Numeric values associated with the time series data.
        Specified by:
        getLongValues in interface TimeseriesData
        Returns:
        the Vector of Numeric values associated with the time series data.
        Throws:
        java.lang.NoSuchMethodException - - if an attempt is made to retrieve the Vector of Numeric values of the time series data that does not have a Vector of Numeric values associated with it i.e. it is not of the relevant datatype.
      • getStringValues

        public java.lang.String[] getStringValues()
                                           throws java.lang.NoSuchMethodException
        Specified by:
        getStringValues in interface TimeseriesData
        Throws:
        java.lang.NoSuchMethodException
      • getMatrixDoubleValues

        public double[][] getMatrixDoubleValues()
                                         throws java.lang.NoSuchMethodException
        Specified by:
        getMatrixDoubleValues in interface TimeseriesData
        Throws:
        java.lang.NoSuchMethodException
      • getMatrixLongValues

        public long[][] getMatrixLongValues()
                                     throws java.lang.NoSuchMethodException
        Specified by:
        getMatrixLongValues in interface TimeseriesData
        Throws:
        java.lang.NoSuchMethodException
      • getNumericValueAtVectorIndex

        @Deprecated
        public java.math.BigDecimal getNumericValueAtVectorIndex​(int index)
                                                          throws java.lang.NoSuchMethodException
        Deprecated.
        (never use, performance hit)
        Description copied from interface: TimeseriesData
        Gets numeric value from the vectornumeric value at the given index.
        Specified by:
        getNumericValueAtVectorIndex in interface TimeseriesData
        Returns:
        the numeric value from the vectornumeric value at the given index or null if there is no value at the given index.
        Throws:
        java.lang.NoSuchMethodException
      • getDoubleValueAtIndex

        public double getDoubleValueAtIndex​(int index)
                                     throws java.lang.NoSuchMethodException
        Description copied from interface: TimeseriesData
        Gets numeric value from the vectornumeric value at the given index.
        Specified by:
        getDoubleValueAtIndex in interface TimeseriesData
        Returns:
        the numeric value from the vectornumeric value at the given index or null if there is no value at the given index.
        Throws:
        java.lang.NoSuchMethodException
      • getLongValueAtIndex

        public long getLongValueAtIndex​(int index)
                                 throws java.lang.NoSuchMethodException
        Description copied from interface: TimeseriesData
        Gets numeric value from the vectornumeric value at the given index.
        Specified by:
        getLongValueAtIndex in interface TimeseriesData
        Returns:
        the numeric value from the vectornumeric value at the given index or null if there is no value at the given index.
        Throws:
        java.lang.NoSuchMethodException
      • getStringValueAtIndex

        public java.lang.String getStringValueAtIndex​(int index)
                                               throws java.lang.NoSuchMethodException
        Specified by:
        getStringValueAtIndex in interface TimeseriesData
        Throws:
        java.lang.NoSuchMethodException
      • isSubSet

        public java.lang.Boolean isSubSet()
                                   throws java.lang.NoSuchMethodException
        Description copied from interface: TimeseriesData
        Indicates if this Timeseries Data is a subset of the actual logged vectornumerioc value as a result of filtering by index or value.
        Specified by:
        isSubSet in interface TimeseriesData
        Returns:
        true if this Timeseries Data is a subset of the actual logged vectornumerioc value.
        Throws:
        java.lang.NoSuchMethodException
      • getVectorNumericIndexes

        public int[] getVectorNumericIndexes()
                                      throws java.lang.NoSuchMethodException
        Description copied from interface: TimeseriesData
        Gets the array of vectornumeric element indexes. This is useful in the case that this vectornumeric data is a subset of the actual logged vectornumerioc value (as a result of filtering by index or value).
        Specified by:
        getVectorNumericIndexes in interface TimeseriesData
        Returns:
        the array of vectornumeric element indexes.
        Throws:
        java.lang.NoSuchMethodException
      • getVectorIndexes

        public int[] getVectorIndexes()
                               throws java.lang.NoSuchMethodException
        Specified by:
        getVectorIndexes in interface TimeseriesData
        Throws:
        java.lang.NoSuchMethodException
      • toStringValue

        public java.lang.String toStringValue()
                                       throws java.lang.NoSuchMethodException
        Description copied from interface: TimeseriesData
        Represents the value in a string
        Specified by:
        toStringValue in interface TimeseriesData
        Returns:
        The value in a string
        Throws:
        java.lang.NoSuchMethodException
      • toStringValue

        public java.lang.String toStringValue​(int index)
                                       throws java.lang.NoSuchMethodException
        Description copied from interface: TimeseriesData
        Gets the string of a value for a given index for a vector numeric type
        Specified by:
        toStringValue in interface TimeseriesData
        Returns:
        Throws:
        java.lang.NoSuchMethodException
      • isNullValue

        public boolean isNullValue()
                            throws java.lang.NoSuchMethodException
        Description copied from interface: TimeseriesData
        Checks whether the value is null
        Specified by:
        isNullValue in interface TimeseriesData
        Returns:
        Throws:
        java.lang.NoSuchMethodException
      • isNullValue

        public boolean isNullValue​(int index)
                            throws java.lang.NoSuchMethodException
        Description copied from interface: TimeseriesData
        Checks whether the value is null for a given index (vector numeric types)
        Specified by:
        isNullValue in interface TimeseriesData
        Returns:
        Throws:
        java.lang.NoSuchMethodException
      • alignToTimestamp

        public TimeseriesData alignToTimestamp​(java.sql.Timestamp timestamp)
                                        throws java.lang.NoSuchMethodException
        Specified by:
        alignToTimestamp in interface TimeseriesData
        Throws:
        java.lang.NoSuchMethodException
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • getStamp

        public java.sql.Timestamp getStamp()
        Description copied from interface: TimeseriesData
        Gets the timestamp of the timeseries data.
        Specified by:
        getStamp in interface TimeseriesData
        Returns:
        - the timestamp of the timeseries data.