|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
org.ceryle.ui.xnode.archive.ZipReader
public class ZipReader
A utility extending Thread used to restore XNode database collections from previously created (zip) archives.
Once reparsed, the manifest.xml file becomes a Hashtable of Hashtables, one for each Collection. Each key in the m_collections Hashtable is a collection ID (cid) mapped to a Hashtable containing document ID (nid), which is mapped to a 4 element string array created from the DOM <entry> Element taken from the original XML manifest file. The order of the String array is: { cid, nid, created, modified }. Note that the modified attribute is optional; all others are required.
Note that the org.ceryle.xnode.archive package is not part of the standard distribution of the XNode API or implementation, as it includes too many UI ties.
Copyright 2001-2007 Murray Altheim. All Rights Reserved.
See LICENSE included with distribution.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static int |
m_error_limit
The maximum number of read errors prior to aborting the read process. |
static int |
m_errors
The number of read errors that have occurred during the current thread. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
ZipReader(File file,
JProgressBar progress,
ActionListener finishedListener)
Constructor provided a list of database Collection IDs, and the base of the zip file name filebase (eg., "archive-20020801", which should not include the ".zip" file extension, as it will be added here. |
|
| Method Summary | |
|---|---|
protected Document |
readManifest(ZipFile zipfile,
ZipEntry manifest)
Processes the manifest from its ZipEntry source, returning a DOM Document. |
void |
run()
Begins the restoration process. |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static int m_error_limit
public static int m_errors
| Constructor Detail |
|---|
public ZipReader(File file,
JProgressBar progress,
ActionListener finishedListener)
| Method Detail |
|---|
public void run()
run in interface Runnablerun in class Thread
protected Document readManifest(ZipFile zipfile,
ZipEntry manifest)
throws ZipException
ZipException - if any errors occur during processing of the ZipEntry
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||