[prev in list] [next in list] [prev in thread] [next in thread] 

List:       juddi-cvs
Subject:    svn commit: r701565 - in
From:       jfaath () apache ! org
Date:       2008-10-03 23:16:04
Message-ID: 20081003231604.4E99623888A0 () eris ! apache ! org
[Download RAW message or body]

Author: jfaath
Date: Fri Oct  3 16:16:03 2008
New Revision: 701565

URL: http://svn.apache.org/viewvc?rev=701565&view=rev
Log:
Cleaned up collection iteration code

Modified:
    webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java
  webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/mapping/MappingModelToApi.java


Modified: webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java
                
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/m \
ain/java/org/apache/juddi/mapping/MappingApiToModel.java?rev=701565&r1=701564&r2=701565&view=diff
 ==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java \
                (original)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/mapping/MappingApiToModel.java \
Fri Oct  3 16:16:03 2008 @@ -17,7 +17,6 @@
 
 package org.apache.juddi.mapping;
 
-import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 import java.util.Date;
@@ -59,11 +58,8 @@
 				   throws DispositionReportFaultMessage {
 		modelNameList.clear();
 
-		Iterator<org.uddi.api_v3.Name> apiNameListItr = apiNameList.iterator();
 		int id = 0;
-		while (apiNameListItr.hasNext()) {
-			org.uddi.api_v3.Name apiName = apiNameListItr.next();
-			
+		for (org.uddi.api_v3.Name apiName : apiNameList) {
 			org.apache.juddi.model.BusinessNameId businessNameId = new \
org.apache.juddi.model.BusinessNameId(modelBusinessEntity.getBusinessKey(), id++);  \
modelNameList.add(new org.apache.juddi.model.BusinessName(businessNameId, \
modelBusinessEntity, apiName.getLang(), apiName.getValue()));  }
@@ -75,11 +71,8 @@
 				   throws DispositionReportFaultMessage {
 		modelDescList.clear();
 
-		Iterator<org.uddi.api_v3.Description> apiDescListItr = apiDescList.iterator();
 		int id = 0;
-		while (apiDescListItr.hasNext()) {
-			org.uddi.api_v3.Description apiDesc = apiDescListItr.next();
-			
+		for (org.uddi.api_v3.Description apiDesc : apiDescList) {
 			org.apache.juddi.model.BusinessDescrId businessDescId = new \
org.apache.juddi.model.BusinessDescrId(modelBusinessEntity.getBusinessKey(), id++);  \
modelDescList.add(new org.apache.juddi.model.BusinessDescr(businessDescId, \
modelBusinessEntity, apiDesc.getLang(), apiDesc.getValue()));  }
@@ -93,11 +86,8 @@
 		
 		if (apiDiscUrls != null) {
 			List<org.uddi.api_v3.DiscoveryURL> apiDiscUrlList = \
                apiDiscUrls.getDiscoveryURL();
-			Iterator<org.uddi.api_v3.DiscoveryURL> apiDiscUrlListItr = \
apiDiscUrlList.iterator();  int id = 0;
-			while (apiDiscUrlListItr.hasNext()) {
-				org.uddi.api_v3.DiscoveryURL apiDiscUrl = apiDiscUrlListItr.next();
-				
+			for (org.uddi.api_v3.DiscoveryURL apiDiscUrl : apiDiscUrlList) {
 				org.apache.juddi.model.DiscoveryUrlId discUrlId = new \
                org.apache.juddi.model.DiscoveryUrlId(modelBusinessEntity.getBusinessKey(), \
                id++);
 				modelDiscUrlList.add(new org.apache.juddi.model.DiscoveryUrl(discUrlId, \
modelBusinessEntity, apiDiscUrl.getUseType(), apiDiscUrl.getValue()));  }
@@ -112,11 +102,8 @@
 		
 		if (apiContacts != null) {
 			List<org.uddi.api_v3.Contact> apiContactList = apiContacts.getContact();
-			Iterator<org.uddi.api_v3.Contact> apiContactListItr = apiContactList.iterator();
 			int id = 0;
-			while (apiContactListItr.hasNext()) {
-				org.uddi.api_v3.Contact apiContact = apiContactListItr.next();
-				
+			for (org.uddi.api_v3.Contact apiContact : apiContactList) {
 				// TODO: The model only supports one personName per contact and it is just a \
                string value (no language code).
 				List<org.uddi.api_v3.PersonName> apiNameList = apiContact.getPersonName();
 				String personName = null;
@@ -144,11 +131,8 @@
 				   throws DispositionReportFaultMessage {
 		modelDescList.clear();
 
-		Iterator<org.uddi.api_v3.Description> apiDescListItr = apiDescList.iterator();
 		int id = 0;
-		while (apiDescListItr.hasNext()) {
-			org.uddi.api_v3.Description apiDesc = apiDescListItr.next();
-
+		for (org.uddi.api_v3.Description apiDesc : apiDescList) {
 			org.apache.juddi.model.ContactDescrId contactDescId = new \
org.apache.juddi.model.ContactDescrId(businessKey, \
modelContact.getId().getContactId(), id++);  modelDescList.add(new \
org.apache.juddi.model.ContactDescr(contactDescId, modelContact, apiDesc.getLang(), \
apiDesc.getValue()));  }
@@ -161,11 +145,8 @@
 				   throws DispositionReportFaultMessage {
 		modelEmailList.clear();
 
-		Iterator<org.uddi.api_v3.Email> apiEmailListItr = apiEmailList.iterator();
 		int id = 0;
-		while (apiEmailListItr.hasNext()) {
-			org.uddi.api_v3.Email apiEmail = apiEmailListItr.next();
-
+		for (org.uddi.api_v3.Email apiEmail : apiEmailList) {
 			org.apache.juddi.model.EmailId emailId = new \
org.apache.juddi.model.EmailId(businessKey, modelContact.getId().getContactId(), \
id++);  modelEmailList.add(new org.apache.juddi.model.Email(emailId, modelContact, \
apiEmail.getUseType(), apiEmail.getValue()));  }
@@ -178,11 +159,8 @@
 				   throws DispositionReportFaultMessage {
 		modelPhoneList.clear();
 
-		Iterator<org.uddi.api_v3.Phone> apiPhoneListItr = apiPhoneList.iterator();
 		int id = 0;
-		while (apiPhoneListItr.hasNext()) {
-			org.uddi.api_v3.Phone apiPhone = apiPhoneListItr.next();
-
+		for (org.uddi.api_v3.Phone apiPhone : apiPhoneList) {
 			org.apache.juddi.model.PhoneId phoneId = new \
org.apache.juddi.model.PhoneId(businessKey, modelContact.getId().getContactId(), \
id++);  modelPhoneList.add(new org.apache.juddi.model.Phone(phoneId, modelContact, \
apiPhone.getUseType(), apiPhone.getValue()));  }
@@ -195,11 +173,8 @@
 				   throws DispositionReportFaultMessage {
 		modelAddressList.clear();
 
-		Iterator<org.uddi.api_v3.Address> apiAddressListItr = apiAddressList.iterator();
 		int id = 0;
-		while (apiAddressListItr.hasNext()) {
-			org.uddi.api_v3.Address apiAddress = apiAddressListItr.next();
-
+		for (org.uddi.api_v3.Address apiAddress : apiAddressList) {
 			org.apache.juddi.model.AddressId addressId = new \
org.apache.juddi.model.AddressId(businessKey, modelContact.getId().getContactId(), \
id++);  org.apache.juddi.model.Address modelAddress = new \
org.apache.juddi.model.Address(addressId, modelContact);  \
modelAddress.setSortCode(apiAddress.getSortCode()); @@ -220,11 +195,8 @@
 				   throws DispositionReportFaultMessage {
 		modelAddressLineList.clear();
 
-		Iterator<org.uddi.api_v3.AddressLine> apiAddressLineListItr = \
apiAddressLineList.iterator();  int id = 0;
-		while (apiAddressLineListItr.hasNext()) {
-			org.uddi.api_v3.AddressLine apiAddressLine = apiAddressLineListItr.next();
-
+		for (org.uddi.api_v3.AddressLine apiAddressLine : apiAddressLineList) {
 			org.apache.juddi.model.AddressLineId addressLineId = new \
org.apache.juddi.model.AddressLineId(businessKey, contactId, \
modelAddress.getId().getAddressId(), id++);  modelAddressLineList.add(new \
org.apache.juddi.model.AddressLine(addressLineId, modelAddress, \
apiAddressLine.getValue(), apiAddressLine.getKeyName(), \
apiAddressLine.getKeyValue()));  }
@@ -239,11 +211,8 @@
 
 		if (apiIdentifierBag != null) {
 			List<org.uddi.api_v3.KeyedReference> apiKeyedRefList = \
                apiIdentifierBag.getKeyedReference();
-			Iterator<org.uddi.api_v3.KeyedReference> apiKeyedRefListItr = \
apiKeyedRefList.iterator();  int id = 0;
-			while (apiKeyedRefListItr.hasNext()) {
-				org.uddi.api_v3.KeyedReference apiKeyedRef = apiKeyedRefListItr.next();
-
+			for (org.uddi.api_v3.KeyedReference apiKeyedRef : apiKeyedRefList) {
 				org.apache.juddi.model.BusinessIdentifierId identifierId = new \
org.apache.juddi.model.BusinessIdentifierId(modelBusinessEntity.getBusinessKey(), \
id++);  modelIdentifierList.add(new \
org.apache.juddi.model.BusinessIdentifier(identifierId, modelBusinessEntity, \
apiKeyedRef.getTModelKey(), apiKeyedRef.getKeyName(), apiKeyedRef.getKeyValue()));  }
@@ -258,11 +227,8 @@
 
 		if (apiCategoryBag != null) {
 			List<JAXBElement<?>> apiCategoryList = apiCategoryBag.getContent();
-			Iterator<JAXBElement<?>> apiKeyedRefListItr = apiCategoryList.iterator();
 			int id = 0;
-			while (apiKeyedRefListItr.hasNext()) {
-				JAXBElement<?> elem = apiKeyedRefListItr.next();
-				
+			for (JAXBElement<?> elem : apiCategoryList) {
 				// TODO:  Currently, the model doesn't allow for the persistence of \
keyedReference groups.  This must be incorporated into the model.  For now  // the \
KeyedReferenceGroups are ignored.  if (elem.getValue() instanceof \
org.uddi.api_v3.KeyedReference) { @@ -275,7 +241,7 @@
 		}
 	}
 	
-	public static void mapBusinessServices(org.uddi.api_v3.BusinessServices \
apiBusinessServices,  +	public static void \
                mapBusinessServices(org.uddi.api_v3.BusinessServices \
                apiBusinessServices,
 										   Set<org.apache.juddi.model.BusinessService> modelBusinessServiceList,
 										   org.apache.juddi.model.BusinessEntity modelBusinessEntity) 
 				   throws DispositionReportFaultMessage {
@@ -283,9 +249,7 @@
 
 		if (apiBusinessServices != null) {
 			List<org.uddi.api_v3.BusinessService> apiBusinessServiceList = \
                apiBusinessServices.getBusinessService();
-			Iterator<org.uddi.api_v3.BusinessService> apiBusinessServiceListItr = \
                apiBusinessServiceList.iterator();
-			while (apiBusinessServiceListItr.hasNext()) {
-				org.uddi.api_v3.BusinessService apiBusinessService = \
apiBusinessServiceListItr.next(); +			for (org.uddi.api_v3.BusinessService \
                apiBusinessService : apiBusinessServiceList) {
 				org.apache.juddi.model.BusinessService modelBusinessService = new \
org.apache.juddi.model.BusinessService();  
 				mapBusinessService(apiBusinessService, modelBusinessService, \
modelBusinessEntity); @@ -318,11 +282,8 @@
 				   throws DispositionReportFaultMessage {
 		modelNameList.clear();
 
-		Iterator<org.uddi.api_v3.Name> apiNameListItr = apiNameList.iterator();
 		int id = 0;
-		while (apiNameListItr.hasNext()) {
-			org.uddi.api_v3.Name apiName = apiNameListItr.next();
-
+		for (org.uddi.api_v3.Name apiName : apiNameList) {
 			org.apache.juddi.model.ServiceNameId serviceNameId = new \
org.apache.juddi.model.ServiceNameId(modelBusinessService.getServiceKey(), id++);  \
modelNameList.add(new org.apache.juddi.model.ServiceName(serviceNameId, \
modelBusinessService, apiName.getLang(), apiName.getValue()));  }
@@ -334,11 +295,8 @@
 				   throws DispositionReportFaultMessage {
 		modelDescList.clear();
 
-		Iterator<org.uddi.api_v3.Description> apiDescListItr = apiDescList.iterator();
 		int id = 0;
-		while (apiDescListItr.hasNext()) {
-			org.uddi.api_v3.Description apiDesc = apiDescListItr.next();
-
+		for (org.uddi.api_v3.Description apiDesc : apiDescList) {
 			org.apache.juddi.model.ServiceDescrId serviceDescId = new \
org.apache.juddi.model.ServiceDescrId(modelBusinessService.getServiceKey(), id++);  \
modelDescList.add(new org.apache.juddi.model.ServiceDescr(serviceDescId, \
modelBusinessService, apiDesc.getLang(), apiDesc.getValue()));  }
@@ -352,11 +310,8 @@
 
 		if (apiCategoryBag != null) {
 			List<JAXBElement<?>> apiCategoryList = apiCategoryBag.getContent();
-			Iterator<JAXBElement<?>> apiKeyedRefListItr = apiCategoryList.iterator();
 			int id = 0;
-			while (apiKeyedRefListItr.hasNext()) {
-				JAXBElement<?> elem = apiKeyedRefListItr.next();
-
+			for (JAXBElement<?> elem : apiCategoryList) {
 				// TODO:  Currently, the model doesn't allow for the persistence of \
keyedReference groups.  This must be incorporated into the model.  For now  // the \
KeyedReferenceGroups are ignored.  if (elem.getValue() instanceof \
org.uddi.api_v3.KeyedReference) { @@ -377,9 +332,7 @@
 
 		if (apiBindingTemplates != null) {
 			List<org.uddi.api_v3.BindingTemplate> apiBindingTemplateList = \
                apiBindingTemplates.getBindingTemplate();
-			Iterator<org.uddi.api_v3.BindingTemplate> apiBindingTemplateListItr = \
                apiBindingTemplateList.iterator();
-			while (apiBindingTemplateListItr.hasNext()) {
-				org.uddi.api_v3.BindingTemplate apiBindingTemplate = \
apiBindingTemplateListItr.next(); +			for (org.uddi.api_v3.BindingTemplate \
                apiBindingTemplate : apiBindingTemplateList) {
 				org.apache.juddi.model.BindingTemplate modelBindingTemplate = new \
org.apache.juddi.model.BindingTemplate();  
 				mapBindingTemplate(apiBindingTemplate, modelBindingTemplate, \
modelBusinessService); @@ -412,11 +365,8 @@
 				   throws DispositionReportFaultMessage {
 		modelDescList.clear();
 
-		Iterator<org.uddi.api_v3.Description> apiDescListItr = apiDescList.iterator();
 		int id = 0;
-		while (apiDescListItr.hasNext()) {
-			org.uddi.api_v3.Description apiDesc = apiDescListItr.next();
-
+		for (org.uddi.api_v3.Description apiDesc : apiDescList) {
 			org.apache.juddi.model.BindingDescrId bindingDescId = new \
org.apache.juddi.model.BindingDescrId(modelBindingTemplate.getBindingKey(), id++);  \
modelDescList.add(new org.apache.juddi.model.BindingDescr(bindingDescId, \
modelBindingTemplate, apiDesc.getLang(), apiDesc.getValue()));  }
@@ -430,11 +380,8 @@
 
 		if (apiCategoryBag != null) {
 			List<JAXBElement<?>> apiCategoryList = apiCategoryBag.getContent();
-			Iterator<JAXBElement<?>> apiKeyedRefListItr = apiCategoryList.iterator();
 			int id = 0;
-			while (apiKeyedRefListItr.hasNext()) {
-				JAXBElement<?> elem = apiKeyedRefListItr.next();
-
+			for (JAXBElement<?> elem : apiCategoryList) {
 				// TODO:  Currently, the model doesn't allow for the persistence of \
keyedReference groups.  This must be incorporated into the model.  For now  // the \
KeyedReferenceGroups are ignored.  if (elem.getValue() instanceof \
org.uddi.api_v3.KeyedReference) { @@ -455,11 +402,8 @@
 
 		if (apiTModelInstDetails != null) {
 			List<org.uddi.api_v3.TModelInstanceInfo> apiTModelInstInfoList = \
                apiTModelInstDetails.getTModelInstanceInfo();
-			Iterator<org.uddi.api_v3.TModelInstanceInfo> apiTModelInstInfoListItr = \
apiTModelInstInfoList.iterator();  int id = 0;
-			while (apiTModelInstInfoListItr.hasNext()) {
-				org.uddi.api_v3.TModelInstanceInfo apiTModelInstInfo = \
                apiTModelInstInfoListItr.next();
-
+			for (org.uddi.api_v3.TModelInstanceInfo apiTModelInstInfo : \
                apiTModelInstInfoList) {
 				org.apache.juddi.model.TmodelInstanceInfoId tmodelInstInfoId = new \
org.apache.juddi.model.TmodelInstanceInfoId(modelBindingTemplate.getBindingKey(), \
id++);  org.apache.juddi.model.TmodelInstanceInfo modelTModelInstInfo = new \
org.apache.juddi.model.TmodelInstanceInfo(tmodelInstInfoId, modelBindingTemplate, \
apiTModelInstInfo.getTModelKey());  
@@ -478,11 +422,8 @@
 				   throws DispositionReportFaultMessage {
 		modelDescList.clear();
 
-		Iterator<org.uddi.api_v3.Description> apiDescListItr = apiDescList.iterator();
 		int id = 0;
-		while (apiDescListItr.hasNext()) {
-			org.uddi.api_v3.Description apiDesc = apiDescListItr.next();
-
+		for (org.uddi.api_v3.Description apiDesc : apiDescList) {
 			org.apache.juddi.model.TmodelInstanceInfoDescrId tmodelInstInfoDescId = new \
org.apache.juddi.model.TmodelInstanceInfoDescrId(bindingKey, \
modelTModelInstInfo.getId().getTmodelInstanceInfoId(), id++);  modelDescList.add(new \
org.apache.juddi.model.TmodelInstanceInfoDescr(tmodelInstInfoDescId, \
modelTModelInstInfo, apiDesc.getLang(), apiDesc.getValue()));  }
@@ -496,12 +437,9 @@
 
 		if (apiInstanceDetails != null) {
 			List<JAXBElement<?>> apiInstanceDetailsContent = apiInstanceDetails.getContent();
-			Iterator<JAXBElement<?>> apiInstanceDetailsContentItr = \
apiInstanceDetailsContent.iterator();  int docId = 0;
 			int descId = 0;
-			while (apiInstanceDetailsContentItr.hasNext()) {
-				JAXBElement<?> elem = apiInstanceDetailsContentItr.next();
-				
+			for (JAXBElement<?> elem : apiInstanceDetailsContent) {
 				if (elem.getValue() instanceof org.uddi.api_v3.OverviewDoc) {
 					org.uddi.api_v3.OverviewDoc apiOverviewDoc = \
(org.uddi.api_v3.OverviewDoc)elem.getValue();  // TODO: OverviewDoc is not mapped \
properly in the model. @@ -544,11 +482,8 @@
 				   throws DispositionReportFaultMessage {
 		modelDescList.clear();
 
-		Iterator<org.uddi.api_v3.Description> apiDescListItr = apiDescList.iterator();
 		int id = 0;
-		while (apiDescListItr.hasNext()) {
-			org.uddi.api_v3.Description apiDesc = apiDescListItr.next();
-
+		for (org.uddi.api_v3.Description apiDesc : apiDescList) {
 			org.apache.juddi.model.TmodelDescrId tmodelDescId = new \
org.apache.juddi.model.TmodelDescrId(modelTModel.getTmodelKey(), id++);  \
modelDescList.add(new org.apache.juddi.model.TmodelDescr(tmodelDescId, modelTModel, \
apiDesc.getLang(), apiDesc.getValue()));  }
@@ -562,11 +497,8 @@
 
 		if (apiIdentifierBag != null) {
 			List<org.uddi.api_v3.KeyedReference> apiKeyedRefList = \
                apiIdentifierBag.getKeyedReference();
-			Iterator<org.uddi.api_v3.KeyedReference> apiKeyedRefListItr = \
apiKeyedRefList.iterator();  int id = 0;
-			while (apiKeyedRefListItr.hasNext()) {
-				org.uddi.api_v3.KeyedReference apiKeyedRef = apiKeyedRefListItr.next();
-
+			for (org.uddi.api_v3.KeyedReference apiKeyedRef : apiKeyedRefList) {
 				org.apache.juddi.model.TmodelIdentifierId identifierId = new \
org.apache.juddi.model.TmodelIdentifierId(modelTModel.getTmodelKey(), id++);  \
modelIdentifierList.add(new org.apache.juddi.model.TmodelIdentifier(identifierId, \
modelTModel, apiKeyedRef.getTModelKey(), apiKeyedRef.getKeyName(), \
apiKeyedRef.getKeyValue()));  }
@@ -581,11 +513,8 @@
 
 		if (apiCategoryBag != null) {
 			List<JAXBElement<?>> apiCategoryList = apiCategoryBag.getContent();
-			Iterator<JAXBElement<?>> apiKeyedRefListItr = apiCategoryList.iterator();
 			int id = 0;
-			while (apiKeyedRefListItr.hasNext()) {
-				JAXBElement<?> elem = apiKeyedRefListItr.next();
-
+			for (JAXBElement<?> elem : apiCategoryList) {
 				// TODO:  Currently, the model doesn't allow for the persistence of \
keyedReference groups.  This must be incorporated into the model.  For now  // the \
KeyedReferenceGroups are ignored.  if (elem.getValue() instanceof \
org.uddi.api_v3.KeyedReference) {

Modified: webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/mapping/MappingModelToApi.java
                
URL: http://svn.apache.org/viewvc/webservices/juddi/branches/v3_trunk/juddi-core/src/m \
ain/java/org/apache/juddi/mapping/MappingModelToApi.java?rev=701565&r1=701564&r2=701565&view=diff
 ==============================================================================
--- webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/mapping/MappingModelToApi.java \
                (original)
+++ webservices/juddi/branches/v3_trunk/juddi-core/src/main/java/org/apache/juddi/mapping/MappingModelToApi.java \
Fri Oct  3 16:16:03 2008 @@ -17,7 +17,6 @@
 
 package org.apache.juddi.mapping;
 
-import java.util.Iterator;
 import java.util.List;
 import java.util.Set;
 
@@ -54,10 +53,7 @@
 				   throws DispositionReportFaultMessage {
 		apiNameList.clear();
 
-		Iterator<org.apache.juddi.model.BusinessName> modelNameListItr = \
                modelNameList.iterator();
-		while (modelNameListItr.hasNext()) {
-			org.apache.juddi.model.BusinessName modelName = modelNameListItr.next();
-
+		for (org.apache.juddi.model.BusinessName modelName : modelNameList) {
 			org.uddi.api_v3.Name apiName = new org.uddi.api_v3.Name();
 			apiName.setLang(modelName.getLangCode());
 			apiName.setValue(modelName.getName());
@@ -70,10 +66,7 @@
 				   throws DispositionReportFaultMessage {
 		apiDescList.clear();
 
-		Iterator<org.apache.juddi.model.BusinessDescr> modelDescListItr = \
                modelDescList.iterator();
-		while (modelDescListItr.hasNext()) {
-			org.apache.juddi.model.BusinessDescr modelDesc = modelDescListItr.next();
-
+		for (org.apache.juddi.model.BusinessDescr modelDesc : modelDescList) {
 			org.uddi.api_v3.Description apiDesc = new org.uddi.api_v3.Description();
 			apiDesc.setLang(modelDesc.getLangCode());
 			apiDesc.setValue(modelDesc.getDescr());
@@ -91,10 +84,7 @@
 		List<org.uddi.api_v3.DiscoveryURL> apiDiscUrlList = apiDiscUrls.getDiscoveryURL();
 		apiDiscUrlList.clear();
 		
-		Iterator<org.apache.juddi.model.DiscoveryUrl> modelDiscUrlListItr = \
                modelDiscUrlList.iterator();
-		while (modelDiscUrlListItr.hasNext()) {
-			org.apache.juddi.model.DiscoveryUrl modelDiscUrl = modelDiscUrlListItr.next();
-
+		for (org.apache.juddi.model.DiscoveryUrl modelDiscUrl : modelDiscUrlList) {
 			org.uddi.api_v3.DiscoveryURL apiDiscUrl = new org.uddi.api_v3.DiscoveryURL();
 			apiDiscUrl.setUseType(modelDiscUrl.getUseType());
 			apiDiscUrl.setValue(modelDiscUrl.getUrl());
@@ -113,10 +103,7 @@
 		List<org.uddi.api_v3.Contact> apiContactList = apiContacts.getContact();
 		apiContactList.clear();
 
-		Iterator<org.apache.juddi.model.Contact> modelContactListItr = \
                modelContactList.iterator();
-		while (modelContactListItr.hasNext()) {
-			org.apache.juddi.model.Contact modelContact = modelContactListItr.next();
-
+		for (org.apache.juddi.model.Contact modelContact : modelContactList) {
 			org.uddi.api_v3.Contact apiContact = new org.uddi.api_v3.Contact();
 			apiContact.setUseType(modelContact.getUseType());
 			// TODO: The model only supports one person name, needs to support collection.
@@ -139,10 +126,7 @@
 	throws DispositionReportFaultMessage {
 		apiDescList.clear();
 
-		Iterator<org.apache.juddi.model.ContactDescr> modelDescListItr = \
                modelDescList.iterator();
-		while (modelDescListItr.hasNext()) {
-			org.apache.juddi.model.ContactDescr modelDesc = modelDescListItr.next();
-
+		for (org.apache.juddi.model.ContactDescr modelDesc : modelDescList) {
 			org.uddi.api_v3.Description apiDesc = new org.uddi.api_v3.Description();
 			apiDesc.setLang(modelDesc.getLangCode());
 			apiDesc.setValue(modelDesc.getDescr());
@@ -155,10 +139,7 @@
 				   throws DispositionReportFaultMessage {
 		apiEmailList.clear();
 
-		Iterator<org.apache.juddi.model.Email> modelEmailListItr = \
                modelEmailList.iterator();
-		while (modelEmailListItr.hasNext()) {
-			org.apache.juddi.model.Email modelEmail = modelEmailListItr.next();
-			
+		for (org.apache.juddi.model.Email modelEmail : modelEmailList) {
 			org.uddi.api_v3.Email apiEmail = new org.uddi.api_v3.Email();
 			apiEmail.setUseType(modelEmail.getUseType());
 			apiEmail.setValue(modelEmail.getEmailAddress());
@@ -171,10 +152,7 @@
 				   throws DispositionReportFaultMessage {
 		apiPhoneList.clear();
 
-		Iterator<org.apache.juddi.model.Phone> modelPhoneListItr = \
                modelPhoneList.iterator();
-		while (modelPhoneListItr.hasNext()) {
-			org.apache.juddi.model.Phone modelPhone = modelPhoneListItr.next();
-
+		for (org.apache.juddi.model.Phone modelPhone : modelPhoneList) {
 			org.uddi.api_v3.Phone apiPhone = new org.uddi.api_v3.Phone();
 			apiPhone.setUseType(modelPhone.getUseType());
 			apiPhone.setValue(modelPhone.getPhoneNumber());
@@ -187,10 +165,7 @@
 				   throws DispositionReportFaultMessage {
 		apiAddressList.clear();
 
-		Iterator<org.apache.juddi.model.Address> modelAddressListItr = \
                modelAddressList.iterator();
-		while (modelAddressListItr.hasNext()) {
-			org.apache.juddi.model.Address modelAddress = modelAddressListItr.next();
-
+		for (org.apache.juddi.model.Address modelAddress : modelAddressList) {
 			org.uddi.api_v3.Address apiAddress = new org.uddi.api_v3.Address();
 			apiAddress.setUseType(modelAddress.getUseType());
 			apiAddress.setLang("");
@@ -208,10 +183,7 @@
 				   throws DispositionReportFaultMessage {
 		apiAddressLineList.clear();
 
-		Iterator<org.apache.juddi.model.AddressLine> modelAddressLineListItr = \
                modelAddressLineList.iterator();
-		while (modelAddressLineListItr.hasNext()) {
-			org.apache.juddi.model.AddressLine modelAddressLine = \
                modelAddressLineListItr.next();
-
+		for (org.apache.juddi.model.AddressLine modelAddressLine : modelAddressLineList) {
 			org.uddi.api_v3.AddressLine apiAddressLine = new org.uddi.api_v3.AddressLine();
 			apiAddressLine.setKeyName(modelAddressLine.getKeyName());
 			apiAddressLine.setKeyName(modelAddressLine.getKeyValue());
@@ -230,10 +202,7 @@
 		List<org.uddi.api_v3.KeyedReference> apiKeyedRefList = \
apiIdentifierBag.getKeyedReference();  apiKeyedRefList.clear();
 
-		Iterator<org.apache.juddi.model.BusinessIdentifier> modelIdentifierListItr = \
                modelIdentifierList.iterator();
-		while (modelIdentifierListItr.hasNext()) {
-			org.apache.juddi.model.BusinessIdentifier modelIdentifier = \
                modelIdentifierListItr.next();
-
+		for (org.apache.juddi.model.BusinessIdentifier modelIdentifier : \
modelIdentifierList) {  org.uddi.api_v3.KeyedReference apiKeyedRef = new \
org.uddi.api_v3.KeyedReference();  \
apiKeyedRef.setTModelKey(modelIdentifier.getTmodelKeyRef());  \
apiKeyedRef.setKeyName(modelIdentifier.getKeyName()); @@ -253,11 +222,9 @@
 		List<JAXBElement<?>> apiCategoryList = apiCategoryBag.getContent();
 		apiCategoryList.clear();
 
-		Iterator<org.apache.juddi.model.BusinessCategory> modelCategoryListItr = \
                modelCategoryList.iterator();
-		while (modelCategoryListItr.hasNext()) {
+		for (org.apache.juddi.model.BusinessCategory modelCategory : modelCategoryList) {
 			// TODO:  Currently, the model doesn't allow for the persistence of \
keyedReference groups.  This must be incorporated into the model.  For now  // the \
                KeyedReferenceGroups are ignored.
-			org.apache.juddi.model.BusinessCategory modelCategory = \
modelCategoryListItr.next();  
 			org.uddi.api_v3.KeyedReference apiKeyedRef = new \
org.uddi.api_v3.KeyedReference();  \
apiKeyedRef.setTModelKey(modelCategory.getTmodelKeyRef()); @@ -279,10 +246,7 @@
 		List<org.uddi.api_v3.BusinessService> apiBusinessServiceList = \
apiBusinessServices.getBusinessService();  apiBusinessServiceList.clear();
 		
-		Iterator<org.apache.juddi.model.BusinessService> modelBusinessServiceListItr = \
                modelBusinessServiceList.iterator();
-		while (modelBusinessServiceListItr.hasNext()) {
-			org.apache.juddi.model.BusinessService modelBusinessService = \
                modelBusinessServiceListItr.next();
-
+		for (org.apache.juddi.model.BusinessService modelBusinessService : \
modelBusinessServiceList) {  org.uddi.api_v3.BusinessService apiBusinessService = new \
org.uddi.api_v3.BusinessService();  mapBusinessService(modelBusinessService, \
apiBusinessService);  apiBusinessServiceList.add(apiBusinessService);
@@ -309,10 +273,7 @@
 				   throws DispositionReportFaultMessage {
 		apiNameList.clear();
 
-		Iterator<org.apache.juddi.model.ServiceName> modelNameListItr = \
                modelNameList.iterator();
-		while (modelNameListItr.hasNext()) {
-			org.apache.juddi.model.ServiceName modelName = modelNameListItr.next();
-
+		for (org.apache.juddi.model.ServiceName modelName : modelNameList) {
 			org.uddi.api_v3.Name apiName = new org.uddi.api_v3.Name();
 			apiName.setLang(modelName.getLangCode());
 			apiName.setValue(modelName.getName());
@@ -325,10 +286,7 @@
 				   throws DispositionReportFaultMessage {
 		apiDescList.clear();
 
-		Iterator<org.apache.juddi.model.ServiceDescr> modelDescListItr = \
                modelDescList.iterator();
-		while (modelDescListItr.hasNext()) {
-			org.apache.juddi.model.ServiceDescr modelDesc = modelDescListItr.next();
-
+		for (org.apache.juddi.model.ServiceDescr modelDesc : modelDescList) {
 			org.uddi.api_v3.Description apiDesc = new org.uddi.api_v3.Description();
 			apiDesc.setLang(modelDesc.getLangCode());
 			apiDesc.setValue(modelDesc.getDescr());
@@ -346,11 +304,9 @@
 		List<JAXBElement<?>> apiCategoryList = apiCategoryBag.getContent();
 		apiCategoryList.clear();
 
-		Iterator<org.apache.juddi.model.ServiceCategory> modelCategoryListItr = \
                modelCategoryList.iterator();
-		while (modelCategoryListItr.hasNext()) {
+		for (org.apache.juddi.model.ServiceCategory modelCategory : modelCategoryList) {
 			// TODO:  Currently, the model doesn't allow for the persistence of \
keyedReference groups.  This must be incorporated into the model.  For now  // the \
                KeyedReferenceGroups are ignored.
-			org.apache.juddi.model.ServiceCategory modelCategory = \
modelCategoryListItr.next();  
 			org.uddi.api_v3.KeyedReference apiKeyedRef = new \
org.uddi.api_v3.KeyedReference();  \
apiKeyedRef.setTModelKey(modelCategory.getTmodelKeyRef()); @@ -372,10 +328,7 @@
 		List<org.uddi.api_v3.BindingTemplate> apiBindingTemplateList = \
apiBindingTemplates.getBindingTemplate();  apiBindingTemplateList.clear();
 
-		Iterator<org.apache.juddi.model.BindingTemplate> modelBindingTemplateListItr = \
                modelBindingTemplateList.iterator();
-		while (modelBindingTemplateListItr.hasNext()) {
-			org.apache.juddi.model.BindingTemplate modelBindingTemplate = \
                modelBindingTemplateListItr.next();
-
+		for (org.apache.juddi.model.BindingTemplate modelBindingTemplate : \
modelBindingTemplateList) {  org.uddi.api_v3.BindingTemplate apiBindingTemplate = new \
org.uddi.api_v3.BindingTemplate();  mapBindingTemplate(modelBindingTemplate, \
apiBindingTemplate);  apiBindingTemplateList.add(apiBindingTemplate);
@@ -408,10 +361,7 @@
 				   throws DispositionReportFaultMessage {
 		apiDescList.clear();
 
-		Iterator<org.apache.juddi.model.BindingDescr> modelDescListItr = \
                modelDescList.iterator();
-		while (modelDescListItr.hasNext()) {
-			org.apache.juddi.model.BindingDescr modelDesc = modelDescListItr.next();
-
+		for (org.apache.juddi.model.BindingDescr modelDesc : modelDescList) {
 			org.uddi.api_v3.Description apiDesc = new org.uddi.api_v3.Description();
 			apiDesc.setLang(modelDesc.getLangCode());
 			apiDesc.setValue(modelDesc.getDescr());
@@ -429,11 +379,9 @@
 		List<JAXBElement<?>> apiCategoryList = apiCategoryBag.getContent();
 		apiCategoryList.clear();
 
-		Iterator<org.apache.juddi.model.BindingCategory> modelCategoryListItr = \
                modelCategoryList.iterator();
-		while (modelCategoryListItr.hasNext()) {
+		for (org.apache.juddi.model.BindingCategory modelCategory : modelCategoryList) {
 			// TODO:  Currently, the model doesn't allow for the persistence of \
keyedReference groups.  This must be incorporated into the model.  For now  // the \
                KeyedReferenceGroups are ignored.
-			org.apache.juddi.model.BindingCategory modelCategory = \
modelCategoryListItr.next();  
 			org.uddi.api_v3.KeyedReference apiKeyedRef = new \
org.uddi.api_v3.KeyedReference();  \
apiKeyedRef.setTModelKey(modelCategory.getTmodelKeyRef()); @@ -454,10 +402,7 @@
 		List<org.uddi.api_v3.TModelInstanceInfo> apiTModelInstInfoList = \
apiTModelInstDetails.getTModelInstanceInfo();  apiTModelInstInfoList.clear();
 
-		Iterator<org.apache.juddi.model.TmodelInstanceInfo> modelTModelInstInfoListItr = \
                modelTModelInstInfoList.iterator();
-		while (modelTModelInstInfoListItr.hasNext()) {
-			org.apache.juddi.model.TmodelInstanceInfo modelTModelInstInfo = \
                modelTModelInstInfoListItr.next();
-
+		for (org.apache.juddi.model.TmodelInstanceInfo modelTModelInstInfo : \
modelTModelInstInfoList) {  org.uddi.api_v3.TModelInstanceInfo apiTModelInstInfo = \
new org.uddi.api_v3.TModelInstanceInfo();  \
apiTModelInstInfo.setTModelKey(modelTModelInstInfo.getTmodelKey());  \
mapTModelInstanceInfoDescriptions(modelTModelInstInfo.getTmodelInstanceInfoDescrs(), \
apiTModelInstInfo.getDescription()); @@ -473,10 +418,7 @@
 				   throws DispositionReportFaultMessage {
 		apiDescList.clear();
 
-		Iterator<org.apache.juddi.model.TmodelInstanceInfoDescr> modelDescListItr = \
                modelDescList.iterator();
-		while (modelDescListItr.hasNext()) {
-			org.apache.juddi.model.TmodelInstanceInfoDescr modelDesc = \
                modelDescListItr.next();
-
+		for (org.apache.juddi.model.TmodelInstanceInfoDescr modelDesc : modelDescList) {
 			org.uddi.api_v3.Description apiDesc = new org.uddi.api_v3.Description();
 			apiDesc.setLang(modelDesc.getLangCode());
 			apiDesc.setValue(modelDesc.getDescr());
@@ -497,10 +439,7 @@
 		apiInstanceDetailsContent.add(new \
ObjectFactory().createInstanceParms(modelTModelInstInfo.getInstanceParms()));  
 		Set<org.apache.juddi.model.InstanceDetailsDescr> modelInstDetailsDescrList = \
                modelTModelInstInfo.getInstanceDetailsDescrs();
-		Iterator<org.apache.juddi.model.InstanceDetailsDescr> modelInstDetailsDescrListItr \
                = modelInstDetailsDescrList.iterator();
-		while (modelInstDetailsDescrListItr.hasNext()) {
-			org.apache.juddi.model.InstanceDetailsDescr modelInstDetailDescr = \
                modelInstDetailsDescrListItr.next();
-			
+		for (org.apache.juddi.model.InstanceDetailsDescr modelInstDetailDescr : \
modelInstDetailsDescrList) {  org.uddi.api_v3.Description apiDesc = new \
org.uddi.api_v3.Description();  apiDesc.setLang(modelInstDetailDescr.getLangCode());
 			apiDesc.setValue(modelInstDetailDescr.getDescr());
@@ -538,10 +477,7 @@
 			    throws DispositionReportFaultMessage {
 		apiDescList.clear();
 
-		Iterator<org.apache.juddi.model.TmodelDescr> modelDescListItr = \
                modelDescList.iterator();
-		while (modelDescListItr.hasNext()) {
-			org.apache.juddi.model.TmodelDescr modelDesc = modelDescListItr.next();
-
+		for (org.apache.juddi.model.TmodelDescr modelDesc : modelDescList) {
 			org.uddi.api_v3.Description apiDesc = new org.uddi.api_v3.Description();
 			apiDesc.setLang(modelDesc.getLangCode());
 			apiDesc.setValue(modelDesc.getDescr());
@@ -559,10 +495,7 @@
 		List<org.uddi.api_v3.KeyedReference> apiKeyedRefList = \
apiIdentifierBag.getKeyedReference();  apiKeyedRefList.clear();
 
-		Iterator<org.apache.juddi.model.TmodelIdentifier> modelIdentifierListItr = \
                modelIdentifierList.iterator();
-		while (modelIdentifierListItr.hasNext()) {
-			org.apache.juddi.model.TmodelIdentifier modelIdentifier = \
                modelIdentifierListItr.next();
-
+		for (org.apache.juddi.model.TmodelIdentifier modelIdentifier : \
modelIdentifierList) {  org.uddi.api_v3.KeyedReference apiKeyedRef = new \
org.uddi.api_v3.KeyedReference();  \
apiKeyedRef.setTModelKey(modelIdentifier.getTmodelKeyRef());  \
apiKeyedRef.setKeyName(modelIdentifier.getKeyName()); @@ -582,11 +515,9 @@
 		List<JAXBElement<?>> apiCategoryList = apiCategoryBag.getContent();
 		apiCategoryList.clear();
 
-		Iterator<org.apache.juddi.model.TmodelCategory> modelCategoryListItr = \
                modelCategoryList.iterator();
-		while (modelCategoryListItr.hasNext()) {
+		for (org.apache.juddi.model.TmodelCategory modelCategory : modelCategoryList) {
 			// TODO:  Currently, the model doesn't allow for the persistence of \
keyedReference groups.  This must be incorporated into the model.  For now  // the \
                KeyedReferenceGroups are ignored.
-			org.apache.juddi.model.TmodelCategory modelCategory = \
modelCategoryListItr.next();  
 			org.uddi.api_v3.KeyedReference apiKeyedRef = new \
org.uddi.api_v3.KeyedReference();  \
apiKeyedRef.setTModelKey(modelCategory.getTmodelKeyRef());



---------------------------------------------------------------------
To unsubscribe, e-mail: juddi-cvs-unsubscribe@ws.apache.org
For additional commands, e-mail: juddi-cvs-help@ws.apache.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic