multivalent.std.adaptor

Class ArchiveMediaAdaptor

public abstract class ArchiveMediaAdaptor extends MediaAdaptorByte

Superclass for archive media adaptors, such as zip/jar, sit, tar, do/dsk, po/raw.

Common services:

Maybe later define additional file operations, such as delete, rename, add, ....

Version: $Revision: 1.2 $ $Date: 2002/02/01 08:55:52 $

Field Summary
static StringALLFILES
static StringFILENAME
protected booleanfulltext
static StringLASTMOD
static StringLENGTH
static StringMSG_SORTBY
static StringNONE
static StringPREF_SORTBY
protected booleanstandard
protected booleanverbose
Method Summary
abstract FileextractFile(File archive, String filename, File outdir)
abstract List<ArchiveFileEntry>getCatalog(File archive)
protected abstract String[]getPatterns()
booleansemanticEventAfter(SemanticEvent se, String msg)
booleansemanticEventBefore(SemanticEvent se, String msg)
If MSG_OPEN on a file within the archive (not in file system), and up to arg instanceof DocInfo stage, and file not in cache, then sneak it (so eventBefore) into cache so whatever media adaptor can find it.

Field Detail

ALLFILES

public static final String ALLFILES

FILENAME

public static final String FILENAME

fulltext

protected boolean fulltext

LASTMOD

public static final String LASTMOD

LENGTH

public static final String LENGTH

MSG_SORTBY

public static final String MSG_SORTBY

NONE

public static final String NONE

PREF_SORTBY

public static final String PREF_SORTBY

standard

protected boolean standard

verbose

protected boolean verbose

Method Detail

extractFile

public abstract File extractFile(File archive, String filename, File outdir)

getCatalog

public abstract List<ArchiveFileEntry> getCatalog(File archive)

getPatterns

protected abstract String[] getPatterns()

semanticEventAfter

public boolean semanticEventAfter(SemanticEvent se, String msg)

semanticEventBefore

public boolean semanticEventBefore(SemanticEvent se, String msg)
If MSG_OPEN on a file within the archive (not in file system), and up to arg instanceof DocInfo stage, and file not in cache, then sneak it (so eventBefore) into cache so whatever media adaptor can find it. On remote http, server doesn't know about treating .zip as a special file system directory, so it works best on the local file system -- until we move to Cache as ordinary behavior among others that can set InputStream. Put this in System.hub so works on all URIs, not just from within .zip directory listing.