// Classifications
CategoryBag cbag = (CategoryBag)(XmlObject.Factory.newInstance()).changeType(CategoryBag.type);
Iterator classiter = classifications.iterator();
while (classiter.hasNext()) {
Classification classification = (Classification) classiter.next();
if (classification != null ) {
KeyedReference keyr = cbag.addNewKeyedReference();
InternationalStringImpl iname = null;
String value = null;
ClassificationScheme scheme = classification.getClassificationScheme();
if (scheme==null || (classification.isExternal() && classification.getConcept()==null)) {
/*
* JAXR 1.0 Specification: Section D6.4.4
* Specification related tModels mapped from Concept may be automatically
* categorized by the well-known uddi-org:types taxonomy in UDDI (with
* tModelKey uuid:C1ACF26D-9672-4404-9D70-39B756E62AB4) as follows:
* The keyed reference is assigned a taxonomy value of specification.
*/
keyr.setTModelKey(UDDI_ORG_TYPES);
keyr.setKeyValue("specification");
} else {
if (classification.isExternal()) {
iname = (InternationalStringImpl) ((RegistryObject) classification).getName();
value = classification.getValue();
} else {
Concept concept = classification.getConcept();
if (concept != null) {
iname = (InternationalStringImpl) ((RegistryObject) concept).getName();
value = concept.getValue();
scheme = concept.getClassificationScheme();
}