Class: QgsSensorThingsExpansionDefinition¶
Encapsulates information about how relationships in a SensorThings API service should be expanded.
Added in version 3.38.
Methods
Returns the expansion as a valid SensorThings API query string, eg "$expand=Observations($orderby=phenomenonTime desc;$top=10)". |
|
Returns the target child entity which should be expanded. |
|
Returns the the string filter to filter expanded child entities by. |
|
Returns |
|
Returns the limit on the number of child features to fetch. |
|
Returns the field name to order the expanded child entities by. |
|
Sets the target child entity which should be expanded. |
|
Returns the the string filter to filter expanded child entities by. |
|
Sets the limit on the number of child features to fetch. |
|
Sets the field name to order the expanded child entities by. |
|
Sets the sort order for the expanded child entities. |
|
Returns the sort order for the expanded child entities. |
|
Returns a string encapsulation of the expansion definition. |
Static Methods
Returns an expansion definition for the specified entity type, populated with reasonable defaults which make sense for that entity type. |
|
Returns a |
- class qgis.core.QgsSensorThingsExpansionDefinition[source]¶
Bases:
object
- __init__(childEntity: Qgis.SensorThingsEntity = Qgis.SensorThingsEntity.Invalid, orderBy: str | None = '', sortOrder: Qt.SortOrder = Qt.SortOrder.AscendingOrder, limit: int = QgsSensorThingsUtils.DEFAULT_EXPANSION_LIMIT, filter: str | None = '')
Constructor for QgsSensorThingsExpansionDefinition, targeting the specified child entity type.
- Parameters:
childEntity (Qgis.SensorThingsEntity = Qgis.SensorThingsEntity.Invalid)
orderBy (Optional[str] = '')
sortOrder (Qt.SortOrder = Qt.SortOrder.AscendingOrder)
limit (int = QgsSensorThingsUtils.DEFAULT_EXPANSION_LIMIT)
filter (Optional[str] = '')
- __init__(a0: QgsSensorThingsExpansionDefinition)
- Parameters:
- asQueryString(self, parentEntityType: Qgis.SensorThingsEntity, additionalOptions: Iterable[str | None] = []) str [source]¶
Returns the expansion as a valid SensorThings API query string, eg “$expand=Observations($orderby=phenomenonTime desc;$top=10)”.
The parent entity type for the expansion must be specified.
Optionally a list of additional query options can be specified for the expansion.
- Parameters:
parentEntityType (Qgis.SensorThingsEntity)
additionalOptions (Iterable[Optional[str]] = [])
- Return type:
str
- childEntity(self) Qgis.SensorThingsEntity [source]¶
Returns the target child entity which should be expanded.
See also
- Return type:
- static defaultDefinitionForEntity(entity: Qgis.SensorThingsEntity) QgsSensorThingsExpansionDefinition [source]¶
Returns an expansion definition for the specified
entity
type, populated with reasonable defaults which make sense for that entity type.- Parameters:
entity (Qgis.SensorThingsEntity)
- Return type:
- filter(self) str [source]¶
Returns the the string filter to filter expanded child entities by.
See also
- Return type:
str
- static fromString(string: str | None) QgsSensorThingsExpansionDefinition [source]¶
Returns a
QgsSensorThingsExpansionDefinition
from a string representation.See also
- Parameters:
string (Optional[str])
- Return type:
- limit(self) int [source]¶
Returns the limit on the number of child features to fetch.
Returns -1 if no limit is defined.
See also
- Return type:
int
- orderBy(self) str [source]¶
Returns the field name to order the expanded child entities by.
See also
See also
- Return type:
str
- setChildEntity(self, entity: Qgis.SensorThingsEntity)[source]¶
Sets the target child
entity
which should be expanded.See also
- Parameters:
entity (Qgis.SensorThingsEntity)
- setFilter(self, filter: str | None)[source]¶
Returns the the string
filter
to filter expanded child entities by.See also
- Parameters:
filter (Optional[str])
- setLimit(self, limit: int)[source]¶
Sets the
limit
on the number of child features to fetch.Set to -1 if no limit is desired.
See also
- Parameters:
limit (int)
- setOrderBy(self, field: str | None)[source]¶
Sets the
field
name to order the expanded child entities by.See also
See also
- Parameters:
field (Optional[str])
- setSortOrder(self, order: Qt.SortOrder)[source]¶
Sets the sort order for the expanded child entities.
See also
See also
- Parameters:
order (Qt.SortOrder)
- sortOrder(self) Qt.SortOrder [source]¶
Returns the sort order for the expanded child entities.
See also
See also
- Return type:
Qt.SortOrder