Logo Lanfrica

yvesHakizimana/Rwanda-GeoData-Library

Domaine:

geospatial

Type de record:

software
Créateur:
yve
Hôte:
A Java library for managing Rwanda's administrative structure, including provinces, districts, sectors, cells, and villages. Designed for developers working with hierarchical geo-data. # Rwanda GeoData Library The **Rwanda GeoData Library** is a powerful tool for managing Rwanda's geographical structure. It provides an efficient way to retrieve and validate provinces, districts, sectors, cells, and villages, making it easier for developers to build solutions without the need for a separate database for geographical data. --- ## Features - **Validation**: Use annotations to validate geographical names directly in your application. - **Data Retrieval**: Access Rwanda's complete geo-structure programmatically. - **Seamless Integration**: Easily integrate with backend and frontend systems. - **Performance-Oriented**: Eliminate redundant database queries, ensuring optimized performance. --- ## Installation Add the library to your Maven project using the following dependency: ```xml io.github.yveshakizimana rwanda-geodata-utils 1.0.0 ``` --- ## Usage ### 1. **Validation Using Annotations** This library provides annotation-based validation to ensure that geographic data conforms to Rwanda's structure. #### Example: Validating a User Profile ```java package com.example.services; import rwandageodata.constraints.*; public record UserProfile( RwandaLocation rwandaLocation, @ValidRwandaProvince(message = "Invalid Rwandan province.") String provinceName, @ValidRwandaDistrict(message = "Invalid Rwandan district.") String districtName, @ValidRwandaSector(message = "Invalid Rwandan sector.") String sectorName, @ValidRwandaCell(message = "Invalid Rwandan cell.") String cellName, @ValidRwandaVillage(message = "Invalid Rwandan village.") String villageName ) {} ``` ### 2. **Validation of an Entire Location** You can validate a complete location object by using the `@ValidRwandaLocation` annotation. ```java package com.example.services; import rwandageodata.constraints.ValidRwandaLocation; @ValidRwandaLocation public record RwandaLocation( String provinceName, String districtName, String sectorName, String cellName, String villageName ) { …

Languages

Licenses