On Wed, Dec 04, 2002 at 01:44:31PM -0800, cruft at hushmail.com wrote:
<>
> The idea is that the mapfile is composed of a series of "document"
> entries that have names (accessible through 
> metadataobj.getDocumentNames()) they have format/MIME types, and they
> have redirect targets which can be CHKs, SSKs, or KSKs.

Metadata is broken up into a series of Document parts (the corresponding
class in DocumentCommand). Each one of these is named, and are then
selected according to the metadata strings on the URI (falling back on
the unnamed one if there is no string or no match). Each Document then
contains a set of "parts" (MetadataPart) which contain the actual
information (the top level in the dot notation) - some parts give you
further information on where to find the data (like DateRedirect - we
call these control parts), others on what the data is (like Info). Each
Document is only supposed to contain one control part, but beyond that
little can be said about them in general.

> The question is how do I get to the redirect information?  I know about
> DocumentCommand objects, but are you saying that the only way you can
> get information about a document is by getting its DocumentCommand 
> object and executing it through, finally asking that object what it's
> final key was, or isn't there a much more simple way of finding out
> what redirect key is associated with a given document name inside one
> of these control part metadata segments?

You can get the control part by calling .getControlPart() on the
DocumentCommand, but I'm not sure what you mean by getting the "redirect
information". You are talking about a key, but nothing guarantees that a 
control part redirects to a single key - clearly SplitFile does not for 
example. A control part only makes sense if you know what it does.

-- 

Oskar Sandberg
oskar at freenetproject.org

_______________________________________________
devl mailing list
devl at freenetproject.org
http://hawk.freenetproject.org/cgi-bin/mailman/listinfo/devl

Reply via email to