Re: Database intergration with GNOME? (fwd)



Tom Tromey:
> Steve> Cool but what about gnomeAddress being a subclass of
> Steve> gnomeRecord?  Other subclasses might include gnomeCompactDisc,
> Steve> gnomeDocument (subclass of which is gnomeEMail).
> 
> I recommend doing things like this only to the extent that they
> actually provide us with something.  That is, there's no point in
> making a complex hierarchy unless you actually want to manipulate the
> base objects in an opaque way.  Does that make sense?
> 
 
 Well ... What about bibliography? I tried to write down hierarchy of
the bibliografy entries in BibTeX files. I did not go even through the
half of it and it looks quite complex(in OO pseudo-language): 

/* virtual base entry */
virtual entry bibentry
{
 required:
  field alias;

 optional:
  field key;
  field author;
  field title;
  field year;
  field month;
  field note;
  field annotation;
};

/* "misc" entry */
entry misc:bibentry
{
 optional:
  field howpublished; 
};

/* parent of all articles and book entries */
virtual entry authored:bibentry
{
 required:
  field author;
  field title;

 optional:
  field volume;
  field number;
  field pages;
};
 
/* "article" entry */
entry in_jornal:authored
{
 required:
  field journal;
  field year;
};

/* virtual parent of "inproceedings" and "incollection" entries */
virtual entry nonperiodic:authored
{
 required:
  field booktitle;

 optional:
  field crossref;
  field publisher;
  field address;
  field editor;
  field series;
};

/* entry "inproceedings" */
entry in_proceedings:nonperiodic
{
 optional:
  field organization;
};

/* entry "incollection" */
entry in_collection:nonperiodic
{
 optional:
  field chapter;
  field type;
  field edition;
};

/* "book" entry */
entry book:authored
{
 required:
  field publisher;
  field year;

 optional: 
  field editor;
  field series;
  field address;
  field edition;
};



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]