EPrints Technical Mailing List Archive

Message: #04164


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: Antwort: Re: reordering documents


Hi Martin

	This value is also assigned to volatile documents (e.g. thumbnails).  At a guess I would say that when the system regenerates thumbnails, this integer just keeps on going up.  It looks like that function will only be running on the non-volatile documents (which will assign the numbers 1 to n to them).

--
Adam Field
Business Relationship Manager and Community Lead
EPrints Services
+44 (0)23 8059 8814





On 23 Apr 2015, at 14:51, martin.braendle@id.uzh.ch wrote:

> Dear Adam,
> 
> after your note, I was curious and did a little digging in our database, too, and found documents that have placement values up to 790. How did that come? I assume that if you have 10 documents, placement values should be 1-10.
> 
> Is there possibly a mistake in sub _reorder() in perl_lib/EPrints/Plugin/InputForm/Component/Documents.pm?
> 
> Best regards,
> 
> Martin
> 
> --
> Dr. Martin Brändle
> Zentrale Informatik
> Universität Zürich
> Winterthurerstr. 190
> CH-8057 Zürich
> 
> 
> <graycol.gif>"Field A.N." ---23/04/2015 14:53:03---I did a little digging.  Have a look at the get_all_documents function: https://github.com/eprints/e
> 
> Von:	"Field A.N." <af05v@ecs.soton.ac.uk>
> An:	eprints-tech@ecs.soton.ac.uk
> Datum:	23/04/2015 14:53
> Betreff:	[EP-tech] Re: reordering documents
> Gesendet von:	eprints-tech-bounces@ecs.soton.ac.uk
> 
> 
> 
> 
> I did a little digging.  Have a look at the get_all_documents function:
> 
> https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/DataObj/EPrint.pm#L1197
> 
> It orders documents based on a 'placement' metadata field.  Your code should set this on all the documents, commit them all, then regenerate the abstract page of the eprint.
> 
> --
> Adam Field
> Business Relationship Manager and Community Lead
> EPrints Services
> +44 (0)23 8059 8814
> 
> 
> 
> 
> 
> On 23 Apr 2015, at 13:15, Timothy Miles-Board wrote:
> 
> > 
> > Ordering/reordering of documents is possible in the later 3.3 versions.
> > 
> > Tim
> > 
> > Timothy Miles-Board
> > Web & Repositories Development Specialist, University of London Computer Centre
> > 020 7863 1342  |  07742 970 351  | timothy.miles-board@london.ac.uk | @drtjmb
> > The University of London is an exempt charity in England and Wales
> > 
> > ________________________________________
> > From: eprints-tech-bounces@ecs.soton.ac.uk <eprints-tech-bounces@ecs.soton.ac.uk> on behalf of Lizz Jennings <E.Jennings@bath.ac.uk>
> > Sent: 23 April 2015 12:17 PM
> > To: eprints-tech@ecs.soton.ac.uk
> > Subject: [EP-tech] Re: reordering documents
> > 
> > Just to add a voice to this that document ordering is quite important with datasets too, which will often have multiple files, which may have a logical order.
> > 
> > Lizz
> > 
> > --
> > Lizz Jennings BA MSc ACLIP MCLIP (Revalidated 2014)
> > Technical Data Officer
> > The Library 4.10, University of Bath, Bath, BA2 7AY UK
> > Ext. 3570 (External 01225 383570)
> > E.Jennings@bath.ac.uk
> > Research Data Management: http://www.bath.ac.uk/research/data
> > 
> > 
> > -----Original Message-----
> > From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of CARRICK Ray
> > Sent: 23 April 2015 12:03
> > To: eprints-tech@ecs.soton.ac.uk
> > Subject: [EP-tech] Re: reordering documents
> > 
> > Hi Adam,
> > 
> > We do use the document order unfortunately.
> > 
> > If we are importing an article that has, say, an XML files with the metadata in it, a PDF with the published article and a bunch of images then we  put the main PDF as the first document, the metadata as the last and the all the rest anywhere else.
> > 
> > We used to only ever have one PDF with an article so we just put that first. Recently, we have started getting data where we have more than one PDF: a main one and a number of secondary ones - we can identify which is which easily enough and our importer now handles things correctly. But we have data already in Eprints which has the documents in the "wrong" order and so we want to reorder them.
> > 
> > All else failing we can probably delete and re-import them but I was trying to find a way to do the re-ordering in place.
> > 
> > Hope that all makes sense.
> > 
> > Cheers,
> > 
> > Ray.
> > 
> > 
> > ________________________________________
> > From: eprints-tech-bounces@ecs.soton.ac.uk <eprints-tech-bounces@ecs.soton.ac.uk> on behalf of Field A.N. <af05v@ecs.soton.ac.uk>
> > Sent: 23 April 2015 10:06
> > To: eprints-tech@ecs.soton.ac.uk
> > Subject: [EP-tech] Re: reordering documents
> > 
> > Hi Ray
> > 
> >        I don't believe there's any implied semantics with document ordering (though I may be wrong).  What are you aiming to accomplish by reordering them?
> > 
> > --
> > Adam Field
> > Business Relationship Manager and Community Lead EPrints Services
> > +44 (0)23 8059 8814
> > 
> > 
> > 
> > 
> > 
> > On 20 Apr 2015, at 17:03, CARRICK Ray wrote:
> > 
> >> Hi Folks,
> >> 
> >> I'm trying to reorder documents associated with an eprint but not having any success. This is using Eprints 3.2.
> >> 
> >> So far I have tried:
> >> 
> >> doing a search to identify the eprints I want (that bit works fine)
> >> then for each of them I want to swap the order of the first two documents.
> >> 
> >> I tried
> >> 
> >> my @documents = $eprint->get_all_documents; my $tmp = $documents[0];
> >> $documents[0] = $documents[1]; $documents[1] = $tmp;
> >> 
> >> $eprint->set_value('documents', \@documents); $eprint->commit;
> >> 
> >> that doesn't seem to do anything. I also tried the above but also changing the 'pos'
> >> values associated with the documents.
> >> 
> >> Any ideas how to do this? I could delete the relevant eprints and re-import them but I'd quite like to do the chnage implace if possible.
> >> 
> >> Thanks,
> >> 
> >> Ray.
> >> 
> >> The University of Edinburgh is a charitable body, registered in
> >> Scotland, with registration number SC005336.
> >> *** Options:
> >> http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> >> *** Archive: http://www.eprints.org/tech.php/
> >> *** EPrints community wiki: http://wiki.eprints.org/
> >> *** EPrints developers Forum: http://forum.eprints.org/
> > 
> > 
> > *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> > *** Archive: http://www.eprints.org/tech.php/
> > *** EPrints community wiki: http://wiki.eprints.org/
> > *** EPrints developers Forum: http://forum.eprints.org/
> > 
> > --
> > The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.
> > 
> > 
> > *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> > *** Archive: http://www.eprints.org/tech.php/
> > *** EPrints community wiki: http://wiki.eprints.org/
> > *** EPrints developers Forum: http://forum.eprints.org/
> > 
> > *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> > *** Archive: http://www.eprints.org/tech.php/
> > *** EPrints community wiki: http://wiki.eprints.org/
> > *** EPrints developers Forum: http://forum.eprints.org/
> > 
> > *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> > *** Archive: http://www.eprints.org/tech.php/
> > *** EPrints community wiki: http://wiki.eprints.org/
> > *** EPrints developers Forum: http://forum.eprints.org/
> 
> 
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: http://www.eprints.org/tech.php/
> *** EPrints community wiki: http://wiki.eprints.org/
> *** EPrints developers Forum: http://forum.eprints.org/
> 
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: http://www.eprints.org/tech.php/
> *** EPrints community wiki: http://wiki.eprints.org/
> *** EPrints developers Forum: http://forum.eprints.org/