oarepo_oaipmh_harvester.oai_record.models
oarepo_oaipmh_harvester.oai_record.models
Models for OAI-PMH harvested records.
OAIHarvestedRecord
Bases: Model
Metadata about a harvested record.
Always contains the latest metadata of the record, no previous versions are stored.
Source code in oarepo_oaipmh_harvester/oai_record/models.py
21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 | |
oai_identifier = db.Column(db.String(255), primary_key=True)
class-attribute
instance-attribute
OAI identifier of the record.
record_type = db.Column(db.String(32), nullable=True)
class-attribute
instance-attribute
Type of the record.
record_pid = db.Column(db.String(255), nullable=True)
class-attribute
instance-attribute
Persistent identifier (Record.pid) of the record (local identifier).
Note that this is not the database ID but the PID value.
datestamp = db.Column(db.UTCDateTime, nullable=False)
class-attribute
instance-attribute
Datestamp of the record.
harvested_at = db.Column(db.UTCDateTime, nullable=False)
class-attribute
instance-attribute
Time when the record was harvested.
deleted = db.Column(db.Boolean, default=False, nullable=False)
class-attribute
instance-attribute
True if the record was deleted during the harvest.
has_errors = db.Column(db.Boolean, default=False, nullable=False)
class-attribute
instance-attribute
True if the record has errors during the harvest.
has_warnings = db.Column(db.Boolean, default=False, nullable=False)
class-attribute
instance-attribute
True if the record has warnings during the harvest.
errors = db.Column(db.JSON().with_variant(postgresql.JSONB(none_as_null=True), 'postgresql').with_variant(JSONType(), 'sqlite').with_variant(JSONType(), 'mysql'), default=dict, nullable=False)
class-attribute
instance-attribute
Errors.
original_data = db.Column(db.JSON().with_variant(postgresql.JSONB(none_as_null=True), 'postgresql').with_variant(JSONType(), 'sqlite').with_variant(JSONType(), 'mysql'), default=dict, nullable=False)
class-attribute
instance-attribute
Original data.
transformed_data = db.Column(db.JSON().with_variant(postgresql.JSONB(none_as_null=True), 'postgresql').with_variant(JSONType(), 'sqlite').with_variant(JSONType(), 'mysql'), default=dict, nullable=False)
class-attribute
instance-attribute
Transformed data before they were stored into the target record.
harvester_id = db.Column(db.String(30), db.ForeignKey('oai_harvesters.id'), nullable=False)
class-attribute
instance-attribute
ID of the harvester that harvested this record.
job_run_id = db.Column(UUIDType(binary=False), nullable=True)
class-attribute
instance-attribute
Run ID of the harvest run (from invenio-jobs).
OAIRecordAggregateModel
Bases: AggregateMetadata
Aggregate data model for harvested OAI-PMH records.
Source code in oarepo_oaipmh_harvester/oai_record/models.py
model_obj: OAIHarvestedRecord
property
The actual model object behind this record aggregate.
version_id: int
property
Return the version ID of the record.
created: dt.datetime
property
Return the creation date of the record.
updated: dt.datetime
property
Return the last update date of the record.
id: str
property
Return the ID of the record.