Class LocalCalibration


  • public class LocalCalibration
    extends java.lang.Object
    Class to represent a calibration
    • Constructor Summary

      Constructors 
      Constructor Description
      LocalCalibration​(java.io.File file)
      Constructor for build a new calibration from disk
      LocalCalibration​(java.lang.String phoneModel, java.lang.String buildingIdentifier, int floorId, java.util.Date timestamp)
      Deprecated.
      LocalCalibration​(java.lang.String phoneModel, java.lang.String buildingIdentifier, int floorId, java.util.Date timestamp, long deviceId)  
    • Constructor Detail

      • LocalCalibration

        public LocalCalibration​(java.io.File file)
        Constructor for build a new calibration from disk
        Parameters:
        file - the calibration file
      • LocalCalibration

        @Deprecated
        public LocalCalibration​(java.lang.String phoneModel,
                                java.lang.String buildingIdentifier,
                                int floorId,
                                java.util.Date timestamp)
        Deprecated.
        Constructor when creating a new calibration
        Parameters:
        phoneModel - the phone id
        floorId - the flood id
        timestamp - the starting timestamp
      • LocalCalibration

        public LocalCalibration​(java.lang.String phoneModel,
                                java.lang.String buildingIdentifier,
                                int floorId,
                                java.util.Date timestamp,
                                long deviceId)
    • Method Detail

      • createFile

        public void createFile​(java.io.File folder)
        Creates the file to add the calibration
        Parameters:
        folder -
      • isSaved

        public boolean isSaved()
        Returns:
        true if it's saved on disk
      • getFilename

        public java.lang.String getFilename()
        Get the filename where it's saved
        Returns:
        null if the calibration is not valid
      • getFile

        public java.io.File getFile()
      • getSize

        public long getSize()
        Returns:
        size (in bytes)
      • getFloorId

        public int getFloorId()
        Returns:
        the floorId
      • getTimestamp

        public java.util.Date getTimestamp()
        Returns:
        the timestamp of the session
      • equals

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

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

        public java.lang.String getBuildingIdentifier()