here.platform.schema.ParserFactory module#
HERE Platform Parser Factory module.
- class here.platform.schema.ParserFactory.ParserFactory[source]#
Bases:
objectFactory that is exposed to accept request for content Parser initialization.
- static get_parser(schema_pkg_file: str | Path | BytesIO, content_type: str | None) Parser[source]#
Initialize an appropriate Parser instance based on the layer content_type.
- Parameters:
schema_pkg_file – the schema package zip-file as a str, Path or file-like object
content_type – The MIME type of the blobs stored in the layer
- Raises:
SchemaException – if the required meta information is missing in schema package
- Returns:
an instance of a Parser