if ((categoryBag = tModel.getCategoryBag()) != null)
{
// Get the list of keyed references
categoryBagIterator = categoryBag.getKeyedReferenceVector().iterator();
KeyedReference keyedReference = null;
// Go through the list of keyed references
while (categoryBagIterator.hasNext() && !(tModelFound))
{
// Get next keyed reference
keyedReference = (KeyedReference) categoryBagIterator.next();
// If this is a types taxonomy tModel and the value is wsdlSpec, then this is the tModel we want
// REMOVE: It is not necessary to check the key name
//if (keyedReference.getTModelKey().equalsIgnoreCase(TModel.TYPES_TMODEL_KEY) &&
// "wsdlSpec".equals(keyedReference.getKeyValue()) &&
// ("types".equals(keyedReference.getKeyName()) ||
// "uddi-org:types".equals(keyedReference.getKeyName()))) {
// tModelFound = true;
//}
if (keyedReference
.getTModelKey()
.equalsIgnoreCase(TModel.TYPES_TMODEL_KEY)
&& "wsdlSpec".equals(keyedReference.getKeyValue()))
{
tModelFound = true;
}
}
}