README.md 1.34 KB
Newer Older
1
# MongoDB OSDU core library
ethiraj krishnamanaidu's avatar
ethiraj krishnamanaidu committed
2

3
4
5
6
7
8
9
10
11
12
13
14
15
16
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
* [...TBD...]

# How to import into service

- Import this artifact to your application's `pom.xml`:
```
<dependency>
    <groupId>org.opengroup.osdu.core.mongodb</groupId>
    <artifactId>os-core-lib-mongodb</artifactId>
17
    <version>0.1.1</version>
18
19
20
21
</dependency>
```
- Add following to your `application.properties` file:
```
22
23
osdu.mongodb.enabled.storage=true  # to enable storage helpers
osdu.mongodb.enabled.legal=true    # to enable legal helpers
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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`.

#### [...TBD...]