here.content.hmc2.base_attributes module#
Common definition and helper functions for HMC attributes.
- class here.content.hmc2.base_attributes.Attribute(segments: List[SegmentRef], forward: bool, backward: bool, attribute: DecodedMessage)[source]#
Bases:
objectAn attribute of a specific direction and sequence of segments where it applies
- attribute: DecodedMessage#
- backward: bool#
- forward: bool#
- indexer = ContentIndexer(partition=None, identifier=None, refs={'first_segment': <function Attribute.<lambda>>, 'segment': <function Attribute.<lambda>>})#
- segments: List[SegmentRef]#
- class here.content.hmc2.base_attributes.BaseAttributesBinding(content: Content, layer_id: str, adapter: Adapter | None = None, layer_type: LayerType | None = None)[source]#
Bases:
SingleLayerBinding,ABCBindings for HCM road attributes.
- classmethod parse_and_index(partition_id: str, msg: Message) ContentPartition[source]#
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
- class here.content.hmc2.base_attributes.BaseAttributesMultiLayerBinding(content: Content, layer_id: str, adapter: Adapter | None = None)[source]#
Bases:
BaseAttributesBinding,ABCBase Attributes Multilayer Binding Class
- abstract classmethod associated_layers() Dict[str, SingleLayerBinding][source]#
Return associating layers to the base layer defined in schema hrn.
- Returns:
dict of key as single layer and value as SingleLayerBinding Object.
- classmethod parse_and_index(partition_id: str, msg: Message) ContentPartition[source]#
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