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
ScientificExtensionon anCollectionthat 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 anCollectionto extend it.- collection: pystac.Collection#
The
Collectionbeing extended.
- links: list[pystac.Link]#
The list of
Linkobjects associated with theCollectionbeing extended, including links added by this extension.
- properties: dict[str, Any]#
The
Collectionproperties, including extension properties.
- class pystac.extensions.scientific.ItemScientificExtension(item: Item)[source]#
A concrete implementation of
ScientificExtensionon anItemthat 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 anItemto extend it.- item: pystac.Item#
The
Itembeing extended.
- links: list[pystac.Link]#
The list of
Linkobjects associated with theItembeing extended, including links added by this extension.
- class pystac.extensions.scientific.Publication(doi: str | None, citation: str | None)[source]#
Helper for Publication entries.
- citation: str | None#
- doi: str | None#
- static from_dict(d: dict[str, str]) Publication[source]#
- get_link() Link | None[source]#
Gets a
Linkfor the DOI for this publication. IfPublication.doiisNone, this method will also returnNone.
- class pystac.extensions.scientific.ScientificExtension(obj: STACObject)[source]#
An abstract class that can be used to extend the properties of an
Itemor apystac.Collectionwith 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
ItemorCollection.- Raises:
pystac.ExtensionTypeError – If an invalid object type is passed.
- name: Literal['sci'] = 'sci'#
- 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
Publicationfrom the extendedItem. If thepublicationargument 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'}#
- schema_uri: str = 'https://stac-extensions.github.io/scientific/v1.0.0/schema.json'#
- stac_object_types = {'Collection', 'Feature'}#
- class pystac.extensions.scientific.ScientificRelType(*values)[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:doifield.
- class pystac.extensions.scientific.SummariesScientificExtension(collection: Collection)[source]#
A concrete implementation of
SummariesExtensionthat extends thesummariesfield of aCollectionto include properties defined in the Scientific Citation Extension.- property citation: list[str] | None#
Get or sets the summary of
ScientificExtension.citationvalues for this Collection.
- property doi: list[str] | None#
Get or sets the summary of
ScientificExtension.citationvalues for this Collection.
- class pystac.extensions.scientific.T#
Generalized version of
CollectionorItemalias of TypeVar(‘T’, ~pystac.collection.Collection, ~pystac.item.Item)