use of org.mycore.oai.pmh.NoSetHierarchyException in project mycore by MyCoRe-Org.
the class MCROAIAdapter method getSet.
/*
* (non-Javadoc)
* @see org.mycore.oai.pmh.dataprovider.OAIAdapter#getSet(java.lang.String)
*/
@Override
public MCRSet getSet(String setSpec) throws NoSetHierarchyException, NoRecordsMatchException {
MCROAISetManager setManager = getSetManager();
OAIDataList<MCRSet> setList = setManager.get();
if (setList.isEmpty()) {
throw new NoSetHierarchyException();
}
MCRSet set = MCROAISetManager.get(setSpec, setList);
if (set == null) {
throw new NoRecordsMatchException();
}
return set;
}
Aggregations