arxiv.canonical.domain.version module¶
Provides the core domain concept and logic for individual versions.
-
class
arxiv.canonical.domain.version.
Event
(identifier, event_date, event_type, version, categories=None, description='', is_legacy=False, event_agent=None)[source]¶ Bases:
arxiv.canonical.domain.version._EventBase
An announcement-related event.
-
property
event_id
¶ The unique identifier for this event.
- Return type
-
property
summary
¶ A summary of this event.
- Return type
-
version
= None¶ The current state of the version (i.e. after the event).
-
property
-
class
arxiv.canonical.domain.version.
EventIdentifier
(value)[source]¶ Bases:
str
Unique identifier for an
Event
.-
event_date
= None¶ Timestamp of the event.
-
classmethod
from_parts
(identifier, event_date, shard)[source]¶ Generate a event identifier from its parts.
- Return type
-
shard
= None¶ Shard ID for the event.
-
-
class
arxiv.canonical.domain.version.
EventSummary
(identifier, event_date, event_type, event_id, categories=None, description='', is_legacy=False, event_agent=None)[source]¶ Bases:
arxiv.canonical.domain.version._EventBase
A lightweight description of an event.
This has all of the data of the original
Event
except for the state of the e-print version.-
event_id
= None¶ Unique identifier for the event.
-
-
class
arxiv.canonical.domain.version.
EventType
[source]¶ Bases:
enum.Enum
Supported event types.
-
CROSSLIST
= 'cross'¶
-
JREF
= 'jref'¶
-
MIGRATE
= 'migrate'¶
-
MIGRATE_METADATA
= 'migrate_metadata'¶
-
NEW
= 'new'¶
-
REPLACED
= 'replace'¶
-
UPDATED
= 'update'¶
-
UPDATED_METADATA
= 'update_metadata'¶
-
WITHDRAWN
= 'withdraw'¶
-
-
class
arxiv.canonical.domain.version.
Metadata
(primary_classification, secondary_classification, title, abstract, authors, license, comments=None, journal_ref=None, report_num=None, doi=None, msc_class=None, acm_class=None)[source]¶ Bases:
arxiv.canonical.domain.base.CanonicalBase
Submitter-provided descriptive metadata for a version.
-
class
arxiv.canonical.domain.version.
Version
(identifier, announced_date, announced_date_first, submitted_date, updated_date, metadata, source, events=None, previous_versions=None, submitter=None, proxy=None, is_announced=False, is_withdrawn=False, is_legacy=False, reason_for_withdrawal=None, source_type=None, render=None, formats={})[source]¶ Bases:
arxiv.canonical.domain.base.CanonicalBase
Represents a single version of an arXiv e-print in the record.
-
announced_date
= None¶ Day on which this version was announced.
-
announced_date_first
= None¶ Day on which the first version of the e-print was announced.
-
events
= None¶ Events that are specific to this version of the e-print.
-
formats
= None¶ Dissemination formats for this version.
-
get_format
(desired_format)[source]¶ Get a particular dissemination format for this version.
- Return type
-
identifier
= None¶ Unique arXiv identifier for the version.
-
is_announced
= None¶ Indicate whether or not the version is announced.
-
is_legacy
= None¶ Indicate whether this record was populated from the legacy system.
-
is_withdrawn
= None¶ Indicate whether or not the version is withdrawn.
-
metadata
= None¶ Submitter-provided descriptive metadata for the version.
-
property
number_of_events
¶ Numer of events described by this object (0).
- Return type
Literal
[0]
-
property
number_of_versions
¶ Number of versions described by this object (1).
- Return type
Literal
[1]
-
previous_versions
= None¶ References to previous versions of the e-print.
-
proxy
= None¶ The proxy that deposited the version on behalf of the submitter.
-
reason_for_withdrawal
= None¶ The reason for the withdrawal of the e-print.
-
render
= None¶ Human-readable representation of the e-print.
Usually a PDF generated from the source, but may also be a user-provided PDF.
-
source
= None¶ The original user-submitted source package.
-
source_type
= None¶ Internal code for the source type.
-
submitted_date
= None¶ Timestamp when this version was submitted to arXiv.
-
submitter
= None¶ Person responsible for submitting this version.
-
updated_date
= None¶ The last time the record for this version was changed.
-
-
class
arxiv.canonical.domain.version.
VersionReference
(identifier, announced_date, submitted_date)[source]¶ Bases:
arxiv.canonical.domain.base.CanonicalBase
An abridged reference to a particular
Version
.-
announced_date
= None¶ Date on which the version was announced.
-
identifier
= None¶ Identifier of the version.
-
submitted_date
= None¶ Date on which the version was submitted.
-