-
Notifications
You must be signed in to change notification settings - Fork 1
Description
📦 uk.ac.cam.cares.jps.base.listener within baselib listener is not used in any active projects in TWA.
Also, it is not dependency of any other components within the baselib.
As a result, this package will be removed from baselib
📦 uk.ac.cam.cares.jps.base.listener
Active Repository Dependencies
No active repositories found.
Inactive Repository Dependencies
- JPS_POWSYS
Action plan
The following Java files will be directly removed
- src/main/java/uk/ac/cam/cares/jps/base/listener/BaseOntologyModelManager.java
- src/main/java/uk/ac/cam/cares/jps/base/listener/BaseBatteryOntologyModelManager.java
- src/main/java/uk/ac/cam/cares/jps/base/listener/BaseChimneyOntologyModelManager.java
- src/test/java/uk/ac/cam/cares/jps/base/listener/BaseOntologyModelManagerTest.java
- src/test/java/uk/ac/cam/cares/jps/base/listener/BaseChimneyOntologyModelManagerTest.java
TheWorldAvatar JPS Base Listener Package – Class Summaries
BaseOntologyModelManager
Role: Acts as the core manager for ontology models in the JPS base library. This class is responsible for preparing and maintaining a shared in-memory ontology model (a Jena OntModel) that contains fundamental knowledge (TBox definitions) used by JPS agents. It provides utility methods to create an ontology model from input (e.g. loading OWL content) and to save or update ontology data to persistent storage. The class also keeps caches (e.g. maps of important ontology resources) for quick access to frequently used concepts. As a servlet context listener, it ensures that resources are properly released by closing the ontology model when the application (agent) is shut down, preventing memory leaks and ensuring a clean teardown of the knowledge model.
BaseChimneyOntologyModelManager
Role: A specialized listener that initializes the base ontology model for the “chimney” domain on application startup. Extending BaseOntologyModelManager, this class focuses on loading and configuring ontology content related to industrial chimneys or stacks. When the web application/agent starts, BaseChimneyOntologyModelManager loads a predefined chimney ontology into the shared ontology model. It then populates reference maps with key classes, properties, and individuals from both the chimney ontology and relevant upper ontologies (such as OntoCAPE) so that agents can easily access common concepts (e.g. properties like hasValue, units of measure, etc.). This setup makes sure that any agent dealing with emissions or chimney-related calculations has the necessary ontological context available in-memory from the start. On shutdown, it relies on the base class functionality to close the model, ensuring the chimney ontology data is cleaned up from memory.
BaseBatteryOntologyModelManager
Role: A placeholder/extensible listener for initializing a base ontology model for the “battery” domain. This class is designed to mirror the pattern of BaseChimneyOntologyModelManager but for battery-related knowledge. It inherits from BaseOntologyModelManager and is intended to load core battery ontology definitions into the shared model when an application (agent) starts. In the current implementation, the class provides the structural hook (via the servlet context listener interface) but does not yet contain a full startup routine (it includes a TODO for implementation). Once completed, its function will be to ensure that any agent concerned with battery systems has a pre-loaded ontology of battery concepts and relationships available at startup. Like other listeners in this package, it would utilize the base class’s capabilities to manage the model and would clean up resources on application shutdown.