|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.schemedit.standards.TreeCache
public class TreeCache
Cashe of AsnStandardsDocuments. Works with a StandardsRegistry
instance to support
the "getStandardsDocument" call. Maintains a tree map of specified size.
When a call to getStandardsDocument is called: - Most recently used list is
updated to put that tree first. - if requested tree is not in the tree map,
the least recently used tree is destroyed and the requested tree is read
(using path obtained from the Registry).
Constructor Summary | |
---|---|
TreeCache(StandardsRegistry standardsRegistry)
Constructor for the TreeCache object |
Method Summary | |
---|---|
void |
addTree(String key,
AsnStandardsDocument tree)
Description of the Method |
AsnStandardsNode |
getStandardsNode(String asnId)
Gets the standardsNode attribute of the TreeCache object |
AsnStandardsNode |
getStandardsNodeOLD(String asnId)
Gets the standardsNode attribute of the TreeCache object |
AsnStandardsDocument |
getTree(String key)
Get the StandardsTree specified by provided key. |
boolean |
isFull()
Gets the full attribute of the TreeCache object |
static void |
main(String[] args)
The main program for the TreeCache class |
void |
removeTree()
Remove least recently used tree from the cache |
void |
removeTree(String key)
Remove specified tree from the cache |
void |
report()
NOT YET DOCUMENTED |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TreeCache(StandardsRegistry standardsRegistry) throws Exception
standardsRegistry
- NOT YET DOCUMENTED
Exception
- NOT YET DOCUMENTEDMethod Detail |
---|
public void addTree(String key, AsnStandardsDocument tree)
key
- Document key of the form (tree
- Description of the Parameterpublic boolean isFull()
public void removeTree()
public void removeTree(String key)
key
- key of asnStandardsDocumentpublic AsnStandardsDocument getTree(String key)
if the treeMap.containsKey(key) - usageQueue.touch(key) otherwise - tree = new AsnStandardsDocument (key) - addTree (key, tree) return treeMap.get(key)
key
- document key (e.g., "AAAS.Science.1993.D1000152")
public AsnStandardsNode getStandardsNodeOLD(String asnId)
asnId
- Description of the Parameter
public AsnStandardsNode getStandardsNode(String asnId) throws Exception
asnId
- NOT YET DOCUMENTED
Exception
- NOT YET DOCUMENTEDpublic void report()
public static void main(String[] args) throws Exception
args
- The command line arguments
Exception
- NOT YET DOCUMENTED
|
DLESE Tools v1.6.0 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |