Repository for the HealthTool which enables Apple users to analyse their health data from the Apple health app and prepares the data for contributing it for future studies on wearable data.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

62 lines
1.2 KiB

3 years ago
  1. package application.helpers.wrappers;
  2. import application.enums.EntryType;
  3. /**
  4. * This class wraps the information saved in one line of the ME File
  5. *
  6. * @author Bianca
  7. *
  8. */
  9. public class MeSaveInfo
  10. {
  11. /** The value which should be saved **/
  12. private String value;
  13. /**
  14. * The key to write this information.
  15. **/
  16. private String saveKey;
  17. /**
  18. * Initializes the values.
  19. * @param entry The {@code EntryType} of this information
  20. * @param extension The name extension for the type
  21. * @param value The value of this information
  22. */
  23. public MeSaveInfo(EntryType entry, String extension, String value)
  24. {
  25. this.value = value;
  26. this.saveKey=entry.getValue() + " "+extension;
  27. }
  28. /**
  29. * Initializes the values.
  30. * @param entry The {@code EntryType} of this information
  31. * @param value The value of this information
  32. */
  33. public MeSaveInfo(EntryType entry, String value)
  34. {
  35. this(entry,"",value);
  36. }
  37. /**
  38. * Returns the value of this information
  39. *
  40. * @return The described value.
  41. */
  42. public String getSaveValue()
  43. {
  44. return value;
  45. }
  46. /**
  47. * Returns the description / name of this infor (combination of the
  48. * {@link EntryType} and the extension
  49. *
  50. * @return The described value.
  51. */
  52. public String getSaveKey()
  53. {
  54. return saveKey;
  55. }
  56. }