Merge pull request #1026 from LongsightGroup/DS-2701-rest

[DS-2701] REST API
Merging, still a few issues remaining but I will create a separate pull request for these.
This commit is contained in:
Kevin Van de Velde
2015-09-18 12:21:39 +02:00
17 changed files with 607 additions and 627 deletions

View File

@@ -1115,6 +1115,16 @@ public class ItemServiceImpl extends DSpaceObjectServiceImpl<Item> implements It
return itemDAO.countItems(context, collection, true, false);
}
@Override
public int countItems(Context context, Community community) throws SQLException {
List<Collection> collections = communityService.getAllCollections(context, community);
int itemCount = 0;
for(Collection collection : collections) {
itemCount += countItems(context, collection);
}
return itemCount;
}
@Override
protected void getAuthoritiesAndConfidences(String fieldKey, Collection collection, List<String> values, List<String> authorities, List<Integer> confidences, int i) {
Choices c = choiceAuthorityService.getBestMatch(fieldKey, values.get(i), collection, null);