|
Parkinson Disease Database | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectspirals.motol.database.Engine
public class Engine
Class with static and useful utilities used across application.
Copyright: Copyright (c) 2005 Jan Dolezel
Company: ÈVUT FEL, Prague
Nested Class Summary | |
---|---|
static class |
Engine.AbcComparator
czech lexicographical comparator of two strings Sorting of characters with ¨ above should be performed otherwise. |
Field Summary | |
---|---|
private static int |
begin
|
(package private) static java.util.Comparator |
bornComparator
comparator of two pacients by born date |
private Configuration |
config
confihuration |
private Database |
database
database |
private static int |
end
|
private MainFrame |
mf
main frame |
(package private) static java.util.Comparator |
nameComparator
comparator of two pacients by name |
private static java.text.SimpleDateFormat |
sdf
date formater: DD. |
private Tablet |
tablet
active tablet |
(package private) static java.util.Comparator |
visitComparator
comparator of two pacients by last visit |
Constructor Summary | |
---|---|
Engine(MainFrame frame,
Configuration conf)
starts application with main frame and configuration Load database, then tries to open tablet. |
Method Summary | |
---|---|
static void |
copy(java.io.InputStream in,
java.io.OutputStream out)
copies bytes from input stream to output stream |
static void |
copyDir(java.io.File copyDir,
java.io.File saveDir)
Recursively copies directory to destination |
Configuration |
getConfiguration()
return application configuration |
Database |
getDatabase()
return database |
MainFrame |
getMainFrame()
return main frame |
static java.util.Date |
getSimpleDate(java.lang.String date)
converts string to date (DD. |
static java.text.DateFormat |
getSimpleDateFormat()
return date formatter (DD. |
Tablet |
getTablet()
return active tablet |
org.jdom.input.SAXBuilder |
getXMLBuilder()
return XML reader |
org.jdom.output.XMLOutputter |
getXMLOutputer()
return XML outputter |
static java.lang.String |
hash(java.lang.String str)
hashes string to 8 characters Reminds first pass of md5. |
boolean |
selectTablet(TabletInfo ti)
set tablet as active tablet (if tablet is among available tablets) |
void |
setRestricted(boolean restricted)
set database to view all or only choosen pacients |
static void |
zipDir(java.io.File zipDir,
java.util.zip.ZipOutputStream zos,
java.io.File saveDir)
Recursively archives directory to ZipOutputStream |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private MainFrame mf
private Tablet tablet
private Database database
private Configuration config
private static final java.text.SimpleDateFormat sdf
private static final int begin
private static final int end
static final java.util.Comparator nameComparator
static final java.util.Comparator bornComparator
static final java.util.Comparator visitComparator
Constructor Detail |
---|
public Engine(MainFrame frame, Configuration conf)
Load database, then tries to open tablet.
Method Detail |
---|
public MainFrame getMainFrame()
public Tablet getTablet()
public Database getDatabase()
public void setRestricted(boolean restricted)
public Configuration getConfiguration()
public boolean selectTablet(TabletInfo ti)
public static final java.lang.String hash(java.lang.String str)
Reminds first pass of md5.
public static final void zipDir(java.io.File zipDir, java.util.zip.ZipOutputStream zos, java.io.File saveDir) throws java.io.IOException
zipDir
- directory/file to archivezos
- archive streamsaveDir
- name of parent directory in archive
java.io.IOException
public static final void copyDir(java.io.File copyDir, java.io.File saveDir) throws java.io.IOException
copyDir
- source directory/filesaveDir
- destination directory
java.io.IOException
public static final void copy(java.io.InputStream in, java.io.OutputStream out) throws java.io.IOException
java.io.IOException
public org.jdom.input.SAXBuilder getXMLBuilder()
public org.jdom.output.XMLOutputter getXMLOutputer()
public static final java.util.Date getSimpleDate(java.lang.String date)
date
- String
public static final java.text.DateFormat getSimpleDateFormat()
|
Parkinson Disease Database | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |