Collection<Classification> classifications = null;
if (categoryBag != null) {
classifications = new ArrayList<Classification>();
List<KeyedReference> keyedReferenceList = categoryBag.getKeyedReference();
for (KeyedReference keyedReference : keyedReferenceList) {
Classification classification = new ClassificationImpl(lifeCycleManager);
classification.setValue(keyedReference.getKeyValue());
classification.setName(new InternationalStringImpl(keyedReference.getKeyName()));
String tmodelKey = keyedReference.getTModelKey();
if (tmodelKey != null) {
ClassificationScheme scheme = new ClassificationSchemeImpl(lifeCycleManager);
scheme.setKey(new KeyImpl(tmodelKey));
classification.setClassificationScheme(scheme);
}
classifications.add(classification);
}
}
return classifications;