# MongoDB OSDU core library
A MongoDB implementation of basic functionality for OSDU applications. The library itself creates the necessary collections and indexes. So just need to import helpers and provide database connection properties.
List of services supported:
* Storage
* Legal
* [In progress] Entitlements
* [...TBD...]
# How to import into service
- Import required application artifact to your application's `pom.xml`:
```
org.opengroup.osdu.core.mongodb
storage
0.1.8
org.opengroup.osdu.core.mongodb
legal
0.1.8
org.opengroup.osdu.core.mongodb
entitlements
0.1.8
```
- Add following to your `application.properties` file:
```
osdu.mongodb.database=[your_database_name]
osdu.mongodb.uri=[connection url to MongoDB Atlas cluster or any MongoDB instance/replica (no matter on-premice or cloud)]
```
# Support for current services:
### Storage application
For the following repositories we have the following helper beans:
- `SchemaHelper` for the `ISchemaRepository`
- `RecordHelper` for the `IRecordsMetadataRepository`
- `QueryHelper` for the `IQueryRepository`
All the beans for now have all the necessary methods to implement the corresponding repositories.
### Legal application
There is `LegalHelper` for `ILegalTagRepository`.
### Entitlements application
For all the SPI's in 'org.opengroup.osdu.entitlements.v2.spi' there is a corresponding helper implementation.
To configure the module you must include `osdu.mongodb.domain` into your `application.properties` config.
#### [...TBD...]