Parkinson Disease Database

spirals.data
Class TabletData

java.lang.Object
  extended by spirals.data.TabletData

public class TabletData
extends java.lang.Object

Class stores list of tablet points creating drawing.

Data are stored in zip archive with one file in it. On name of inner file is taken no respect.

Copyright: Copyright (c) 2005 Jan Dolezel

Company: ÈVUT FEL, Prague


Field Summary
private  TabletInfo ti
          tablet measures with which were data captured
private  java.util.List<TabletPoint> vektor
          list of TabletPoints
 
Constructor Summary
TabletData(java.io.File file, TabletInfo tabletInfo)
          loads list from file Method reads file which is supposed to be zip archive.
TabletData(TabletInfo tabletInfo)
          creates new empty list with specified tablet
 
Method Summary
 void add(TabletPoint tabletPoint)
          appends TabletPoint to list
 TabletPoint get(int index)
          retrieves TabletPoint at specified position
 TabletInfo getTabletInfo()
          returns information about tablet with which were data captured
 boolean save(java.io.File file)
          saves list to file Method save sequence of tablet points to file.
 int size()
          returns length of list of points
 void trim()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

vektor

private java.util.List<TabletPoint> vektor
list of TabletPoints


ti

private TabletInfo ti
tablet measures with which were data captured

Constructor Detail

TabletData

public TabletData(TabletInfo tabletInfo)
creates new empty list with specified tablet

Parameters:
tabletInfo - tablet measures

TabletData

public TabletData(java.io.File file,
                  TabletInfo tabletInfo)
loads list from file

Method reads file which is supposed to be zip archive. Archive contains one file, no matter of its name. Inner file consists of blocks of 20 bytes representing one tablet point.

Parameters:
file - file to load from
tabletInfo - tablet measures
Method Detail

add

public void add(TabletPoint tabletPoint)
appends TabletPoint to list


get

public TabletPoint get(int index)
retrieves TabletPoint at specified position


size

public int size()
returns length of list of points


save

public boolean save(java.io.File file)
saves list to file

Method save sequence of tablet points to file. File is zip archive and contains one file with main data. Data are blocks of 20 bytes each block represent one tablet point.

Returns:
boolean whether was save succesful

trim

public void trim()

getTabletInfo

public TabletInfo getTabletInfo()
returns information about tablet with which were data captured


Parkinson Disease Database