Parkinson Disease Database

spirals.motol.database
Class Data

java.lang.Object
  extended by spirals.motol.database.Data

public class Data
extends java.lang.Object

Class contains and information about tablet and about captured data.

Data itself are in file with name: pacient-hash_YYYY_MM_DD_HH_MM_SS.zip

Copyright: Copyright (c) 2005 Jan Dolezel

Company: ÈVUT FEL, Prague

See Also:
TabletData

Field Summary
static java.lang.String dataTag
          name of data tag
private  java.util.Date date
          creation time
static java.lang.String dateFormat
          format for naming file
static java.lang.String descAttr
          name of data type attribute
private  java.lang.String description
          type of drawing
private  java.io.File file
          file with data
static java.lang.String fileAttr
          name data file attribute
static java.lang.String maxxAttr
          name of tabet's maximal x coordinate attribute
static java.lang.String maxyAttr
          name of tabet's maximal y coordinate attribute
private  java.lang.String memo
          data comment
static java.lang.String memoTag
          name of comment tag
static java.lang.String minxAttr
          name of tabet's minimal x coordinate attribute
static java.lang.String minyAttr
          name of tabet's minimal y coordinate attribute
static java.lang.String nameAttr
          name of tablet name attribute
static java.lang.String tabletTag
          name of tablet tag
private  TabletInfo ti
          tablet measures
private  Visit visit
          pacient whom data belongs to
 
Constructor Summary
Data(Visit visit, org.jdom.Element data)
          crete new tablet data for pacient from XML tag
Data(Visit visit, TabletInfo tabletInfo, java.lang.String description, java.lang.String file, java.lang.String memo)
          create new tablet data for pacient from specified information From file name is extracted date and created relative path to this file from database root.
 
Method Summary
 java.lang.String getDescription()
          return type of drawing
 org.jdom.Element getElement()
          create XML element for saving Element contains type of drawing, file name with data, comment of drawing, and tablet measures with which were data captured.
 java.io.File getFile()
          return file with relative path from application root
 java.lang.String getMemo()
          return data comment
 TabletInfo getTabletInfo()
          returns tablet measures
private static TabletInfo getTabletInfoFromTag(org.jdom.Element tabEl)
          create new TabletInfo from XML tag
 void setDescription(java.lang.String description)
          set new type of drawing
 void setMemo(java.lang.String memo)
          set new comment
 void setTabletInfo(TabletInfo tabletInfo)
          set new tablet measures
 java.lang.String toFileName()
          return name of file
 java.lang.String toString()
          return type of drawing and date of creation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

visit

private Visit visit
pacient whom data belongs to


description

private java.lang.String description
type of drawing


date

private java.util.Date date
creation time


file

private java.io.File file
file with data


memo

private java.lang.String memo
data comment


ti

private TabletInfo ti
tablet measures


dataTag

public static final java.lang.String dataTag
name of data tag

See Also:
Constant Field Values

descAttr

public static final java.lang.String descAttr
name of data type attribute

See Also:
Constant Field Values

tabletTag

public static final java.lang.String tabletTag
name of tablet tag

See Also:
Constant Field Values

nameAttr

public static final java.lang.String nameAttr
name of tablet name attribute

See Also:
Constant Field Values

minxAttr

public static final java.lang.String minxAttr
name of tabet's minimal x coordinate attribute

See Also:
Constant Field Values

maxxAttr

public static final java.lang.String maxxAttr
name of tabet's maximal x coordinate attribute

See Also:
Constant Field Values

minyAttr

public static final java.lang.String minyAttr
name of tabet's minimal y coordinate attribute

See Also:
Constant Field Values

maxyAttr

public static final java.lang.String maxyAttr
name of tabet's maximal y coordinate attribute

See Also:
Constant Field Values

fileAttr

public static final java.lang.String fileAttr
name data file attribute

See Also:
Constant Field Values

memoTag

public static final java.lang.String memoTag
name of comment tag

See Also:
Constant Field Values

dateFormat

public static final java.lang.String dateFormat
format for naming file

See Also:
Constant Field Values
Constructor Detail

Data

public Data(Visit visit,
            org.jdom.Element data)
crete new tablet data for pacient from XML tag


Data

public Data(Visit visit,
            TabletInfo tabletInfo,
            java.lang.String description,
            java.lang.String file,
            java.lang.String memo)
create new tablet data for pacient from specified information

From file name is extracted date and created relative path to this file from database root.

Parameters:
pacient - Pacient whom belong data
tabletInfo - tablet measures
description - type of drawing
file - name of file
memo - comment
Method Detail

getTabletInfoFromTag

private static final TabletInfo getTabletInfoFromTag(org.jdom.Element tabEl)
create new TabletInfo from XML tag


getElement

public org.jdom.Element getElement()
create XML element for saving

Element contains type of drawing, file name with data, comment of drawing, and tablet measures with which were data captured.


getDescription

public java.lang.String getDescription()
return type of drawing


toString

public java.lang.String toString()
return type of drawing and date of creation

Overrides:
toString in class java.lang.Object

toFileName

public java.lang.String toFileName()
return name of file


getFile

public java.io.File getFile()
return file with relative path from application root


getMemo

public java.lang.String getMemo()
return data comment


getTabletInfo

public TabletInfo getTabletInfo()
returns tablet measures


setTabletInfo

public void setTabletInfo(TabletInfo tabletInfo)
set new tablet measures


setMemo

public void setMemo(java.lang.String memo)
set new comment


setDescription

public void setDescription(java.lang.String description)
set new type of drawing


Parkinson Disease Database