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

3
4
5
6
7
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
8
* [In progress] Entitlements
9
10
11
12
* [...TBD...]

# How to import into service

13
- Import required application artifact to your application's `pom.xml`:
14
15
16
```
<dependency>
    <groupId>org.opengroup.osdu.core.mongodb</groupId>
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    <artifactId>storage</artifactId>
    <version>0.1.8</version>
</dependency>
<!-- or -->
<dependency>
    <groupId>org.opengroup.osdu.core.mongodb</groupId>
    <artifactId>legal</artifactId>
    <version>0.1.8</version>
</dependency>
<!-- or -->
<dependency>
    <groupId>org.opengroup.osdu.core.mongodb</groupId>
    <artifactId>entitlements</artifactId>
    <version>0.1.8</version>
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
</dependency>
```
- 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`.

54
55
56
57
58
### 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.

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