pystac.validation.schema_uri_map#
- class pystac.validation.schema_uri_map.DefaultSchemaUriMap[source]#
Implementation of SchemaUriMap that uses schemas hosted by stacspec.org
For STAC Versions 0.9.0 or earlier this will use the schemas hosted on the radiantearth/stac-spec GitHub repo.
- BASE_URIS: list[tuple[pystac.serialization.identify.STACVersionRange, Callable[[str], str]]] = [(<VERSIONS 1.0.0-beta.2-1.0.0>, <function DefaultSchemaUriMap.<lambda>>), (<VERSIONS 0.8.0-1.0.0-beta.1>, <function DefaultSchemaUriMap.<lambda>>)]#
- DEFAULT_SCHEMA_MAP: dict[str, Any] = {STACObjectType.CATALOG: ('catalog-spec/json-schema/catalog.json', None), STACObjectType.COLLECTION: ('collection-spec/json-schema/collection.json', None), STACObjectType.ITEM: ('item-spec/json-schema/item.json', None)}#
- get_object_schema_uri(object_type: STACObjectType, stac_version: str) str | None [source]#
Get the schema URI for the given object type and stac version.
- Parameters:
object_type – STAC object type. One of
STACObjectType
stac_version – The STAC version of the schema to return.
- Returns:
The URI of the schema, or None if not found.
- Return type:
- class pystac.validation.schema_uri_map.OldExtensionSchemaUriMap[source]#
Ties old extension IDs to schemas hosted by https://schemas.stacspec.org.
For STAC Versions 0.9.0 or earlier this will use the schemas hosted on the radiantearth/stac-spec GitHub repo.
- classmethod get_base_uris() list[tuple[pystac.serialization.identify.STACVersionRange, Callable[[pystac.serialization.identify.STACVersionID], str]]] [source]#
- class pystac.validation.schema_uri_map.SchemaUriMap[source]#
Abstract class defining schema URIs for STAC core objects and extensions.
- abstract get_object_schema_uri(object_type: STACObjectType, stac_version: str) str | None [source]#
Get the schema URI for the given object type and stac version.
- Parameters:
object_type – STAC object type. One of
STACObjectType
stac_version – The STAC version of the schema to return.
- Returns:
The URI of the schema, or None if not found.
- Return type: