Commit 061b00d6 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Polish the documentation.

parent fa256098
......@@ -33,8 +33,7 @@ class Automaton(object):
"""Base class to search and process publications:
* Decode the selector defining user criteria.
* Search for publications in the store, according to
user criteria
* Search in the store publications matching user criteria.
* Decode the XML string return by the store.
* Insert new records in the database.
......@@ -44,15 +43,16 @@ class Automaton(object):
The logic implements in the ``Automaton`` class is the following:
#. Ask to the store, all the `record_id` satisfying the user request.
#. Reject `record_id` matching the `origin` field of database entry.
#. Request to the store, the XML description of the publication
and decode it.
#. Reject `record_id` contains in the *origin* field of a
database entry.
#. Request to the store, the XML description of the publications
and decode them.
#. Reject the record for which the *secondary_oai_url* is contained in
the *origin* field of a database entry. Update the *origin* field
of the database record.
#. 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.
Recover it, if it is not the case. At this stage the OAI is always
defined.
#. Reject temporarily publication.
#. Check that *authors* are defined.
Reject the publication if it is not the case.
......
......@@ -826,6 +826,13 @@ class CheckAndFix(object):
or ``inspirehep.net``
"""
# Note:
# For the record cds 1951625, possible values are:
# oai:cds.cern.ch:1951625 (if it does not exist in inspirehep)
# oai:cds.cern.ch:1951625, oai:inspirehep.net:1319638 (if it exist
# in both store)
# In all the case the first OAI corresponds to the record.id()
#
oai = record.oai()
if oai is not None and REG_OAI.match(oai):
return
......
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