]> gerrit.simantics Code Review - simantics/platform.git/blob - bundles/org.simantics.history/src/org/simantics/history/HistoryItem.java
Migrated source code from Simantics SVN
[simantics/platform.git] / bundles / org.simantics.history / src / org / simantics / history / HistoryItem.java
1 package org.simantics.history;\r
2 \r
3 import org.simantics.databoard.annotations.Identifier;\r
4 import org.simantics.databoard.type.Datatype;\r
5 import org.simantics.databoard.util.Bean;\r
6 \r
7 /**\r
8  * (Utility Class) Item format for HistoryItem.\r
9  *\r
10  * @author toni.kalajainen@semantum.fi\r
11  */\r
12 public class HistoryItem extends Bean.Id  {\r
13 \r
14         /** \r
15          * Unique identifier of the item.\r
16          */\r
17         public @Identifier String id;\r
18         \r
19         /** \r
20          * Describes the format of the packed sample. The sample must be a record.\r
21          * The record must have any combination of the following named fields.\r
22          * The field types must one of: byte, integer, long, float, double.\r
23          * \r
24          * time, endTime, value - are mandatory fields.\r
25          * \r
26          *  time      -  Region start time, the time of the 1st sample included into the band\r
27          *  endTime   -  Region end time, the time of the last sample included into the band\r
28          *  \r
29          *  value     -  First value in the band\r
30          *  lastValue -  Last value in the band\r
31          *  avg       -  Average value of all included samples\r
32          *  median    -  Median value of all samples in the band\r
33          *  min       -  Lowest value in the band\r
34          *  max       -  Highest value in the band\r
35          *  \r
36          *  quality   -  0 = Good, -1 = No value\r
37          *  count     -  The number of included samples in the band\r
38          */\r
39         public Datatype format;\r
40         \r
41         public HistoryItem(String id, Datatype format) {\r
42                 super();\r
43                 this.id = id;\r
44                 this.format = format;\r
45         }\r
46         \r
47 }\r