Commit 6346233c authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Describe the automaton logic in the class docstring.

parent ff79fc63
......@@ -37,6 +37,34 @@ class Automaton(object):
The parameters of the search as well as the parameters of the harvester
are defined by the current request.
The logic implements in the `Automaton` class is the following
1. Ask to the store, all the `record_id` satisfying the user request.
2. Reject `record_id` matching the `origin` field of a database entry.
3. Request to the store, the XML description of the publication
and decode it.
4. Check that the *oai* of the publication is defined and well formed.
Recover it if it is not the case. From time to time, the `id`
encoded in the `oai` field is different from the `record` id.
This happens when an old record is redirected to new one
for obscure reasons. The record is ignore if a database entry
is found with the bad OAI.
5. Reject temporarily publication.
6. Check that *authors* are defined.
Reject the publication if it is not the case.
7. Check that *my institute* is in the list of the institutes
signing the publication. Reject the publication if it is
not the case. When the affiliation are not defined,
try to recover this case, by finding the author of my institute
signing the publication. This recovery procedure uses
the *author rescue list*. Reject the record when the recovery
procedure failed.
8. Check that the *collaboration*, if defined, is well formed.
Reject the publication if it is not the case
10. Several check are applied depending on the publication type.
11. At the end of this process, the publisher, the authors are
formatted and the list of signatories of my institute extracted.
def __init__(self,
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment