public class EuropeanaIdMongoServerImpl extends Object implements MongoServer, EuropeanaIdMongoServer
| Modifier and Type | Field and Description |
|---|---|
protected String |
databaseName |
protected org.mongodb.morphia.Datastore |
datastore |
protected com.mongodb.MongoClient |
mongoClient |
| Constructor and Description |
|---|
EuropeanaIdMongoServerImpl(com.mongodb.MongoClient mongoClient,
String databaseName)
Constructor of the EuropeanaIDMongoServer
Any required login credentials should be in the provided MongoClient
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the connection to the server
|
void |
createDatastore() |
void |
deleteEuropeanaId(String oldId,
String newId)
Delete a specific EuropeanaID record
|
void |
deleteEuropeanaIdFromNew(String newId)
Delete all the records based on the newID
|
void |
deleteEuropeanaIdFromOld(String oldId)
Delete all the records based on the oldID
|
EuropeanaId |
find() |
EuropeanaId |
findOne(String oldId) |
org.mongodb.morphia.Datastore |
getDatastore()
Get the datastore
|
boolean |
newIdExists(String oldId)
Check if the record has newID based on the oldID
|
boolean |
oldIdExists(String newId)
Check if the record has oldIDs based on the newID
|
List<EuropeanaId> |
retrieveEuropeanaIdFromNew(String newId)
Find the EuropeanaId records based on the newId
|
EuropeanaId |
retrieveEuropeanaIdFromOld(List<String> oldIds)
Find the EuropeanaId records based on the oldIds
|
EuropeanaId |
retrieveEuropeanaIdFromOld(String oldId)
Find the EuropeanaId records based on the oldId
|
void |
saveEuropeanaId(EuropeanaId europeanaId)
Save the europeanaId a update any references to it
|
void |
setDatastore(org.mongodb.morphia.Datastore datastore) |
void |
setLastAccessed(String oldId)
Set the last accessed field on the record
|
void |
updateTime(String newId,
String oldId) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waittoStringprotected com.mongodb.MongoClient mongoClient
protected String databaseName
protected org.mongodb.morphia.Datastore datastore
public EuropeanaIdMongoServerImpl(com.mongodb.MongoClient mongoClient,
String databaseName)
mongoClient - the server to connect todatabaseName - the database to connect topublic void createDatastore()
createDatastore in interface EuropeanaIdMongoServerEuropeanaIdMongoServer.createDatastore()public org.mongodb.morphia.Datastore getDatastore()
getDatastore in interface MongoServerpublic void close()
close in interface MongoServerpublic EuropeanaId retrieveEuropeanaIdFromOld(String oldId)
EuropeanaIdMongoServerretrieveEuropeanaIdFromOld in interface EuropeanaIdMongoServeroldId - The id to search forEuropeanaIdMongoServer.retrieveEuropeanaIdFromOld(java.lang.String)public EuropeanaId retrieveEuropeanaIdFromOld(List<String> oldIds)
EuropeanaIdMongoServerretrieveEuropeanaIdFromOld in interface EuropeanaIdMongoServeroldIds - The ids to search forpublic List<EuropeanaId> retrieveEuropeanaIdFromNew(String newId)
EuropeanaIdMongoServerretrieveEuropeanaIdFromNew in interface EuropeanaIdMongoServernewId - The id to search forEuropeanaIdMongoServer.retrieveEuropeanaIdFromNew(java.lang.String)public boolean oldIdExists(String newId)
EuropeanaIdMongoServeroldIdExists in interface EuropeanaIdMongoServernewId - the newIDEuropeanaIdMongoServer.oldIdExists(java.lang.String)public boolean newIdExists(String oldId)
EuropeanaIdMongoServernewIdExists in interface EuropeanaIdMongoServeroldId - the oldIDEuropeanaIdMongoServer.newIdExists(java.lang.String)public void setLastAccessed(String oldId)
EuropeanaIdMongoServersetLastAccessed in interface EuropeanaIdMongoServeroldId - The oldIdEuropeanaIdMongoServer.setLastAccessed(java.lang.String)public void saveEuropeanaId(EuropeanaId europeanaId)
EuropeanaIdMongoServersaveEuropeanaId in interface EuropeanaIdMongoServereuropeanaId - The europeanaId to saveEuropeanaIdMongoServer.saveEuropeanaId(eu.europeana.corelib.tools.lookuptable.EuropeanaId)public void deleteEuropeanaId(String oldId, String newId)
EuropeanaIdMongoServerdeleteEuropeanaId in interface EuropeanaIdMongoServeroldId - The oldId to search fornewId - The newId to search forEuropeanaIdMongoServer.deleteEuropeanaId(java.lang.String, java.lang.String)public void deleteEuropeanaIdFromOld(String oldId)
EuropeanaIdMongoServerdeleteEuropeanaIdFromOld in interface EuropeanaIdMongoServeroldId - The id to search forEuropeanaIdMongoServer.deleteEuropeanaIdFromOld(java.lang.String)public void deleteEuropeanaIdFromNew(String newId)
EuropeanaIdMongoServerdeleteEuropeanaIdFromNew in interface EuropeanaIdMongoServernewId - The id to search forEuropeanaIdMongoServer.deleteEuropeanaIdFromNew(java.lang.String)public void updateTime(String newId, String oldId)
updateTime in interface EuropeanaIdMongoServerEuropeanaIdMongoServer.updateTime(java.lang.String, java.lang.String)public void setDatastore(org.mongodb.morphia.Datastore datastore)
setDatastore in interface EuropeanaIdMongoServerEuropeanaIdMongoServer.setDatastore(org.mongodb.morphia.Datastore)public EuropeanaId find()
find in interface EuropeanaIdMongoServerEuropeanaIdMongoServer.find()public EuropeanaId findOne(String oldId)
findOne in interface EuropeanaIdMongoServerEuropeanaIdMongoServer.findOne(java.lang.String)Copyright © 2017 Europeana Foundation. All rights reserved.