try {
if (classifications == null || classifications.size()==0)
return null;
// Classifications
CategoryBag cbag = objectFactory.createCategoryBag();
Iterator classiter = classifications.iterator();
while (classiter.hasNext()) {
Classification classification = (Classification) classiter.next();
if (classification != null ) {
KeyedReference keyr = objectFactory.createKeyedReference();
cbag.getKeyedReference().add(keyr);
InternationalStringImpl iname = null;
String value = null;
ClassificationScheme scheme = classification.getClassificationScheme();
if (scheme==null || (classification.isExternal() && classification.getConcept()==null)) {