system_assignation/catalogs/catalog.py

33 lines
901 B
Python

"""
Catalog base class
SPDX - License - Identifier: LGPL - 3.0 - or -later
Copyright © 2022 Project Author Guille Gutierrez guillermo.gutierrezmorote@concordia.ca
"""
class Catalog:
"""
Catalogs base class not implemented instance of the Catalog base class, catalogs will inherit from this class.
"""
@property
def names(self, category=None):
"""
Base property to return the catalog entries names
:return: Catalog names filter by category if provided
"""
raise NotImplementedError
def entries(self, category=None):
"""
Base property to return the catalog entries
:return: Catalog content filter by category if provided
"""
raise NotImplementedError
def get_entry(self, name):
"""
Base property to return the catalog entry matching the given name
:return: Catalog entry with the matching name
"""
raise NotImplementedError