public class Dao extends Object
Constructor and Description |
---|
Dao() |
Modifier and Type | Method and Description |
---|---|
void |
close()
Close the conection of the mongoclient to the mongodb
|
Object |
listData(String collection,
javax.ws.rs.core.UriInfo ui,
String accept)
Lists dataset or model - URI list or JSON
|
String |
saveData(String collection,
org.bson.Document document)
Saves JSON to mongodb
|
@Produces(value={"text/uri-list","application/json"}) public Object listData(String collection, javax.ws.rs.core.UriInfo ui, String accept)
collection
- dataset or modelui
- URI info objectaccept
- requested mime-typepublic String saveData(String collection, org.bson.Document document)
collection
- to save to (e.g.: model or dataset)document
- GSON of a dataset, model ...public void close()
Copyright © 2018. All rights reserved.