Revision 44144
Added by Alessia Bardi over 7 years ago
OAISetHelper.java | ||
---|---|---|
30 | 30 |
} |
31 | 31 |
|
32 | 32 |
private void loadConfigurationSets(final String dbName) { |
33 |
log.debug("*****Dropping and re-creating configuration sets******"); |
|
34 |
this.mongoSetCollection.dropConfigurationSets(dbName); |
|
33 |
log.info("***** Updating configuration sets ******"); |
|
35 | 34 |
final List<SetInfo> oaiConfigSets = this.configurationReader.getSets(); |
36 | 35 |
for (final SetInfo setInfo : oaiConfigSets) { |
37 | 36 |
this.mongoSetCollection.upsertSet(setInfo, true, dbName); |
... | ... | |
43 | 42 |
* Helper method to count elements in OAI sets. |
44 | 43 |
*/ |
45 | 44 |
public void updateAllCounts(final MDFInfo mdFormat, final String dbName) { |
46 |
this.mongoSetCollection.ensureIndexes(dbName); |
|
45 |
//this.mongoSetCollection.ensureIndexes(dbName);
|
|
47 | 46 |
|
48 | 47 |
final MongoPublisherStore store = getStore(mdFormat, dbName); |
49 | 48 |
if (store == null) { throw new OaiPublisherRuntimeException("Can't count elements for not yet created store (" + mdFormat + ") on db " + dbName); } |
... | ... | |
56 | 55 |
} |
57 | 56 |
|
58 | 57 |
public void updateConfiguredSetsCount(final MDFInfo mdFormat, final String dbName) { |
59 |
this.mongoSetCollection.ensureIndexes(dbName); |
|
58 |
//this.mongoSetCollection.ensureIndexes(dbName);
|
|
60 | 59 |
|
61 | 60 |
final MongoPublisherStore store = getStore(mdFormat, dbName); |
62 | 61 |
if (store == null) { throw new OaiPublisherRuntimeException("Can't count elements for not yet created store (" + mdFormat + ") on db " + dbName); } |
... | ... | |
99 | 98 |
} |
100 | 99 |
} |
101 | 100 |
|
101 |
public void updateSetCount(final MDFInfo mdFormat, final String dbName, final String set) { |
|
102 |
|
|
103 |
} |
|
104 |
|
|
102 | 105 |
private MongoPublisherStore getStore(final MDFInfo mdFormat, final String dbName) { |
103 | 106 |
final String format = mdFormat.getSourceFormatName(); |
104 | 107 |
final String layout = mdFormat.getSourceFormatLayout(); |
... | ... | |
134 | 137 |
this.mongoSetCollection = mongoSetCollection; |
135 | 138 |
} |
136 | 139 |
|
140 |
|
|
137 | 141 |
} |
Also available in: Unified diff
some cleanup in OAI related classes