public class EuropeanaIdMongoServerImpl extends Object implements MongoServer, EuropeanaIdMongoServer
| Modifier and Type | Field and Description |
|---|---|
protected String |
databaseName |
protected com.google.code.morphia.Datastore |
datastore |
protected com.mongodb.Mongo |
mongoServer |
protected String |
password |
protected String |
username |
| Constructor and Description |
|---|
EuropeanaIdMongoServerImpl(com.mongodb.Mongo mongoServer,
String databaseName,
String username,
String password)
Constructor of the EuropeanaIDMongoServer
|
| 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) |
com.google.code.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(com.google.code.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.Mongo mongoServer
protected String databaseName
protected com.google.code.morphia.Datastore datastore
protected String username
protected String password
public void createDatastore()
createDatastore in interface EuropeanaIdMongoServerpublic com.google.code.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 forpublic 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 forpublic boolean oldIdExists(String newId)
EuropeanaIdMongoServeroldIdExists in interface EuropeanaIdMongoServernewId - the newIDpublic boolean newIdExists(String oldId)
EuropeanaIdMongoServernewIdExists in interface EuropeanaIdMongoServeroldId - the oldIDpublic void setLastAccessed(String oldId)
EuropeanaIdMongoServersetLastAccessed in interface EuropeanaIdMongoServeroldId - The oldIdpublic void saveEuropeanaId(EuropeanaId europeanaId)
EuropeanaIdMongoServersaveEuropeanaId in interface EuropeanaIdMongoServereuropeanaId - The europeanaId to savepublic void deleteEuropeanaId(String oldId, String newId)
EuropeanaIdMongoServerdeleteEuropeanaId in interface EuropeanaIdMongoServeroldId - The oldId to search fornewId - The newId to search forpublic void deleteEuropeanaIdFromOld(String oldId)
EuropeanaIdMongoServerdeleteEuropeanaIdFromOld in interface EuropeanaIdMongoServeroldId - The id to search forpublic void deleteEuropeanaIdFromNew(String newId)
EuropeanaIdMongoServerdeleteEuropeanaIdFromNew in interface EuropeanaIdMongoServernewId - The id to search forpublic void updateTime(String newId, String oldId)
updateTime in interface EuropeanaIdMongoServerpublic void setDatastore(com.google.code.morphia.Datastore datastore)
setDatastore in interface EuropeanaIdMongoServerpublic EuropeanaId find()
find in interface EuropeanaIdMongoServerpublic EuropeanaId findOne(String oldId)
findOne in interface EuropeanaIdMongoServerCopyright © 2017 Europeana Foundation. All rights reserved.