isogeo_pysdk.models.metadata module

Isogeo API v1 - Model of Metadata (= Resource) entity

See: http://help.isogeo.com/api/complete/index.html#definition-resource

class isogeo_pysdk.models.metadata.Metadata(_abilities: list = None, _created: str = None, _creator: dict = None, _id: str = None, _modified: str = None, abstract: str = None, collectionContext: str = None, collectionMethod: str = None, conditions: list = None, contacts: list = None, coordinateSystem: dict = None, created: str = None, distance: float = None, editionProfile: str = None, encoding: str = None, envelope: dict = None, events: list = None, featureAttributes: list = None, features: int = None, format: str = None, formatVersion: str = None, geometry: str = None, keywords: list = None, language: str = None, layers: list = None, limitations: list = None, links: list = None, modified: str = None, name: str = None, operations: list = None, path: str = None, precision: str = None, published: str = None, scale: int = None, series: bool = None, serviceLayers: list = None, specifications: list = None, tags: list = None, title: str = None, topologicalConsistency: str = None, type: str = None, updateFrequency: str = None, validFrom: str = None, validTo: str = None, validityComment: str = None)[source]

Bases: object

Metadata are the main entities in Isogeo.

Example:
{
    "_abilities": [
        "string"
    ],
    "_created": "string (date-time)",
    "_creator": {
        "_abilities": [
        "string"
        ],
        "_created": "string (date-time)",
        "_id": "string (uuid)",
        "_modified": "string (date-time)",
        "areKeywordsRestricted": "boolean",
        "canCreateMetadata": "boolean",
        "code": "string",
        "contact": {
        "_created": "string (date-time)",
        "_id": "string (uuid)",
        "_modified": "string (date-time)",
        "addressLine1": "string",
        "addressLine2": "string",
        "addressLine3": "string",
        "available": "string",
        "city": "string",
        "count": "integer (int32)",
        "countryCode": "string",
        "email": "string",
        "fax": "string",
        "hash": "string",
        "name": "string",
        "organization": "string",
        "phone": "string",
        "type": "string",
        "zipCode": "string"
        },
        "keywordsCasing": "string",
        "metadataLanguage": "string",
        "themeColor": "string"
    },
    "_id": "string (uuid)",
    "_modified": "string (date-time)",
    "abstract": "string",
    "bbox": [
        "number (double)"
    ],
    "collectionContext": "string",
    "collectionMethod": "string",
    "conditions": [
        {
        "_id": "string (uuid)",
        "description": "string",
        "license": {
            "_id": "string (uuid)",
            "content": "string",
            "count": "integer (int32)",
            "link": "string",
            "name": "string"
        }
        }
    ],
    "contacts": [
        {
        "_id": "string (uuid)",
        "contact": {
            "_created": "string (date-time)",
            "_id": "string (uuid)",
            "_modified": "string (date-time)",
            "addressLine1": "string",
            "addressLine2": "string",
            "addressLine3": "string",
            "available": "string",
            "city": "string",
            "count": "integer (int32)",
            "countryCode": "string",
            "email": "string",
            "fax": "string",
            "hash": "string",
            "name": "string",
            "organization": "string",
            "phone": "string",
            "type": "string",
            "zipCode": "string"
        },
        "role": "string"
        }
    ],
    "context": "object",
    "coordinate-system": "object",
    "created": "string (date-time)",
    "distance": "number (double)",
    "editionProfile": "string",
    "encoding": "string",
    "envelope": "object",
    "features": "integer (int32)",
    "format": "string",
    "formatVersion": "string",
    "geometry": "string",
    "height": "integer (int32)",
    "keywords": [
        {}
    ]
}
ATTR_CREA = {'abstract': <class 'str'>, 'collectionContext': <class 'str'>, 'collectionMethod': <class 'str'>, 'distance': <class 'float'>, 'editionProfile': <class 'str'>, 'encoding': <class 'str'>, 'envelope': <class 'dict'>, 'features': <class 'int'>, 'format': <class 'str'>, 'formatVersion': <class 'str'>, 'geometry': <class 'str'>, 'language': <class 'str'>, 'name': <class 'str'>, 'path': <class 'str'>, 'precision': <class 'str'>, 'scale': <class 'int'>, 'series': <class 'bool'>, 'title': <class 'str'>, 'topologicalConsistency': <class 'str'>, 'type': <class 'str'>, 'updateFrequency': <class 'str'>, 'validFrom': <class 'str'>, 'validTo': <class 'str'>, 'validityComment': <class 'str'>}
ATTR_MAP = {'coordinateSystem': 'coordinate-system', 'featureAttributes': 'feature-attributes'}
ATTR_TYPES = {'_abilities': <class 'list'>, '_created': <class 'str'>, '_creator': <class 'dict'>, '_id': <class 'str'>, '_modified': <class 'str'>, 'abstract': <class 'str'>, 'collectionContext': <class 'str'>, 'collectionMethod': <class 'str'>, 'conditions': <class 'list'>, 'contacts': <class 'list'>, 'coordinateSystem': <class 'dict'>, 'created': <class 'str'>, 'distance': <class 'float'>, 'editionProfile': <class 'str'>, 'encoding': <class 'str'>, 'envelope': <class 'dict'>, 'events': <class 'list'>, 'featureAttributes': <class 'list'>, 'features': <class 'int'>, 'format': <class 'str'>, 'formatVersion': <class 'str'>, 'geometry': <class 'str'>, 'keywords': <class 'list'>, 'language': <class 'str'>, 'layers': <class 'list'>, 'limitations': <class 'list'>, 'links': <class 'list'>, 'modified': <class 'str'>, 'name': <class 'str'>, 'operations': <class 'list'>, 'path': <class 'str'>, 'precision': <class 'str'>, 'published': <class 'str'>, 'scale': <class 'int'>, 'series': <class 'bool'>, 'serviceLayers': <class 'list'>, 'specifications': <class 'list'>, 'tags': <class 'list'>, 'title': <class 'str'>, 'topologicalConsistency': <class 'str'>, 'type': <class 'str'>, 'updateFrequency': <class 'str'>, 'validFrom': <class 'str'>, 'validTo': <class 'str'>, 'validityComment': <class 'str'>}
abstract

Gets the abstract.

Returns:The abstract of this Metadata.
Return type:str
classmethod clean_attributes(raw_object: dict)[source]

Renames attributes which are incompatible with Python (hyphens…). See related issue: https://github.com/isogeo/isogeo-api-py-minsdk/issues/82

Parameters:raw_object (dict) – metadata dictionary returned by a request.json()
Returns:the metadata with correct attributes
Return type:Metadata
collectionContext

Gets the collectionContext of this Metadata.

Returns:The collectionContext of this Metadata.
Return type:str
collectionMethod

Gets the collection method of this Metadata.

Returns:The collection method of this Metadata.
Return type:str
conditions

Gets the conditions of this Metadata.

Returns:The conditions of this Metadata.
Return type:list
contacts

Gets the contacts of this Metadata.

Returns:The contacts of this Metadata.
Return type:list
coordinateSystem

Gets the coordinateSystem of this Metadata.

Returns:The coordinateSystem of this Metadata.
Return type:dict
created

Gets the creation date of the data described by the Metadata. It’s the equivalent of the created original attribute (renamed to avoid conflicts with the _created` one).

Date format is: %Y-%m-%dT%H:%M:%S+00:00.

Returns:The creation of this Metadata.
Return type:str
distance

Gets the distance of this Metadata.

Returns:The distance of this Metadata.
Return type:str
editionProfile

Gets the editionProfile of this Metadata.

Returns:The editionProfile of this Metadata.
Return type:str
encoding

Gets the encoding of this Metadata.

Returns:The encoding of this Metadata.
Return type:str
envelope

Gets the envelope of this Metadata.

Returns:The envelope of this Metadata.
Return type:str
events

Gets the events of this Metadata.

Returns:The events of this Metadata.
Return type:list
featureAttributes

Gets the featureAttributes of this Metadata.

Returns:The featureAttributes of this Metadata.
Return type:list
features

Gets the features of this Metadata.

Returns:The features of this Metadata.
Return type:int
format

Gets the format of this Metadata.

Returns:The format of this Metadata.
Return type:str
formatVersion

Gets the formatVersion of this Metadata.

Returns:The formatVersion of this Metadata.
Return type:str
geometry

Gets the geometry of this Metadata.

Returns:The geometry of this Metadata.
Return type:str
keywords

Gets the keywords of this Metadata.

Returns:The keywords of this Metadata.
Return type:str
language

Gets the language of this Metadata.

Returns:The language of this Metadata.
Return type:str
layers

Gets the layers of this Metadata.

Returns:The layers of this Metadata.
Return type:list
limitations

Gets the limitations of this Metadata.

Returns:The limitations of this Metadata.
Return type:str

Gets the links of this Metadata.

Returns:The links of this Metadata.
Return type:str
modified

Gets the last modification date of the data described by this Metadata.

It’s the equivalent of the created original attribute (renamed to avoid conflicts with the _created` one).

Returns:The modification of this Metadata.
Return type:str
name

Gets the name of this Metadata.

Returns:The name of this Metadata.
Return type:str
operations

Gets the operations of this Metadata.

Returns:The operations of this Metadata.
Return type:list
path

Gets the path of this Metadata.

Returns:The path of this Metadata.
Return type:str
precision

Gets the precision of this Metadata.

Returns:The precision of this Metadata.
Return type:str
published

Gets the published of this Metadata.

Returns:The published of this Metadata.
Return type:str
scale

Gets the scale of this Metadata.

Returns:The scale of this Metadata.
Return type:str
series

Gets the series of this Metadata.

Returns:The series of this Metadata.
Return type:str
serviceLayers

Gets the serviceLayers of this Metadata.

Returns:The serviceLayers of this Metadata.
Return type:list
specifications

Gets the specifications of this Metadata.

Returns:The specifications of this Metadata.
Return type:str
tags

Gets the tags of this Metadata.

Returns:The tags of this Metadata.
Return type:str
title

Gets the title of this Metadata.

Returns:The title of this Metadata.
Return type:str
title_or_name(slugged: bool = False) → str[source]

Gets the title of this Metadata or the name if there is no title. It can return a slugified value.

Parameters:slugged (bool) – slugify title. Defaults to False.
Returns:the title or the name of this Metadata.
Return type:str
to_dict() → dict[source]

Returns the model properties as a dict

to_dict_creation() → dict[source]

Returns the model properties as a dict structured for creation purpose (POST)

to_str() → str[source]

Returns the string representation of the model

topologicalConsistency

Gets the topologicalConsistency of this Metadata.

Returns:The topologicalConsistency of this Metadata.
Return type:str
type

Gets the type of this Metadata.

Returns:The type of this Metadata.
Return type:str
updateFrequency

Gets the updateFrequency of this Metadata.

Returns:The updateFrequency of this Metadata.
Return type:str
validFrom

Gets the validFrom of this Metadata.

Returns:The validFrom of this Metadata.
Return type:str
validTo

Gets the validTo of this Metadata.

Returns:The validTo of this Metadata.
Return type:str
validityComment

Gets the validityComment of this Metadata.

Returns:The validityComment of this Metadata.
Return type:str