EPrints Technical Mailing List Archive
Message: #04954
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Data object validation; $for_archive
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Data object validation; $for_archive
- From: John Salter <J.Salter@leeds.ac.uk>
- Date: Tue, 20 Oct 2015 16:37:49 +0000
Hi, I'm trying to work out how the '$for_archive' flag works when validating EPrints (I suspect it doesn’t, but am hoping to be proved wrong. I want to use this feature). Starting here: https://github.com/eprints/eprints/blob/3.3/perl_lib/EPrints/DataObj.pm#L2046-L2047 The 'validate' method on a dataobject can take a '$for_archive' flag. This *should* be set as true when the item is about to be moved into the live archive. It is referenced in many places - passed method-to-method, but as far as I can tell, this value is not set anywhere (and therefore is never true). https://github.com/eprints/eprints/search?q=for_archive Can anyone help me trace it through the EPrints code, and confirm that it is or isn't used (especially at the point where an EPrint is made live)? The comments https://github.com/eprints/eprints/blob/3.3/lib/defaultcfg/cfg.d/eprint_validate.pl#L13-L14 refer to 'comments at the start of the validation section'. I think these were carried over from Eprints2 days when all the validation routines were in one place: http://www.eprints.org/files/eprints2/eprints-2.2/defaultcfg/ArchiveValidateConfig.pm # $for_archive is a boolean flag (1 or 0) it is set to 0 when the # item is being validated as a submission and to 1 when the item is # being validated for submission to the actual archive. This allows # a stricter validation for editors than for submitters. A useful # example would be that a deposit may have one of several format of # documents but the editor must ensure that it has a PDF before it # can be submitted into the main archive. If it doesn't have a PDF # file, then the editor will have to generate one. Also in Eprints2, this is where the 'for_archive' gets set: http://www.eprints.org/files/eprints2/eprints-2.2/perl_lib/EPrints/SubmissionForm.pm, Line 129 Cheers, John
- Follow-Ups:
- [EP-tech] Re: Data object validation; $for_archive
- From: "Field A.N." <af05v@ecs.soton.ac.uk>
- [EP-tech] Re: Data object validation; $for_archive
- Prev by Date: [EP-tech] Re: error when epadmin reindex
- Next by Date: [EP-tech] Re: error when epadmin reindex
- Previous by thread: [EP-tech] error when epadmin reindex
- Next by thread: [EP-tech] Re: Data object validation; $for_archive
- Index(es):