Hi Gary:

Here's a little more explanation/history of the sequence ID.
First, it is assigned sequentially and IDs are not reused if a bitstream
is deleted. There is no magic ordering, and it was *not* intended for
organizing a set of bitstreams into a meaningful sequence (e.g. PDF
chapters of a book). Its sole purpose is to provide a *durable* unique
ID for a bitstream - think of it as a 'sub-handle' ID - modulo an item
(sorry for the Latin again, it just kind of crept in). DSpace originally
used the bitstream database key, but while unique, this wasn't durable
in the sense that if you moved to a different database, or compressed,
etc, the key might change. Whereas the sequence ID is a bona fide
(damn!) piece of metadata, albeit a fairly opaque one. Remember that the
filename need not be unique (you can have 2 bitstreams with the same
name), so we do need something in this role. We actually kicked around
various proposals (e.g. MD5 checksums, date stamps, etc), but the
sequence ID won primarily because it resulted in shorter, easier-to-type
URLS.

Hope this sheds some light,

Richard R


On Tue, 2007-05-08 at 10:01 +1000, Gary Browne wrote:
> Thanks Claudia
> 
> Though I'm only inferring what a "numerus corens" is - I'm not really up with 
> my Latin.
> 
> Cheers
> Gary
> 
> 
> Gary Browne
> Development Programmer
> Library IT Services
> University of Sydney
> Australia
> ph: 61-2-9351 5946 
> 
> -----Original Message-----
> From: Claudia Jürgen [mailto:[EMAIL PROTECTED] 
> Sent: Thursday, 3 May 2007 5:12 PM
> To: Gary Browne
> Cc: [email protected]
> Subject: Re: [Dspace-tech] Sequence ID generation
> 
> Hi Gary,
> 
> the sequence number is generated in:
> org.dspace.conten.Item
> update()
> 
>          // Set sequence IDs for bitstreams in item
>          int sequence = 0;
>          Bundle[] bunds = getBundles();
> 
>          // find the highest current sequence number
>          for (int i = 0; i < bunds.length; i++)
>          {
>              Bitstream[] streams = bunds[i].getBitstreams();
> 
>              for (int k = 0; k < streams.length; k++)
>              {
>                  if (streams[k].getSequenceID() > sequence)
>                  {
>                      sequence = streams[k].getSequenceID();
>                  }
>              }
>          }
> 
>          // start sequencing bitstreams without sequence IDs
>          sequence++;
> 
>          for (int i = 0; i < bunds.length; i++)
>          {
>              Bitstream[] streams = bunds[i].getBitstreams();
> 
>              for (int k = 0; k < streams.length; k++)
>              {
>                  if (streams[k].getSequenceID() < 0)
>                  {
>                      streams[k].setSequenceID(sequence);
>                      sequence++;
>                      streams[k].update();
>                  }
>              }
>          }
> 
> it's just a numerus corens.
> 
> sunny greetings
> 
> Claudia Jürgen
> University Dortmund
> 
> 
> Gary Browne schrieb:
> > Hi everyone - I submitted this question previously but had no
> > replies...thought I'd try my luck again with a cunningly disguised
> > turned about subject line.
> > 
> >  
> > 
> >  
> > 
> > Regarding the sequence ID, the number between the handle and the
> > filename in a DSpace bitstream URL:
> > 
> >  
> > 
> > dspace url/bitstream/handle/sequence ID/filename
> > 
> >  
> > 
> > can anyone tell me how the sequence ID number is generated by DSpace?
> > Does it simply correspond to the sequence of bitstreams as outlined in
> > the contents file?
> > 
> >  
> > 
> > Thanks
> > 
> > Gary
> > 
> >  
> > 
> > Gary Browne
> > Development Programmer
> > Library IT Services
> > University of Sydney
> > Australia
> > ph: 61-2-9351 5946 
> > 
> >  
> > 
> > 
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > -------------------------------------------------------------------------
> > This SF.net email is sponsored by DB2 Express
> > Download DB2 Express C - the FREE version of DB2 express and take
> > control of your XML. No limits. Just data. Click to get it now.
> > http://sourceforge.net/powerbar/db2/
> > 
> > 
> > ------------------------------------------------------------------------
> > 
> > _______________________________________________
> > DSpace-tech mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/dspace-tech
> 
> -------------------------------------------------------------------------
> This SF.net email is sponsored by DB2 Express
> Download DB2 Express C - the FREE version of DB2 express and take
> control of your XML. No limits. Just data. Click to get it now.
> http://sourceforge.net/powerbar/db2/
> _______________________________________________
> DSpace-tech mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/dspace-tech


-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
DSpace-tech mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/dspace-tech

Reply via email to