-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
182 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,163 @@ | ||
#! /usr/bin/env python3 | ||
|
||
""" | ||
szabstractfactory_abstract.py is the abstract class for all implementations of szabstractfactory. | ||
""" | ||
|
||
|
||
from abc import ABC, abstractmethod | ||
|
||
from senzing_abstract import ( | ||
SzConfigAbstract, | ||
SzConfigManagerAbstract, | ||
SzDiagnosticAbstract, | ||
SzEngineAbstract, | ||
SzProductAbstract, | ||
) | ||
|
||
# Metadata | ||
|
||
__all__ = ["SzAbstractFactoryAbstract"] | ||
__version__ = "0.0.1" # See https://www.python.org/dev/peps/pep-0396/ | ||
__date__ = "2024-09-23" | ||
__updated__ = "2024-09-23" | ||
|
||
# ----------------------------------------------------------------------------- | ||
# SzAbstractFactoryAbstract | ||
# ----------------------------------------------------------------------------- | ||
|
||
|
||
class SzAbstractFactoryAbstract(ABC): | ||
""" | ||
SzAbstractFactoryAbstract is the definition of the Senzing Python API | ||
SzAbstractFactory implementations. | ||
""" | ||
|
||
# ------------------------------------------------------------------------- | ||
# Interface definition | ||
# ------------------------------------------------------------------------- | ||
|
||
@abstractmethod | ||
def create_sz_config(self) -> SzConfigAbstract: | ||
""" | ||
The `create_sz_config` method creates a new implementation of an `SzConfigAbstract` object. | ||
Args: | ||
Returns: | ||
SzConfigAbstract: A new implementation. | ||
Raises: | ||
.. collapse:: Example: | ||
.. literalinclude:: ../../examples/szabstractfactory/create_sz_config.py | ||
:linenos: | ||
:language: python | ||
**Output:** | ||
.. literalinclude:: ../../examples/szabstractfactory/create_sz_config.txt | ||
:linenos: | ||
:language: json | ||
""" | ||
|
||
@abstractmethod | ||
def create_sz_configmanager(self) -> SzConfigManagerAbstract: | ||
""" | ||
The `create_sz_configmanager` method creates a new implementation of an `SzConfigManagerAbstract` object. | ||
Args: | ||
Returns: | ||
SzConfigManagerAbstract: A new implementation. | ||
Raises: | ||
.. collapse:: Example: | ||
.. literalinclude:: ../../examples/szabstractfactory/create_sz_configmanager.py | ||
:linenos: | ||
:language: python | ||
**Output:** | ||
.. literalinclude:: ../../examples/szabstractfactory/create_sz_configmanger.txt | ||
:linenos: | ||
:language: json | ||
""" | ||
|
||
@abstractmethod | ||
def create_sz_diagnostic(self) -> SzDiagnosticAbstract: | ||
""" | ||
The `create_sz_diagnostic` method creates a new implementation of an `SzDiagnosticAbstract` object. | ||
Args: | ||
Returns: | ||
SzDiagnosticAbstract: A new implementation. | ||
Raises: | ||
.. collapse:: Example: | ||
.. literalinclude:: ../../examples/szabstractfactory/create_sz_diagnostic.py | ||
:linenos: | ||
:language: python | ||
**Output:** | ||
.. literalinclude:: ../../examples/szabstractfactory/create_sz_diagnostic.txt | ||
:linenos: | ||
:language: json | ||
""" | ||
|
||
@abstractmethod | ||
def create_sz_engine(self) -> SzEngineAbstract: | ||
""" | ||
The `create_sz_engine` method creates a new implementation of an `SzEngineAbstract` object. | ||
Args: | ||
Returns: | ||
SzEngineAbstract: A new implementation. | ||
Raises: | ||
.. collapse:: Example: | ||
.. literalinclude:: ../../examples/szabstractfactory/create_sz_engine.py | ||
:linenos: | ||
:language: python | ||
**Output:** | ||
.. literalinclude:: ../../examples/szabstractfactory/create_sz_engine.txt | ||
:linenos: | ||
:language: json | ||
""" | ||
|
||
@abstractmethod | ||
def create_sz_product(self) -> SzProductAbstract: | ||
""" | ||
The `create_sz_product` method creates a new implementation of an `SzProductAbstract` object. | ||
Args: | ||
Returns: | ||
SzProductAbstract: A new implementation. | ||
Raises: | ||
.. collapse:: Example: | ||
.. literalinclude:: ../../examples/szabstractfactory/create_sz_product.py | ||
:linenos: | ||
:language: python | ||
**Output:** | ||
.. literalinclude:: ../../examples/szabstractfactory/create_sz_product.txt | ||
:linenos: | ||
:language: json | ||
""" |