|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectzugvis.Functions
public class Functions
Set of utility functions
Constructor Summary | |
---|---|
Functions()
|
Method Summary | |
---|---|
static prefuse.data.Table |
addInternalConnectionIDs(prefuse.data.Table connections)
Adds internal Connection IDs, ids are 0, 10, 20, 30... |
static prefuse.data.Table |
addStationNames(prefuse.data.Table data,
prefuse.data.Table stations)
Adds new columns with trainnames on the data-tabel |
static prefuse.data.Table |
addTipText(prefuse.data.Table data,
prefuse.data.Table dates,
boolean relativ)
Adds a new column "tipText" with traininfos in HTML specially for tooltips |
static prefuse.data.Table |
addTrainInfo(prefuse.data.Table data,
prefuse.data.Table trains)
Adds new columns with trainnames and infos on the data-table |
static void |
deleteDirectory(java.io.File path)
|
static prefuse.data.Table |
deleteStopOvers(prefuse.data.Table connections)
Delete Stop overs |
static java.lang.String |
extractTabels(java.lang.String zipfileName,
java.lang.String tempDirName)
tries to extract the 4 necessary datatables from a given zip file |
static java.util.GregorianCalendar |
getEarliestDate(prefuse.data.Table data,
java.util.GregorianCalendar day)
Get the earliste connection (time/date) of a specific date |
static java.lang.Object |
getFieldforID(java.lang.String ID,
java.lang.String IDfield,
java.lang.String field,
prefuse.data.Table t)
|
static java.util.GregorianCalendar |
getLatestDate(prefuse.data.Table data,
java.util.GregorianCalendar day)
Get the lastest arival of connection (time/date) of a specific date |
static prefuse.data.Table |
getSortedConnections(prefuse.data.Table connections,
boolean ascend)
Sort connectionstable on field "fromTime" |
static int |
long2int(long l)
Returns the int value that is closest to l. |
static prefuse.data.Table |
makeData(prefuse.data.Table connections,
prefuse.data.Table stations,
prefuse.data.Table trains,
prefuse.data.Table dates)
Geneartes a Table with all Dates of the planevalidation and trains |
static prefuse.data.Table |
makeRelData(prefuse.data.Table connections,
prefuse.data.Table stations,
prefuse.data.Table trains,
prefuse.data.Table dates)
Geneartes a Table with all Dates of the planevalidation and trains for the relative barchartvisualization |
static long |
object2Long(java.lang.Object obj)
convert an object to a long |
static int |
searchLast(java.lang.String searchField,
java.lang.String searchValue,
prefuse.data.Table t)
find the last row in a table containing a given value |
static com.toedter.calendar.JCalendar |
setValidDates(com.toedter.calendar.JCalendar calendar,
prefuse.data.Table dates)
Sets the calendar MinSelectableDate and MaxSelectableDate |
static boolean |
trainOnDate(int connectID,
java.util.GregorianCalendar onDate,
prefuse.data.Table dates)
Return true if a connection goes on a specific date |
static java.lang.String |
trainOnDateInfo(java.lang.String connectID,
prefuse.data.Table dates)
Return a string with traininfos abaut the plan |
static java.lang.String |
validateTabels(prefuse.data.Table connections,
prefuse.data.Table stations,
prefuse.data.Table trains,
prefuse.data.Table dates)
tests the consitency of the 4 datatables |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Functions()
Method Detail |
---|
public static prefuse.data.Table deleteStopOvers(prefuse.data.Table connections)
connections
- Tabel of Connections
public static prefuse.data.Table getSortedConnections(prefuse.data.Table connections, boolean ascend)
ascend
- Sort ascendconnections
- Tabel of Connections
public static prefuse.data.Table makeData(prefuse.data.Table connections, prefuse.data.Table stations, prefuse.data.Table trains, prefuse.data.Table dates)
connections
- Table of connectionsstations
- Table of stationnames and infostrains
- Table of trainnames and infosdates
- Table of dates, if a connection goes or not on a specific day/date (first row are the planvaluerange)
public static prefuse.data.Table makeRelData(prefuse.data.Table connections, prefuse.data.Table stations, prefuse.data.Table trains, prefuse.data.Table dates)
connections
- Table of connectionsstations
- Table of stationnames and infostrains
- Table of trainnames and infosdates
- Table of dates, if a connection goes or not on a specific day/date (first row are the planvaluerange)
public static boolean trainOnDate(int connectID, java.util.GregorianCalendar onDate, prefuse.data.Table dates)
connectID
- ID of the connectiononDate
- The specific Datedates
- Table of Dates
public static java.lang.String trainOnDateInfo(java.lang.String connectID, prefuse.data.Table dates)
connectID
- ID of the connectiondates
- Table of Dates
public static prefuse.data.Table addInternalConnectionIDs(prefuse.data.Table connections)
connections
- Table of connections
public static prefuse.data.Table addTrainInfo(prefuse.data.Table data, prefuse.data.Table trains)
data
- Table of connectionstrains
- Table of traininfos
public static prefuse.data.Table addTipText(prefuse.data.Table data, prefuse.data.Table dates, boolean relativ)
dates
- Table of datesrelativ
- If relativ, timeinfos ware taken from "fromTimeReal" and "toTimeReal"data
- Table of connections with tiptextrow
public static prefuse.data.Table addStationNames(prefuse.data.Table data, prefuse.data.Table stations)
stations
- Table of stationnames and infosdata
- Table of connections
public static java.util.GregorianCalendar getEarliestDate(prefuse.data.Table data, java.util.GregorianCalendar day)
data
- Table of data/connectionsday
- the specific day
public static java.util.GregorianCalendar getLatestDate(prefuse.data.Table data, java.util.GregorianCalendar day)
data
- Table of data/connectionsday
- the specific day
public static com.toedter.calendar.JCalendar setValidDates(com.toedter.calendar.JCalendar calendar, prefuse.data.Table dates)
calendar
- Calendar to setdates
- Table of dates
public static long object2Long(java.lang.Object obj)
public static int long2int(long l)
public static java.lang.Object getFieldforID(java.lang.String ID, java.lang.String IDfield, java.lang.String field, prefuse.data.Table t)
ID
- IDfield
- field
- t
-
public static int searchLast(java.lang.String searchField, java.lang.String searchValue, prefuse.data.Table t)
searchField
- the field of the table that is compared to the searchValue parameter.searchValue
- the value that is searchedpublic static java.lang.String extractTabels(java.lang.String zipfileName, java.lang.String tempDirName)
public static void deleteDirectory(java.io.File path)
public static java.lang.String validateTabels(prefuse.data.Table connections, prefuse.data.Table stations, prefuse.data.Table trains, prefuse.data.Table dates)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |