// this is probably used more when there isn't too much overlap
// (i.e. multiple us codes)
// in the db
List<Integer> codeIds = uiGetCodeId.getAllCodeIds();
for (Integer codeId : codeIds) {
Asset asset = converter.convertCodeWithID(codeId);
writeAsset(asset, true);
writeAsset(asset, false);
}
} else {
do {
// select a collection -> this is the context for the next
// questions
int collectionId = uiGetCollectionId.getDesiredCollectionId();
if (uiShouldProcessAll.getShouldProcessAll()) {
// process all codes for just this collection
List<Integer> codeIds = uiGetCodeId.getAllCodeIds(collectionId);
for (Integer codeId : codeIds) {
Asset asset = converter.convertCodeWithID(codeId);
writeAsset(asset, true);
writeAsset(asset, false);
}
} else {
// process on an individual level
do {
int codeId = uiGetCodeId.getDesiredCodeId(collectionId);
Asset asset = converter.convertCodeWithID(codeId);
writeAsset(asset, true);
writeAsset(asset, false);
} while (uiShouldContinue.getShouldContinue());
}