public class VocabularyMongoServerImpl extends Object implements VocabularyMongoServer
| Constructor and Description |
|---|
VocabularyMongoServerImpl(com.mongodb.MongoClient mongoClient,
String databaseName)
Create a new datastore to do get/delete/save operations on the database
Any required login credentials should be in the provided MongoClient
|
VocabularyMongoServerImpl(String host,
int port,
String databaseName,
String username,
String password)
Create a new datastore to do get/delete/save operations on the database
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
ControlledVocabularyImpl |
getControlledVocabulary(String field,
String filter)
Retrieve the mappings for a specific resource.
|
ControlledVocabularyImpl |
getControlledVocabularyByName(String name)
Retrieve a ControlledVocabulary by name
|
ControlledVocabularyImpl |
getControlledVocabularyByUri(String uri,
String name)
Retrieve the mappings for a specific resource by URI
|
org.mongodb.morphia.Datastore |
getDatastore() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoStringpublic VocabularyMongoServerImpl(com.mongodb.MongoClient mongoClient,
String databaseName)
mongoClient - databaseName - public org.mongodb.morphia.Datastore getDatastore()
getDatastore in interface MongoServerMongoServer.getDatastore()public void close()
close in interface MongoServerMongoServer.close()public ControlledVocabularyImpl getControlledVocabulary(String field, String filter)
VocabularyMongoServergetControlledVocabulary in interface VocabularyMongoServerfield - - the field of the controlled vocabulary to search for (the
uri of the vocabulary is currently only supported)filter - - the value to match the fieldVocabularyMongoServer.getControlledVocabulary(java.lang.String, java.lang.String)public ControlledVocabularyImpl getControlledVocabularyByUri(String uri, String name)
VocabularyMongoServergetControlledVocabularyByUri in interface VocabularyMongoServeruri - The uri to search onname - The name to compare with if the URI exists more than onceVocabularyMongoServer.getControlledVocabularyByUri(java.lang.String, java.lang.String)public ControlledVocabularyImpl getControlledVocabularyByName(String name)
VocabularyMongoServergetControlledVocabularyByName in interface VocabularyMongoServername - The name to search onVocabularyMongoServer.getControlledVocabularyByName(java.lang.String)Copyright © 2017 Europeana Foundation. All rights reserved.