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 |
cloneDocument(eu.europeana.publication.common.IDocument originalDocument,
eu.europeana.publication.common.IDocument clonedDocument) |
void |
close()
Close the connection to the server
|
void |
commit() |
void |
createDatastore() |
void |
deleteDocument(eu.europeana.publication.common.IDocument id) |
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
|
eu.europeana.publication.common.IDocument |
getDocumentById(String id) |
List<eu.europeana.publication.common.IDocument> |
getDocumentsByStatesUsingBatch(List<eu.europeana.publication.common.State> stateVlues,
Map<String,List<String>> queryChoices,
int batchSize) |
void |
insertDocument(eu.europeana.publication.common.IDocument document) |
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(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 |
updateDocumentUsingId(eu.europeana.publication.common.IDocument document) |
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 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 EuropeanaIdMongoServerpublic List<eu.europeana.publication.common.IDocument> getDocumentsByStatesUsingBatch(List<eu.europeana.publication.common.State> stateVlues, Map<String,List<String>> queryChoices, int batchSize)
getDocumentsByStatesUsingBatch in interface eu.europeana.publication.common.ICollectionpublic eu.europeana.publication.common.IDocument getDocumentById(String id)
getDocumentById in interface eu.europeana.publication.common.ICollectionpublic void insertDocument(eu.europeana.publication.common.IDocument document)
insertDocument in interface eu.europeana.publication.common.ICollectionpublic void updateDocumentUsingId(eu.europeana.publication.common.IDocument document)
updateDocumentUsingId in interface eu.europeana.publication.common.ICollectionpublic void cloneDocument(eu.europeana.publication.common.IDocument originalDocument,
eu.europeana.publication.common.IDocument clonedDocument)
cloneDocument in interface eu.europeana.publication.common.ICollectionpublic void deleteDocument(eu.europeana.publication.common.IDocument id)
deleteDocument in interface eu.europeana.publication.common.ICollectionCopyright © 2015 Europeana Foundation. All rights reserved.