Skip to main content
`Ctrl`+`K`

# pystac.extensions.scientific

Implements the Scientific Citation Extension.

For a description of Digital Object Identifiers (DOIs), see the DOI Handbook:

https://doi.org/10.1000/182

class pystac.extensions.scientific.CollectionScientificExtension(collection: Collection)

  A concrete implementation of `ScientificExtension` on an `Collection` 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 an `Collection` to extend it.

  collection: pystac.Collection

    The `Collection` being extended.

  links: list[pystac.Link]

    The list of `Link` objects associated with the `Collection` 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)

  A concrete implementation of `ScientificExtension` on an `Item` 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 an `Item` to extend it.

  item: pystac.Item

    The `Item` being extended.

  links: list[pystac.Link]

    The list of `Link` objects associated with the `Item` being extended, including links added by this extension.

  properties: dict[str, Any]

    The `Item` properties, including extension properties.

class pystac.extensions.scientific.Publication(doi: str | None, citation: str | None)

  Helper for Publication entries.

  citation: str | None
  doi: str | None
  static from_dict(d: dict[str, str]) → Publication
  get_link() → Link | None

    Gets a `Link` for the DOI for this publication. If `Publication.doi` is `None`, this method will also return `None`.

  to_dict() → dict[str, str | None]

class pystac.extensions.scientific.ScientificExtension(obj: STACObject)

  An abstract class that can be used to extend the properties of an `Item` or a `pystac.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 the `ScientificExtension.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

    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]

    Extends the given STAC Object with properties from the Scientific Extension.

    This extension can be applied to instances of `Item` or `Collection`.

    Raises:

      pystac.ExtensionTypeError – If an invalid object type is passed.

  classmethod get_schema_uri() → str

    Gets the schema URI associated with this extension.

  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

    Removes the given `Publication` from the extended `Item`. If the `publication` argument is `None`, all publications will be removed from the `Item`.

  classmethod summaries(obj: Collection, add_if_missing: bool = False) → SummariesScientificExtension

    Returns the extended summaries object for the given collection.

class pystac.extensions.scientific.ScientificExtensionHooks
  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)

  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)

  A concrete implementation of `SummariesExtension` that extends the `summaries` field of a `Collection` 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.

class pystac.extensions.scientific.T

  Generalized version of `Collection` or `Item`

  alias of TypeVar(‘T’, ~pystac.collection.Collection, ~pystac.item.Item)

pystac.extensions.scientific.doi_to_url(doi: str) → str

  Converts a DOI to the corresponding URL.

pystac.extensions.scientific.remove_link(links: list[Link], doi: str | None) → None