Skip to main content

OntologyClass

What it is

  • A thin subclass of naas_abi.ontologies.modules.NexusPlatformOntology.OntologyClass.
  • Provides an actions() hook intended to be implemented with custom logic.

Public API

  • class OntologyClass(_OntologyClass)
    • Inherits all behavior from the base OntologyClass in NexusPlatformOntology.
    • actions(self)
      • Placeholder method for action logic.
      • Currently does nothing (pass).

Configuration/Dependencies

  • Depends on: naas_abi.ontologies.modules.NexusPlatformOntology.OntologyClass (imported as _OntologyClass).

Usage

from naas_abi.ontologies.classes.ontology_naas_ai.nexus.OntologyClass import OntologyClass

class MyOntologyClass(OntologyClass):
def actions(self):
# implement your logic here
return "ok"

obj = MyOntologyClass()
print(obj.actions())

Caveats

  • actions() is not implemented in this class and will return None unless overridden.