GeoEco.Datasets.QueryableAttribute

class GeoEco.Datasets.QueryableAttribute(name, displayName, dataType, derivedLazyDatasetProps=None, derivedFromAttr=None, derivedValueMap=None, derivedValueFunc=None)

Bases: object

Describes an attribute of a CollectibleObject that can be used to query it from a DatasetCollection.

Parameters:
  • name (str) – Case-insensitive formal name of this this queryable attribute. Minimum length꞉ 1. Must match regular expression꞉ [a-zA-Z][a-zA-Z0-9_]+.

  • displayName (str) – Informal name of this queryable attribute to be displayed in user interfaces, log messages, and similar places. Minimum length꞉ 1.

  • dataType (TypeMetadata) – TypeMetadata instance defining the data type of this queryable attribute.

  • derivedLazyDatasetProps (dict mapping object to dict mapping str to object, optional) – Dictionary mapping values of this queryable attribute to names and values of lazy properties to assign.

  • derivedFromAttr (str, optional) – Name of another queryable attribute that this one is derived from. Minimum length꞉ 1. Must match regular expression꞉ [a-zA-Z][a-zA-Z0-9_]+.

  • derivedValueMap (dict mapping object to object, optional) – Dictionary mapping values of the attribute that this one is derived from to values to use for this attribute.

  • derivedValueFunc (object, optional) – Function (may be a lambda) or method that should be called to derive the value of this attribute from the one it is derived from.

Returns:

QueryableAttribute instance.

Return type:

QueryableAttribute

Properties

property DataType

(TypeMetadata) TypeMetadata instance defining the data type of this queryable attribute. Read only.

property DerivedFromAttr

(str or None) Name of another queryable attribute that this one is derived from. Read only. Minimum length꞉ 1. Must match regular expression꞉ [a-zA-Z][a-zA-Z0-9_]+.

property DerivedLazyDatasetProps

(dict mapping object to dict mapping str to object or None) Dictionary mapping values of this queryable attribute to names and values of lazy properties to assign. Read only.

property DerivedValueFunc

(object or None) Function (may be a lambda) or method that should be called to derive the value of this attribute from the one it is derived from. Read only.

property DerivedValueMap

(dict mapping object to object or None) Dictionary mapping values of the attribute that this one is derived from to values to use for this attribute. Read only.

property DisplayName

(str) Informal name of this queryable attribute to be displayed in user interfaces, log messages, and similar places. Read only. Minimum length꞉ 1.

property Name

(str) Case-insensitive formal name of this this queryable attribute. Read only. Minimum length꞉ 1. Must match regular expression꞉ [a-zA-Z][a-zA-Z0-9_]+.

Methods