|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectFlkRecent
public class FlkRecent
FlkRecent contains methods to maintain the FlkRecentDB.txt database used by Flicker. These are recently accessed image files. The file is written after EACH new image is loaded.
The file is a tab-delimited file with the following fields: DbMenuName, ClickableURL, ImageURL, DatabaseName, TimeStamp The map is used to build menus of images to load a map entry contains the following fields: 1. DbMenuName: is the name of the database+menuName: e.g., "SWISS-2DPROT Human Plasma" 2. ClickableURL1: is the clickable map URL for image 1: e.g., "http://www.expasy.org/cgi-bin/map3/big/PLASMA_HUMAN?" 3. ClickableURL2: is the clickable map URL for image 2: e.g., it may be null 4. ImageURL1: is the Image URL for image 1: e.g. "http://www.expasy.org/ch2dgifs/PLASMA_HUMAN/PLASMA_HUMAN_id.gif" 5. ImageURL2: is the Image URL for image 2: e.g. it may be null 6. DatabaseName: is name of the database: e.g., "SWISS-2DPROT Human" 7. TimeStamp: is the time stamp when it was saved: e.g. "20030918-170230" The database file FlkRecentDB.txt contains data Fields: DbMenuName, ClickableURL, ImageURL, DatabaseName, TimeStamp E.g. of a data entry: SWISS-2DPROT Human Plasma http://www.expasy.org/cgi-bin/map3/PLASMA_HUMAN? http://www.expasy.org/ch2dgifs/PLASMA_HUMAN/PLASMA_HUMAN_id.gif SWISS-2DPROT Human 20030918-170230
This work was produced by Peter Lemkin of the National Cancer Institute, an agency of the United States Government. As a work of the United States Government there is no associated copyright. It is offered as open source software under the Mozilla Public License (version 1.1) subject to the limitations noted in the accompanying LEGAL file. This notice must be included with the code. The Flicker Mozilla and Legal files are available on http://open2dprot.sourceforge.net/Flicker
Field Summary | |
---|---|
(package private) java.lang.String |
clickableURL1
is the clickable map URL for image 1: e.g., "http://www.expasy.org/cgi-bin/map3/big/PLASMA_HUMAN?" |
(package private) java.lang.String |
clickableURL2
is the clickable map URL for image 2: e.g., "http://www.expasy.org/cgi-bin/map3/big/PLASMA_HUMAN?" |
(package private) java.lang.String |
databaseName
is name of the database: e.g., "SWISS-2DPROT Human" |
(package private) java.lang.String |
dbMenuName
is the name of the database+menuName: e.g., "SWISS-2DPROT Human Plasma" |
private static Flicker |
flk
Instance of Flicker |
static boolean |
flkRecentChangedFlag
flat that is set true if we edit the file (add/delete) since we loaded it from the disk. |
static java.lang.String |
FlkRecentDBfile
name of the database file |
static FlkRecent[] |
flkRecents
FlkRecent database [0:nMaps] |
(package private) java.lang.String |
imageURL1
ImageURL: is the Image URL for image: e.g. |
(package private) java.lang.String |
imageURL2
ImageURL: is the Image URL for image: e.g. |
static int |
MAX_RECENTS
Max # of recent images |
static int |
nMaps
|
(package private) java.lang.String |
timeStamp
is the time stamp when it was saved: e.g. |
private static Util |
util
Util instance |
Constructor Summary | |
---|---|
FlkRecent(Flicker flkS)
FlkRecent() - constructor for Class FlkRecent |
|
FlkRecent(java.lang.String dbMenuName,
java.lang.String clickableURL,
java.lang.String imageURL,
java.lang.String databaseName,
java.lang.String timeStamp)
FlkRecent() - constructor to add a new FlkRecent entry NOTE: to do add of an entry, use 'new FlkRecent()' method |
|
FlkRecent(java.lang.String dbMenuName,
java.lang.String clickableURL1,
java.lang.String clickableURL2,
java.lang.String imageURL1,
java.lang.String imageURL2,
java.lang.String databaseName,
java.lang.String timeStamp)
FlkRecent() - constructor to add a new FlkRecent entry pair NOTE: to do add of an entry, use 'new FlkRecent()' method |
Method Summary | |
---|---|
(package private) static FlkRecent |
addOrUpdate(java.lang.String dbMenuName,
java.lang.String clickableURL,
java.lang.String imageURL,
java.lang.String databaseName,
java.lang.String timeStamp)
addOrUpdate() - add or Update an entry to database FlkRecents[0:nMaps-1]. |
(package private) static FlkRecent |
addOrUpdatePair(java.lang.String dbMenuName,
java.lang.String clickableURL1,
java.lang.String clickableURL2,
java.lang.String imageURL1,
java.lang.String imageURL2,
java.lang.String databaseName,
java.lang.String timeStamp)
addOrUpdatePair() - add or Update an entry pair to DB FlkRecents[0:nMaps-1]. |
(package private) static void |
clear()
clear() - clear database FlkRecents[0:nMaps-1]. |
(package private) boolean |
delete()
delete() - rmv entry from database FlkRecents[0:nMaps-1]. |
(package private) static boolean |
deleteOldestEntry()
deleteOldestEntry() - delete the oldest entry |
(package private) static int |
lookup(FlkRecent fm)
lookup() - lookup entry to database FlkRecents[0:nMaps-1]. |
(package private) static FlkRecent |
lookupByDbMenuName(java.lang.String dbMenuName)
lookupByDbMenuName() - lookup entry by dbMenuName in FlkRecents[0:nMaps-1]. |
(package private) static FlkRecent |
lookupByImageURL(java.lang.String imageURLname)
lookupByImageURL() - lookup entry by dbMenuName in FlkRecents[0:nMaps-1]. |
(package private) static FlkRecent |
lookupByImageURL(java.lang.String imageURLname1,
java.lang.String imageURLname2)
lookupByImageURL() - lookup oair entry by dbMenuName in FlkRecents[0:nMaps-1]. |
(package private) static boolean |
read()
read() - read database from FlkRecentDB.txt file to FlkRecents[0:nMaps-1]. |
(package private) boolean |
set(java.lang.String dbMenuName,
java.lang.String clickableURL,
java.lang.String imageURL,
java.lang.String databaseName,
java.lang.String timeStamp)
set() - set entry to database FlkRecents[0:nMaps-1]. |
(package private) boolean |
set(java.lang.String dbMenuName,
java.lang.String clickableURL1,
java.lang.String clickableURL2,
java.lang.String imageURL1,
java.lang.String imageURL2,
java.lang.String databaseName,
java.lang.String timeStamp)
set() - set entry pair to database FlkRecents[0:nMaps-1]. |
(package private) static boolean |
setByImageURL(java.lang.String dbMenuName,
java.lang.String clickableURL,
java.lang.String imageURL,
java.lang.String databaseName,
java.lang.String timeStamp)
setByImageURL() - set entry to database FlkRecents[0:nMaps-1]. |
(package private) static boolean |
write()
write() - write database in memory to FlkRecentDB.txt database file. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static Flicker flk
private static Util util
public static final int MAX_RECENTS
public static FlkRecent[] flkRecents
public static int nMaps
public static java.lang.String FlkRecentDBfile
public static boolean flkRecentChangedFlag
java.lang.String dbMenuName
java.lang.String clickableURL1
java.lang.String clickableURL2
java.lang.String imageURL1
java.lang.String imageURL2
java.lang.String databaseName
java.lang.String timeStamp
Constructor Detail |
---|
public FlkRecent(Flicker flkS)
flk
- instance of Flickerpublic FlkRecent(java.lang.String dbMenuName, java.lang.String clickableURL, java.lang.String imageURL, java.lang.String databaseName, java.lang.String timeStamp)
dbMenuName
- clickableURL
- imageURL
- databaseName
- timeStamp
- public FlkRecent(java.lang.String dbMenuName, java.lang.String clickableURL1, java.lang.String clickableURL2, java.lang.String imageURL1, java.lang.String imageURL2, java.lang.String databaseName, java.lang.String timeStamp)
dbMenuName
- clickableURL1
- clickableURL2
- imageURL1
- imageURL2
- databaseName
- timeStamp
- Method Detail |
---|
static boolean read()
static boolean write()
static int lookup(FlkRecent fm)
fm
- is the instance to lookup
static FlkRecent lookupByDbMenuName(java.lang.String dbMenuName)
dbMenuName
- is the menu name of the instance to lookup
static FlkRecent lookupByImageURL(java.lang.String imageURLname)
imageURLname
- is the imageURL name of the instance to lookup
static FlkRecent lookupByImageURL(java.lang.String imageURLname1, java.lang.String imageURLname2)
imageURLname1
- is the imageURL1 name of the instance to lookupimageURLname2
- is the imageURL2 name of the instance to lookup
static FlkRecent addOrUpdate(java.lang.String dbMenuName, java.lang.String clickableURL, java.lang.String imageURL, java.lang.String databaseName, java.lang.String timeStamp)
dbMenuName
- clickableURL
- may be nullimageURL
- URL or local file pathdatabaseName
- timeStamp
-
static FlkRecent addOrUpdatePair(java.lang.String dbMenuName, java.lang.String clickableURL1, java.lang.String clickableURL2, java.lang.String imageURL1, java.lang.String imageURL2, java.lang.String databaseName, java.lang.String timeStamp)
dbMenuName
- clickableURL
- may be nullimageURL
- URL or local file pathdatabaseName
- timeStamp
-
boolean set(java.lang.String dbMenuName, java.lang.String clickableURL, java.lang.String imageURL, java.lang.String databaseName, java.lang.String timeStamp)
dbMenuName
- clickableURL
- imageURL
- databaseName
- timeStamp
-
boolean set(java.lang.String dbMenuName, java.lang.String clickableURL1, java.lang.String clickableURL2, java.lang.String imageURL1, java.lang.String imageURL2, java.lang.String databaseName, java.lang.String timeStamp)
dbMenuName
- clickableURL1
- clickableURL2
- imageURL1
- imageURL2
- databaseName
- timeStamp
-
static boolean setByImageURL(java.lang.String dbMenuName, java.lang.String clickableURL, java.lang.String imageURL, java.lang.String databaseName, java.lang.String timeStamp)
dbMenuName
- clickableURL
- imageURL
- databaseName
- timeStamp
-
static boolean deleteOldestEntry()
boolean delete()
static void clear()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |