[Biojava-l] references

Thomas Down td2@sanger.ac.uk
Tue, 30 May 2000 17:53:44 +0100


Okay, I'm actually just across the office from Matt, but I'm posting
to the list to kick the discussion off.

I'm also keen to see Reference objects in BioJava (is this such
a good name?  We already have java.lang.ref.Reference and
javax.naming.Reference.  But no matter).  The real issue behind
references is that they're rather complicated.  My main experience
of bibliographical databases is Lout's @Reference objects. (For
those who've never seen Lout, it's like LaTeX, but simpler syntax.
See http://snark.ptc.spbu.ru/~uwe/lout/lout.html)

Anyway, Lout references have a /lot/ of possible properties.  One
of the properties is an @Type string, which indicates which of the
other types are used, and how the reference should be printed.  Valid
types are

  Book, Proceedings, PhDThesis, TechReport, MastersThesis, Misc,
Article, InBook, InProceedings

(and I think that since this system was designed, things have got
even worse.  For instance, there certainly ought to be a WebSite
type, to use when referencing BioJava :).

There are several options that could be taken:

  - Have a baroque reference object with lots of properties
    (modelled on Lout?).  This would actually work quite well,
    but it makes me rather uneasy...

  - Model reference types on the basis of polymorphism, e.g.
    BookReference, ArticleReference, WebSiteReference.  This might
    be quite hard to use in practice, though...

  - Have a `core reference' interface containing only slightly
    more than what Matt suggested, then add extra fields on a
    tag-value basis.

At the moment, my current feeling is that option 3 might be
the easiest route to sanity, but it's certainly something that's
worth discussing.

Other interesting question: I agree (at least in principle, might
want to thrash the details slightly) with the idea of modelling
Authors as their own class.  But what about other cases?  Should
a web-site URL be a String or a java.net.URL, or what?  How about
Journal objects (which might be quite helpful in some cases, but
could also really get in the way at other times).

We've already had a bit of talk of persistance on the list,
and References are a case where this is really worth thinking 
about right from day one.  I'd like to see whatever type of
Reference objects we agree on having a nice way of storing them
in (at least) XML format.


Any more thoughts,

    Thomas.

On Tue, May 30, 2000 at 05:29:14PM +0100, Matthew Pocock wrote:
> Dear all,
> 
> References to literature are things that need representing in EMBL,
> GENBANK, SwissProt entries (and almost certainly in other contexts). It
> would be nice if we could supply a Reference interface under
> org.biojava.utils - what should the interface contain?
> 
> interface Reference {
>   // a List of Author objects
>   List getAuthors();
> 
>   String getJournal();
>   int getVolume();
>   int getStartPage();
>   int getEndPage();
> }
> 
> interface Author {
>   char [] getInitials();
>   String getSurname();
> }
> 
> What is missing? What shouldn't be here? Is it needed at all?

-- 
There are whose study is of smells
And to attentive schools rehearse
How something mixed with something else
Makes something worse.