here.content.hmc2.segment_admin_boundary module
here.content.hmc2.segment_admin_boundary module
Bindings for the association of segment with administrative boundary
class here.content.hmc2.segment_admin_boundary.SegmentAdminBoundary(content: Content, layer_id: str, adapter: Adapter | None = None)
Bases: BaseAttributesMultiLayerBinding
class to associate segment with administrative boundary
classmethod associate_segment_location(admin_context_attr: Iterable[object], partition_id: str) List[SegmentAdminBoundaryAttributes]
Associate environmental_zone_condition with environment_zone.
Parameters:
-
admin_context_attr – a dict of segment to administrative context.
-
partition_id – partition id of the base layer.
Returns:
list of SegmentAdminBoundaryAttributes object.
classmethod associated_layers() Dict[str, SingleLayerBinding]
Provide associated dependent/independent layers to the base layer.
Returns:
dict of key as single layer and value as SingleLayerBinding Object.
classmethod object_types() Mapping[str, type]
Returns:
the types of attributes supported by this binding
classmethod parse_and_index(partition_id: str, msg: Message) ContentPartition
Parse and index decoded message.
Parameters:
-
partition_id – identifier of the partition
-
msg – decoded content from the layer, in the form of a Protobuf message
Returns:
the content of a partition parsed and indexed in its own data structure
classmethod schema_hrn() List[str]
Returns:
the HRN of schema this binding can parse and index
class here.content.hmc2.segment_admin_boundary.SegmentAdminBoundaryAttributes(partition_id: Partition, segments: List[SegmentRef], forward: bool, backward: bool, place_ref: Ref, place_name: List[DecodedMessage], admin_category: str, location: Location)
Bases: object
Segment to Admin Boundary
admin_category: str
backward: bool
forward: bool
indexer = ContentIndexer(partition='partition_id', identifier=None, refs={'segment':</span> <span class="pre"><function</span> <span class="pre">SegmentAdminBoundaryAttributes.<lambda>>,</span> <span class="pre">'place':</span> <span class="pre">'place_ref'})
location: Location
partition_id: Partition
place_name: List[DecodedMessage]
place_ref: Ref
segments: List[SegmentRef]