The National Disaster Monitoring and Analysis System (NDMAS) is a platform designed to monitor, report, and analyze flood and natural disaster occurrences. It provides timely alerts and detailed insights to government agencies, emergency responders, and communities at risk, enhancing preparedness, response, and recovery efforts.
- Java
- PostgreSQL
- Hibernate (ORM for database interaction)
- Remote Method Invocation (RMI) for remote services
.
├── src
│ ├── main
│ │ ├── java
│ │ │ ├── com
│ │ │ │ ├── ndma
│ │ │ │ │ ├── model
│ │ │ │ │ ├── dao
│ │ │ │ │ ├── utils
│ │ │ │ │ └── service
│ │ │ │ │ └── implementation
│ │ └── |
│ │ └── hibernate.cfg.xml
└── README.md
- JDK 8 or later
- PostgreSQL database
- Install PostgreSQL.
- Create a database named
ndma_db
. - Create a user named
boubou
with passwordbouboune#123
. - Grant all privileges on the
ndma_db
database to theboubou
user.
Configure the database connection in the HibernateUtil
class located at src/main/java/com/ndma/utils/HibernateUtil.java
:
Properties settings = new Properties();
settings.put(Environment.DRIVER, "org.postgresql.Driver");
settings.put(Environment.URL, "jdbc:postgresql://localhost:5432/ndma_db");
settings.put(Environment.USER, "username");
settings.put(Environment.PASS, "password");
settings.put(Environment.DIALECT, "org.hibernate.dialect.PostgreSQLDialect");
settings.put(Environment.SHOW_SQL, "true");
settings.put(Environment.CURRENT_SESSION_CONTEXT_CLASS, "thread");
settings.put(Environment.HBM2DDL_AUTO, "update");
- Compile the Java source files using your preferred IDE or
javac
. - Ensure your PostgreSQL server is running.
- Run the main class or set up a web server if applicable.
Entity classes representing the database tables.
DisasterEvent
Report
Role
Responder
DataSource
UserProfile
Classes for CRUD operations on entities.
DisasterEventDao
ReportDao
RoleDao
ResponderDao
DataSourceDao
UserDao
Remote service interfaces for RMI.
DisasterEventService
ReportService
RoleService
ResponderService
DataSourceService
UserProfileService
Implementation of service interfaces.
DisasterEventServiceImpl
ReportServiceImpl
RoleServiceImpl
ResponderServiceImpl
DataSourceServiceImpl
UserProfileServiceImpl
Utility classes for Hibernate configuration.
HibernateUtil
- Fork the repository.
- Create a new feature branch (
git checkout -b feature/new-feature
). - Commit your changes (
git commit -m 'Add new feature'
). - Push to the branch (
git push origin feature/new-feature
). - Open a pull request.
This project is licensed under the MIT License - see the LICENSE file for details.