pystac.extensions.scientific#
Implements the Scientific Citation Extension.
For a description of Digital Object Identifiers (DOIs), see the DOI Handbook:
- class pystac.extensions.scientific.CollectionScientificExtension(collection: Collection)[source]#
A concrete implementation of
ScientificExtension
on anCollection
that extends the properties of the Item to include properties defined in the Scientific Citation Extension.This class should generally not be instantiated directly. Instead, call
ScientificExtension.ext()
on anCollection
to extend it.- collection: pystac.Collection#
The
Collection
being extended.
- links: List[pystac.Link]#
The list of
Link
objects associated with theCollection
being extended, including links added by this extension.
- properties: Dict[str, Any]#
The
Collection
properties, including extension properties.
- class pystac.extensions.scientific.ItemScientificExtension(item: Item)[source]#
A concrete implementation of
ScientificExtension
on anItem
that extends the properties of the Item to include properties defined in the Scientific Citation Extension.This class should generally not be instantiated directly. Instead, call
ScientificExtension.ext()
on anItem
to extend it.- item: pystac.Item#
The
Item
being extended.
- links: List[pystac.Link]#
The list of
Link
objects associated with theItem
being extended, including links added by this extension.
- class pystac.extensions.scientific.Publication(doi: str | None, citation: str | None)[source]#
Helper for Publication entries.
- class pystac.extensions.scientific.ScientificExtension(obj: STACObject)[source]#
An abstract class that can be used to extend the properties of an
Item
or apystac.Collection
with properties from the Scientific Citation Extension. This class is generic over the type of STAC Object to be extended (e.g.Item
,Collection
).To create a concrete instance of
ScientificExtension
, use theScientificExtension.ext()
method. For example:>>> item: pystac.Item = ... >>> sci_ext = ScientificExtension.ext(item)
- apply(doi: str | None = None, citation: str | None = None, publications: List[Publication] | None = None) None [source]#
Applies scientific extension properties to the extended
Item
.- Parameters:
doi – Optional DOI string for the item. Must not be a DOI link.
citation – Optional human-readable reference.
publications – Optional list of relevant publications referencing and describing the data.
- property citation: str | None#
Get or sets the recommended human-readable reference (citation) to be used by publications citing the data.
No specific citation style is suggested, but the citation should contain all information required to find the publication distinctively.
- property doi: str | None#
Get or sets the DOI for the item.
This MUST NOT be a DOIs link. For all DOI names respective DOI links SHOULD be added to the links section.
- classmethod ext(obj: T, add_if_missing: bool = False) ScientificExtension[T] [source]#
Extends the given STAC Object with properties from the Scientific Extension.
This extension can be applied to instances of
Item
orCollection
.- Raises:
pystac.ExtensionTypeError – If an invalid object type is passed.
- obj: pystac.STACObject#
- property publications: List[Publication] | None#
Get or sets the list of relevant publications referencing and describing the data.
- remove_publication(publication: Publication | None = None) None [source]#
Removes the given
Publication
from the extendedItem
. If thepublication
argument isNone
, all publications will be removed from theItem
.
- classmethod summaries(obj: Collection, add_if_missing: bool = False) SummariesScientificExtension [source]#
Returns the extended summaries object for the given collection.
- class pystac.extensions.scientific.ScientificExtensionHooks[source]#
- prev_extension_ids = {'scientific'}#
- stac_object_types = {STACObjectType.COLLECTION, STACObjectType.ITEM}#
- class pystac.extensions.scientific.ScientificRelType(value)[source]#
A list of rel types defined in the Scientific Citation Extension.
See the Scientific Citation Extension Relation types documentation for details.
- CITE_AS = 'cite-as'#
Used to indicate a link to the publication referenced by the
sci:doi
field.
- class pystac.extensions.scientific.SummariesScientificExtension(collection: Collection)[source]#
A concrete implementation of
SummariesExtension
that extends thesummaries
field of aCollection
to include properties defined in the Scientific Citation Extension.- property citation: List[str] | None#
Get or sets the summary of
ScientificExtension.citation
values for this Collection.
- property doi: List[str] | None#
Get or sets the summary of
ScientificExtension.citation
values for this Collection.
- summaries: Summaries#
The summaries for the
Collection
being extended.