[daisy] Daisy detachment
Bruno Dumon
bruno at outerthought.org
Wed Jul 5 11:14:01 CDT 2006
On Wed, 2006-07-05 at 17:49 +0200, Marc Portier wrote:
<snip/>
> > Some questions:
> > -The Document interface does not have a method for adding a field. It
> > just has setField(). Why is this?
>
> unsure, I guess fields are part of the document-type so they are there
> anyway. they just might have a null value?
>
> Any deeper thoughts to add, Bruno?
Not really. There can be only one of each field type, so it would be a
bit strange to have both add and set.
> > -What is the difference between links and link fields?
> >
>
> fields of type 'link' were recently added, and are probably a more
> elegant way for achieving the same (meaning: I can't easily come up with
> use cases that would require the previous 'links')
>
> we have to be ready for repositories that still use the older 'links'
> though ;-(
>
> Bruno, do you have plans on actually convert the links to link-fields in
> some near future release?
Not at all, I don't see much relation between the two.
The links are for adding 'out-of-line' links to documents. These are
useful for links that don't fit well inline in the HTML content, or for
adding links to non-HTML document types (e.g. image documents).
The link-type fields are for structured relationships between documents.
Such links need to be predefined in the document type (thus need to be
decided on up front), and don't have a title attribute.
<snip/>
> > -Things like branches and languages are stored in a Document object as
> > ids. These mean a lot to a computer but not much to a human. It would be
> > nice for people to see the name of the document owner, for example, for
> > the document they have detached. Retrieving names involves connecting to
> > the repository, which is not something we want to do except for when
> > downloading and uploading detachments. My solution was to retrieve this
> > information when the Document was first downloaded and store it with the
> > Document in an implementation of the Document interface called
> > DetachmentDocument. This implementation has fields such as ownerName for
> > storing this information. Of course this information must be persisted
> > in the detachment file so it can be accessed next time the file is
> > opened. This means the getXml() method is no longer sufficient as it
> > does not provide the name attributes I want. I have the schema and the
> > generated classes for a more complete xml rendering, but now I'm
> > starting to wonder if it is really so important for people to be able to
> > see owner name or branch name since it would be much easier to stick
> > with the current implementation. Otherwise, if any one has any
> > suggestions or ideas they would be appreciated.
>
> I think having the readable formats will turn out to be highly
> appreciated (even a crucial element of perceived usability)
>
> Maybe you should explain why the various 'name' variants can't be in the
> getXML()?
Might be because these are not in the document XSD, when reusing Daisy's
schema/classes. But if that's the problem, I think it would be better to
keep a separate file for mapping IDs of entities to their name/label.
--
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno at outerthought.org bruno at apache.org
More information about the daisy
mailing list