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.

61 lines
1.4 KiB

3 years ago
  1. package application.helpers.wrappers;
  2. import application.enums.EntryType;
  3. import application.parsing.FileWrapper;
  4. /**
  5. * This class wraps the information saved in one line of all files except the Me
  6. * File.
  7. *
  8. * @author Bianca
  9. *
  10. */
  11. public class GeneralSaveInfo
  12. {
  13. /**
  14. * A readable name of the file where these values should be saved
  15. */
  16. private String readableFilename;
  17. /** The values to be saved **/
  18. private String[] values;
  19. /**
  20. * Initializes the attributes
  21. * @param values The values to be saved
  22. * @param type The {@link EntryType} of this info.
  23. * @param subCategory The subCategory as specifier for the file (e.g subRecord name)
  24. */
  25. public GeneralSaveInfo(String[] values, EntryType type, String subCategory)
  26. {
  27. this.values = values;
  28. this.readableFilename = FileWrapper.createReadableFileName(type.getValue(), subCategory);
  29. }
  30. /**
  31. * Initializes the attributes
  32. * @param values The values to be saved
  33. * @param type The {@link EntryType} of this info.
  34. */
  35. public GeneralSaveInfo(String[] values, EntryType type)
  36. {
  37. this(values, type, "");
  38. }
  39. /**
  40. * Returns the filename of the file where this data should be saved
  41. * @return The described value.
  42. */
  43. public String getReadableFilename()
  44. {
  45. return readableFilename;
  46. }
  47. /**
  48. * Returns the values which should be saved.
  49. * @return The described values.
  50. */
  51. public String[] getValues()
  52. {
  53. return values;
  54. }
  55. }