module documentation

ZMSZCatalogAdapter.py - Catalog adapter implementation for indexing ZMS content.

This module collects normalized metadata and extracted text for ZMS objects, prepares index payloads, and exposes adapter logic used by catalog connectors for search, faceting, and retrieval.

License: GNU General Public License v2 or later, Organization: ZMS Publishing

Class ZMSZCatalogAdapter Provide helpers for ZMSZCatalogAdapter.
Function get_default_data Extract and prepare default catalog metadata for a ZMS node.
Function get_file Try to parse ZMSFile.file to standard_html.
Function get_zoned_dt Return zoned dt.
def get_default_data(node): (source)

Extract and prepare default catalog metadata for a ZMS node.

This function collects comprehensive metadata about a ZMS object for indexing in the catalog system. It gathers identification data (uid, id, meta_id), structural information (path hierarchy, sort order), temporal data (creation, modification, and activity timestamps), linguistic context (language), and navigation details (URLs). The collected data is used by catalog connectors for search indexing, sorting, filtering, and result retrieval.

Args: node: A ZMS object instance containing metadata and content attributes.

Returns: dict: A dictionary containing normalized catalog fields including:

  • uid: Unique identifier
  • id: Object ID
  • home_id: Root container ID
  • meta_id: Meta object type
  • loc: Absolute URL path
  • path: Physical path
  • index_html: URL to index.html in context
  • lang: Current language context
  • created_dt, change_dt: Creation and modification timestamps (UTC)
  • start_dt, end_dt: Activation time window
  • indexing_dt: Current indexing timestamp
  • sortid: 15-character tree sort identifier (up to 5 levels, 3 digits each)
def get_file(node, d, fileparsing=True): (source)

Try to parse ZMSFile.file to standard_html.

def get_zoned_dt(struct_dt): (source)

Return zoned dt.