You are viewing a plain text version of this content. The canonical link for it is here.
Posted to scout-dev@ws.apache.org by an...@apache.org on 2005/01/23 09:30:29 UTC

svn commit: r126203 - in webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout: registry registry/infomodel util

Author: anil
Date: Sun Jan 23 00:30:26 2005
New Revision: 126203

URL: http://svn.apache.org/viewcvs?view=rev&rev=126203
Log:
Latest Scout Implementation.  There is a large scope for refactoring/improvement of the code.  I need to add the testcases also.

Modified:
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BulkResponseImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BusinessQueryManagerImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/CapabilityProfileImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/ConnectionFactoryImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/ConnectionImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/LifeCycleManagerImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/RegistryServiceImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/AssociationImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationSchemeImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ConceptImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/EmailAddressImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExtensibleObjectImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExternalIdentifierImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExternalLinkImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/InternationalStringImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/KeyImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/LocalizedStringImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/OrganizationImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/PersonNameImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/PostalAddressImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/RegistryEntryImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/RegistryObjectImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ServiceImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/SlotImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/SpecificationLinkImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/TelephoneNumberImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/UserImpl.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java
   webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutUddiJaxrHelper.java

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BulkResponseImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BulkResponseImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BulkResponseImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BulkResponseImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BulkResponseImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BulkResponseImpl.java	Sun Jan 23 00:30:26 2005
@@ -27,7 +27,8 @@
  *
  * @author Anil Saldhana  <ma...@apache.org>
  */
-public class BulkResponseImpl implements BulkResponse {
+public class BulkResponseImpl implements BulkResponse
+{
     public static int STATUS_FAILURE = 1;
     public static int STATUS_SUCCESS = 0;
     public static int STATUS_UNAVAILABLE = 2;
@@ -42,50 +43,61 @@
     /**
      * Creates a new instance of BulkResponseImpl
      */
-    public BulkResponseImpl() {
+    public BulkResponseImpl()
+    {
     }
 
-    BulkResponseImpl(Collection collection) {
+    BulkResponseImpl(Collection collection)
+    {
         this.collection = collection;
     }
 
     /**
      * Get Collection of RegistryObjects *
      */
-    public Collection getCollection() throws JAXRException {
+    public Collection getCollection() throws JAXRException
+    {
         return collection;
     }
 
-    public Collection getExceptions() throws JAXRException {
+    public Collection getExceptions() throws JAXRException
+    {
         return null;
     }
 
-    public String getRequestId() throws JAXRException {
+    public String getRequestId() throws JAXRException
+    {
         return null;
     }
 
-    public int getStatus() throws JAXRException {
+    public int getStatus() throws JAXRException
+    {
         return status;
     }
 
-    public boolean isAvailable() throws JAXRException {
+    public boolean isAvailable() throws JAXRException
+    {
         return false;
     }
 
-    public boolean isPartialResponse() throws JAXRException {
+    public boolean isPartialResponse() throws JAXRException
+    {
         if (exceptions.size() > 0) this.partialResponse = true;
         return this.partialResponse;
     }
 
-    public void setPartialResponse(boolean b) throws JAXRException {
+    public void setPartialResponse(boolean b) throws JAXRException
+    {
         this.partialResponse = b;
     }
 
-    public void setCollection(Collection coll) throws JAXRException {
+    public void setCollection(Collection coll) throws JAXRException
+    {
         this.collection = coll;
     }
 
-    public void setStatus(int status) throws JAXRException {
+    public void setStatus(int status) throws JAXRException
+    {
         this.status = status;
     }
 
@@ -94,7 +106,8 @@
      *
      * @param exceptions New value of property exceptions.
      */
-    public void setExceptions(Collection exceptions) {
+    public void setExceptions(Collection exceptions)
+    {
         this.exceptions = exceptions;
     }
 

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BusinessLifeCycleManagerImpl.java	Sun Jan 23 00:30:26 2005
@@ -17,25 +17,47 @@
 package org.apache.ws.scout.registry;
 
 import org.apache.juddi.IRegistry;
-import org.apache.juddi.datatype.business.*;
-import org.apache.juddi.datatype.service.*;
-import org.apache.juddi.datatype.*;
-import org.apache.juddi.datatype.PersonName;
-import org.apache.juddi.datatype.tmodel.TModel;
 import org.apache.juddi.datatype.binding.BindingTemplate;
-import org.apache.juddi.datatype.binding.AccessPoint;
-import org.apache.juddi.datatype.binding.HostingRedirector;
-import org.apache.juddi.datatype.response.*;
-import org.apache.ws.scout.registry.infomodel.InternationalStringImpl;
+import org.apache.juddi.datatype.business.BusinessEntity;
+import org.apache.juddi.datatype.response.AuthToken;
+import org.apache.juddi.datatype.response.BindingDetail;
+import org.apache.juddi.datatype.response.BusinessDetail;
+import org.apache.juddi.datatype.response.DispositionReport;
+import org.apache.juddi.datatype.response.ErrInfo;
+import org.apache.juddi.datatype.response.Result;
+import org.apache.juddi.datatype.response.ServiceDetail;
+import org.apache.juddi.datatype.response.TModelDetail;
+import org.apache.juddi.datatype.service.BusinessService;
+import org.apache.juddi.datatype.tmodel.TModel;
+import org.apache.juddi.error.RegistryException;
 import org.apache.ws.scout.registry.infomodel.KeyImpl;
 import org.apache.ws.scout.util.ScoutJaxrUddiHelper;
 
-import javax.xml.registry.*;
-import javax.xml.registry.infomodel.*;
+import javax.xml.registry.BulkResponse;
+import javax.xml.registry.BusinessLifeCycleManager;
+import javax.xml.registry.DeleteException;
+import javax.xml.registry.InvalidRequestException;
+import javax.xml.registry.JAXRException;
+import javax.xml.registry.JAXRResponse;
+import javax.xml.registry.RegistryService;
+import javax.xml.registry.SaveException;
+import javax.xml.registry.UnexpectedObjectException;
+import javax.xml.registry.LifeCycleManager;
+import javax.xml.registry.infomodel.Association;
+import javax.xml.registry.infomodel.ClassificationScheme;
+import javax.xml.registry.infomodel.Concept;
+import javax.xml.registry.infomodel.Key;
+import javax.xml.registry.infomodel.Organization;
+import javax.xml.registry.infomodel.Service;
+import javax.xml.registry.infomodel.ServiceBinding;
 import javax.xml.registry.infomodel.RegistryObject;
-import java.util.*;
-import java.net.PasswordAuthentication;
 import java.io.Serializable;
+import java.net.PasswordAuthentication;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Iterator;
+import java.util.Set;
+import java.util.Vector;
 
 /**
  * Implements JAXR BusinessLifeCycleManager Interface.
@@ -52,38 +74,121 @@
         super(registry);
     }
 
+    //Override from Base Class
+    public BulkResponse deleteObjects(Collection keys, String objectType) throws JAXRException
+    {
+        BulkResponse  bulk = null;
+
+        if(objectType == LifeCycleManager.ASSOCIATION)
+        {
+            bulk = this.deleteAssociations(keys);
+        } else
+        if(objectType == LifeCycleManager.CLASSIFICATION_SCHEME)
+        {
+            bulk = this.deleteClassificationSchemes(keys);
+        } else
+        if(objectType == LifeCycleManager.CONCEPT)
+        {
+            bulk = this.deleteConcepts(keys);
+        } else
+        if(objectType == LifeCycleManager.ORGANIZATION)
+        {
+            bulk = this.deleteOrganizations(keys) ;
+        } else
+        if(objectType == LifeCycleManager.SERVICE)
+        {
+            bulk = this.deleteServices(keys);
+        }else
+        if(objectType == LifeCycleManager.SERVICE_BINDING)
+        {
+            bulk = this.deleteServiceBindings(keys);
+        }else
+        throw new JAXRException( "Delete Operation for "+objectType + " not implemented by Scout");
+
+        return bulk;
+    }
+
     public BulkResponse deleteAssociations(Collection associationKeys) throws JAXRException
     {
-        return this.deleteOperation(associationKeys,"DELETE_ASSOCIATION");
+        return this.deleteOperation(associationKeys, "DELETE_ASSOCIATION");
     }
 
     public BulkResponse deleteClassificationSchemes(Collection schemeKeys) throws JAXRException
     {
-        return this.deleteOperation(schemeKeys,"DELETE_CLASSIFICATIONSCHEME");
+        return this.deleteOperation(schemeKeys, "DELETE_CLASSIFICATIONSCHEME");
     }
 
     public BulkResponse deleteConcepts(Collection conceptKeys) throws JAXRException
     {
-        return this.deleteOperation(conceptKeys,"DELETE_CONCEPT");
+        return this.deleteOperation(conceptKeys, "DELETE_CONCEPT");
     }
 
     public BulkResponse deleteOrganizations(Collection orgkeys) throws JAXRException
     {
-       return this.deleteOperation(orgkeys,"DELETE_ORG");
+        return this.deleteOperation(orgkeys, "DELETE_ORG");
     }
 
     public BulkResponse deleteServiceBindings(Collection bindingKeys) throws JAXRException
     {
-       return this.deleteOperation(bindingKeys,"DELETE_SERVICEBINDING");
+        return this.deleteOperation(bindingKeys, "DELETE_SERVICEBINDING");
     }
 
     public BulkResponse deleteServices(Collection serviceKeys) throws JAXRException
     {
-        return this.deleteOperation(serviceKeys,"DELETE_SERVICE");
+        return this.deleteOperation(serviceKeys, "DELETE_SERVICE");
     }
 
-    public BulkResponse saveAssociations(Collection associationKeys, boolean replace) throws JAXRException
+    public BulkResponse saveObjects(Collection col ) throws JAXRException
     {
+        BulkResponseImpl bulk = new BulkResponseImpl();
+        Iterator iter = col.iterator();
+        //TODO:Check if juddi can provide a facility to store a collection of heterogenous
+        //objects
+        Collection keys = new ArrayList();
+        Collection suc = new ArrayList();
+        Collection exc = new ArrayList();
+        bulk.setCollection(suc);
+        bulk.setExceptions(exc);
+        while(iter.hasNext())
+        {
+            keys.clear();
+            RegistryObject reg = (RegistryObject)iter.next();
+            keys.add(reg.getKey());
+            BulkResponse  br = null;
+            if(reg instanceof javax.xml.registry.infomodel.Association)
+            {
+                br = saveAssociations(keys, true);
+            } else
+            if(reg instanceof javax.xml.registry.infomodel.ClassificationScheme)
+            {
+                br = saveClassificationSchemes(keys );
+            }
+            else
+            if(reg instanceof javax.xml.registry.infomodel.Concept)
+            {
+                br = saveConcepts(keys );
+            }else
+            if(reg instanceof javax.xml.registry.infomodel.Organization)
+            {
+                br = saveOrganizations(keys );
+            }else
+            if(reg instanceof javax.xml.registry.infomodel.Service)
+            {
+                br = saveServices(keys );
+            }else
+            if(reg instanceof javax.xml.registry.infomodel.ServiceBinding)
+            {
+                br = saveServiceBindings(keys );
+            }
+
+            if(br != null ) updateBulkResponse(bulk,br);
+        }
+
+        return bulk;
+    }
+
+    public BulkResponse saveAssociations(Collection associationKeys, boolean replace) throws JAXRException
+    {    //TODO
         return null;
     }
 
@@ -96,72 +201,92 @@
         Collection coll = new ArrayList();
         Collection exceptions = new ArrayList();
 
-        try
+
+        Iterator iter = schemes.iterator();
+        while (iter.hasNext())
         {
-            Iterator iter = schemes.iterator();
-            while (iter.hasNext())
+            try
             {
                 TModel en =
                         ScoutJaxrUddiHelper.getTModelFromJAXRClassificationScheme((ClassificationScheme) iter.next());
                 entityvect.add(en);
-            }
-            System.out.println("Method:save_classificationscheme: ENlength=" + entityvect.size());
-            // Save business
-            TModelDetail td = (TModelDetail) executeOperation(entityvect, "SAVE_TMODEL");
-
-            entityvect = td.getTModelVector();
-            System.out.println("After Saving TModel. Obtained vector size:" + entityvect.size());
-            for (int i = 0; entityvect != null && i < entityvect.size(); i++)
+            } catch (ClassCastException ce)
             {
-                TModel tm = (TModel) entityvect.elementAt(i);
-                coll.add(new KeyImpl(tm.getTModelKey() ));
+                throw new UnexpectedObjectException();
             }
+        }
+        System.out.println("Method:save_classificationscheme: ENlength=" + entityvect.size());
+        // Save business
+        TModelDetail td = null;
+        try
+        {
+            td = (TModelDetail) executeOperation(entityvect, "SAVE_TMODEL");
+        } catch (RegistryException e)
+        {
+            exceptions.add(new SaveException(e.getLocalizedMessage()));
+            bulk.setStatus(JAXRResponse.STATUS_FAILURE);
+        }
 
-            bulk.setCollection(coll);
-            bulk.setExceptions(exceptions);
-        } catch (Exception tran)
+        entityvect = td.getTModelVector();
+        System.out.println("After Saving TModel. Obtained vector size:" + entityvect.size());
+        for (int i = 0; entityvect != null && i < entityvect.size(); i++)
         {
-            throw new JAXRException("Apache JAXR Impl:", tran);
+            TModel tm = (TModel) entityvect.elementAt(i);
+            coll.add(new KeyImpl(tm.getTModelKey()));
         }
+
+        bulk.setCollection(coll);
+        bulk.setExceptions(exceptions);
+
         return bulk;
     }
 
     public BulkResponse saveConcepts(Collection concepts) throws JAXRException
     {
-       //Now we need to convert the collection into a vector for juddi
+        //Now we need to convert the collection into a vector for juddi
         BulkResponseImpl bulk = new BulkResponseImpl();
         Vector entityvect = new Vector();
 
         Collection coll = new ArrayList();
         Collection exceptions = new ArrayList();
 
-        try
+
+        Iterator iter = concepts.iterator();
+        while (iter.hasNext())
         {
-            Iterator iter = concepts.iterator();
-            while (iter.hasNext())
+            try
             {
                 TModel en =
                         ScoutJaxrUddiHelper.getTModelFromJAXRConcept((Concept) iter.next());
                 entityvect.add(en);
-            }
-            System.out.println("Method:save_concept: ENlength=" + entityvect.size());
-            // Save business
-            TModelDetail td = (TModelDetail) executeOperation(entityvect, "SAVE_TMODEL");
-
-            entityvect = td.getTModelVector();
-            System.out.println("After Saving TModel. Obtained vector size:" + entityvect.size());
-            for (int i = 0; entityvect != null && i < entityvect.size(); i++)
+            } catch (ClassCastException ce)
             {
-                TModel tm = (TModel) entityvect.elementAt(i);
-                coll.add(new KeyImpl(tm.getTModelKey() ));
+                throw new UnexpectedObjectException();
             }
+        }
+        System.out.println("Method:save_concept: ENlength=" + entityvect.size());
+        // Save business
+        TModelDetail td = null;
+        try
+        {
+            td = (TModelDetail) executeOperation(entityvect, "SAVE_TMODEL");
+        } catch (RegistryException e)
+        {
+            exceptions.add(new SaveException(e.getLocalizedMessage()));
+            bulk.setStatus(JAXRResponse.STATUS_FAILURE);
+        }
 
-            bulk.setCollection(coll);
-            bulk.setExceptions(exceptions);
-        } catch (Exception tran)
+        entityvect = td.getTModelVector();
+        System.out.println("After Saving TModel. Obtained vector size:" + entityvect.size());
+        for (int i = 0; entityvect != null && i < entityvect.size(); i++)
         {
-            throw new JAXRException("Apache JAXR Impl:", tran);
+            TModel tm = (TModel) entityvect.elementAt(i);
+            coll.add(new KeyImpl(tm.getTModelKey()));
         }
+
+        bulk.setCollection(coll);
+        bulk.setExceptions(exceptions);
+
         return bulk;
     }
 
@@ -174,33 +299,43 @@
         Collection coll = new ArrayList();
         Collection exceptions = new ArrayList();
 
-        try
+
+        Iterator iter = organizations.iterator();
+        while (iter.hasNext())
         {
-            Iterator iter = organizations.iterator();
-            while (iter.hasNext())
+            try
             {
                 BusinessEntity en =
                         ScoutJaxrUddiHelper.getBusinessEntityFromJAXROrg((Organization) iter.next());
                 entityvect.add(en);
-            }
-            System.out.println("Method:save_business: ENlength=" + entityvect.size());
-            // Save business
-            BusinessDetail bd = (BusinessDetail) executeOperation(entityvect, "SAVE_ORG");
-
-            entityvect = bd.getBusinessEntityVector();
-            System.out.println("After Saving Business. Obtained vector size:" + entityvect.size());
-            for (int i = 0; entityvect != null && i < entityvect.size(); i++)
+            } catch (ClassCastException ce)
             {
-                BusinessEntity entity = (BusinessEntity) entityvect.elementAt(i);
-                coll.add(new KeyImpl(entity.getBusinessKey()));
+                throw new UnexpectedObjectException();
             }
+        }
+        System.out.println("Method:save_business: ENlength=" + entityvect.size());
+        // Save business
+        BusinessDetail bd = null;
+        try
+        {
+            bd = (BusinessDetail) executeOperation(entityvect, "SAVE_ORG");
+        } catch (RegistryException e)
+        {
+            exceptions.add(new SaveException(e.getLocalizedMessage()));
+            bulk.setStatus(JAXRResponse.STATUS_FAILURE);
+        }
 
-            bulk.setCollection(coll);
-            bulk.setExceptions(exceptions);
-        } catch (Exception tran)
+        entityvect = bd.getBusinessEntityVector();
+        System.out.println("After Saving Business. Obtained vector size:" + entityvect.size());
+        for (int i = 0; entityvect != null && i < entityvect.size(); i++)
         {
-            throw new JAXRException("Apache JAXR Impl:", tran);
+            BusinessEntity entity = (BusinessEntity) entityvect.elementAt(i);
+            coll.add(new KeyImpl(entity.getBusinessKey()));
         }
+
+        bulk.setCollection(coll);
+        bulk.setExceptions(exceptions);
+
         return bulk;
     }
 
@@ -212,29 +347,38 @@
         Collection coll = new ArrayList();
         Collection exceptions = new ArrayList();
 
-        try
+        Iterator iter = bindings.iterator();
+        while (iter.hasNext())
         {
-            Iterator iter = bindings.iterator();
-            while (iter.hasNext())
+            try
             {
                 BindingTemplate bs = ScoutJaxrUddiHelper.getBindingTemplateFromJAXRSB((ServiceBinding) iter.next());
                 sbvect.add(bs);
-            }
-            // Save ServiceBinding
-            BindingDetail bd = (BindingDetail) executeOperation(sbvect, "SAVE_SERVICE_BINDING");
-
-            sbvect = bd.getBindingTemplateVector();
-            for (int i = 0; sbvect != null && i < sbvect.size(); i++)
+            } catch (ClassCastException ce)
             {
-                BindingTemplate bt = (BindingTemplate) sbvect.elementAt(i);
-                coll.add(new KeyImpl(bt.getBindingKey()));
+                throw new UnexpectedObjectException();
             }
-            bulk.setCollection(coll);
-            bulk.setExceptions(exceptions);
-        } catch (Exception ud)
+        }
+        // Save ServiceBinding
+        BindingDetail bd = null;
+        try
         {
-            throw new JAXRException("Apache JAXR Impl:", ud);
+            bd = (BindingDetail) executeOperation(sbvect, "SAVE_SERVICE_BINDING");
+        } catch (RegistryException e)
+        {
+            exceptions.add(new SaveException(e.getLocalizedMessage()));
+            bulk.setStatus(JAXRResponse.STATUS_FAILURE);
+        }
+
+        sbvect = bd.getBindingTemplateVector();
+        for (int i = 0; sbvect != null && i < sbvect.size(); i++)
+        {
+            BindingTemplate bt = (BindingTemplate) sbvect.elementAt(i);
+            coll.add(new KeyImpl(bt.getBindingKey()));
         }
+        bulk.setCollection(coll);
+        bulk.setExceptions(exceptions);
+
         return bulk;
     }
 
@@ -246,38 +390,49 @@
         Collection coll = new ArrayList();
         Collection exceptions = new ArrayList();
 
-        try
+
+        Iterator iter = services.iterator();
+        while (iter.hasNext())
         {
-            Iterator iter = services.iterator();
-            while (iter.hasNext())
+            try
             {
                 BusinessService bs = ScoutJaxrUddiHelper.getBusinessServiceFromJAXRService((Service) iter.next());
                 svect.add(bs);
-            }
-            // Save Service
-            ServiceDetail sd = (ServiceDetail) executeOperation(svect, "SAVE_SERVICE");
-
-            svect = sd.getBusinessServiceVector();
-            for (int i = 0; svect != null && i < svect.size(); i++)
+            } catch (ClassCastException ce)
             {
-                BusinessService entity = (BusinessService) svect.elementAt(i);
-                coll.add(new KeyImpl(entity.getBusinessKey()));
+                throw new UnexpectedObjectException();
             }
-            bulk.setCollection(coll);
-            bulk.setExceptions(exceptions);
-        } catch (Exception ud)
+        }
+        // Save Service
+        ServiceDetail sd = null;
+        try
+        {
+            sd = (ServiceDetail) executeOperation(svect, "SAVE_SERVICE");
+        } catch (RegistryException e)
         {
-            throw new JAXRException("Apache JAXR Impl:", ud);
+            exceptions.add(new SaveException(e.getLocalizedMessage()));
+            bulk.setStatus(JAXRResponse.STATUS_FAILURE);
         }
+
+        svect = sd.getBusinessServiceVector();
+        for (int i = 0; svect != null && i < svect.size(); i++)
+        {
+            BusinessService entity = (BusinessService) svect.elementAt(i);
+            coll.add(new KeyImpl(entity.getBusinessKey()));
+        }
+        bulk.setCollection(coll);
+        bulk.setExceptions(exceptions);
+
         return bulk;
     }
 
     public void confirmAssociation(Association assoc) throws JAXRException, InvalidRequestException
     {
+        //TODO
     }
 
     public void unConfirmAssociation(Association assoc) throws JAXRException, InvalidRequestException
-    {
+    {  //TODO
     }
 
     //Protected Methods
@@ -311,17 +466,16 @@
         } else if (op.equalsIgnoreCase("DELETE_SERVICE"))
         {
             regobj = ireg.deleteService(token.getAuthInfo(), datavect);
-        }else if (op.equalsIgnoreCase("DELETE_SERVICEBINDING"))
+        } else if (op.equalsIgnoreCase("DELETE_SERVICEBINDING"))
         {
             regobj = ireg.deleteBinding(token.getAuthInfo(), datavect);
-        }else if (op.equalsIgnoreCase("DELETE_CONCEPT"))
+        } else if (op.equalsIgnoreCase("DELETE_CONCEPT"))
         {
             regobj = ireg.deleteTModel(token.getAuthInfo(), datavect);
         } else if (op.equalsIgnoreCase("DELETE_ASSOCIATION"))
         {
             regobj = ireg.deletePublisherAssertions(token.getAuthInfo(), datavect);
-        }
-        else if (op.equalsIgnoreCase("DELETE_CLASSIFICATIONSCHEME"))
+        } else if (op.equalsIgnoreCase("DELETE_CLASSIFICATIONSCHEME"))
         {
             regobj = ireg.deleteTModel(token.getAuthInfo(), datavect);
         } else
@@ -333,9 +487,9 @@
 
 
     protected BulkResponse deleteOperation(Collection keys, String op)
-    throws JAXRException
+            throws JAXRException
     {
-      //Now we need to convert the collection into a vector for juddi
+        //Now we need to convert the collection into a vector for juddi
         BulkResponseImpl bulk = new BulkResponseImpl();
         Vector keyvect = new Vector();
 
@@ -347,10 +501,10 @@
             Iterator iter = keys.iterator();
             while (iter.hasNext())
             {
-                Key key = (Key)iter.next();
+                Key key = (Key) iter.next();
                 keyvect.add(key.getId());
             }
-            System.out.println("Method:"+op+": ENlength=" + keyvect.size());
+            System.out.println("Method:" + op + ": ENlength=" + keyvect.size());
             // Save business
             DispositionReport bd = (DispositionReport) executeOperation(keyvect, op);
 
@@ -360,11 +514,13 @@
             {
                 Result result = (Result) keyvect.elementAt(i);
                 int errno = result.getErrno();
-                if(errno == 0) coll.addAll(keys);
+                if (errno == 0)
+                    coll.addAll(keys);
                 else
                 {
                     ErrInfo errinfo = result.getErrInfo();
-                    DeleteException de = new DeleteException(errinfo.getErrCode()+":"+errinfo.getErrMsg());
+                    DeleteException de = new DeleteException(errinfo.getErrCode() + ":" + errinfo.getErrMsg());
+                    bulk.setStatus(JAXRResponse.STATUS_FAILURE);
                     exceptions.add(de);
                 }
             }
@@ -373,7 +529,9 @@
             bulk.setExceptions(exceptions);
         } catch (Exception tran)
         {
-            throw new JAXRException("Apache JAXR Impl:", tran);
+            exceptions.add(new JAXRException("Apache JAXR Impl:", tran));
+            bulk.setStatus(JAXRResponse.STATUS_FAILURE);
+            bulk.setExceptions(exceptions);
         }
         return bulk;
     }
@@ -408,6 +566,15 @@
             throw new JAXRException(e);
         }
         return token;
+    }
+
+    private void updateBulkResponse(BulkResponseImpl bulk, BulkResponse  br)
+    throws JAXRException
+    {
+        bulk.getCollection().addAll(br.getCollection());
+        bulk.getExceptions().addAll(br.getExceptions());
+        if(bulk.getStatus() == JAXRResponse.STATUS_SUCCESS)
+            bulk.setStatus(br.getStatus());
     }
 
 }

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BusinessQueryManagerImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BusinessQueryManagerImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BusinessQueryManagerImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BusinessQueryManagerImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BusinessQueryManagerImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/BusinessQueryManagerImpl.java	Sun Jan 23 00:30:26 2005
@@ -18,29 +18,31 @@
 
 import org.apache.juddi.IRegistry;
 import org.apache.juddi.datatype.Name;
+import org.apache.juddi.datatype.business.BusinessEntity;
 import org.apache.juddi.datatype.request.FindQualifiers;
+import org.apache.juddi.datatype.response.BusinessDetail;
 import org.apache.juddi.datatype.response.BusinessInfo;
 import org.apache.juddi.datatype.response.BusinessList;
-import org.apache.juddi.datatype.response.BusinessDetail;
-import org.apache.juddi.datatype.response.TModelList;
+import org.apache.juddi.datatype.response.TModelDetail;
 import org.apache.juddi.datatype.response.TModelInfo;
 import org.apache.juddi.datatype.response.TModelInfos;
+import org.apache.juddi.datatype.response.TModelList;
 import org.apache.juddi.datatype.tmodel.TModel;
 import org.apache.juddi.error.RegistryException;
 import org.apache.ws.scout.registry.infomodel.ClassificationSchemeImpl;
-import org.apache.ws.scout.registry.infomodel.KeyImpl;
 import org.apache.ws.scout.registry.infomodel.InternationalStringImpl;
-import org.apache.ws.scout.util.ScoutUddiJaxrHelper;
+import org.apache.ws.scout.registry.infomodel.KeyImpl;
 import org.apache.ws.scout.util.EnumerationHelper;
+import org.apache.ws.scout.util.ScoutUddiJaxrHelper;
 
 import javax.xml.registry.BulkResponse;
 import javax.xml.registry.BusinessQueryManager;
 import javax.xml.registry.FindQualifier;
+import javax.xml.registry.InvalidRequestException;
 import javax.xml.registry.JAXRException;
 import javax.xml.registry.LifeCycleManager;
 import javax.xml.registry.RegistryService;
 import javax.xml.registry.UnsupportedCapabilityException;
-import javax.xml.registry.InvalidRequestException;
 import javax.xml.registry.infomodel.ClassificationScheme;
 import javax.xml.registry.infomodel.Concept;
 import javax.xml.registry.infomodel.Key;
@@ -87,9 +89,9 @@
             FindQualifiers juddiFindQualifiers = mapFindQualifiers(findQualifiers);
             Vector nameVector = mapNamePatterns(namePatterns);
             BusinessList result = registry.findBusiness(nameVector,
-                                                   null, null, null, null,
-                                                   juddiFindQualifiers,
-                                                   registryService.getMaxRows());
+                    null, null, null, null,
+                    juddiFindQualifiers,
+                    registryService.getMaxRows());
             Vector v = result.getBusinessInfos().getBusinessInfoVector();
             Collection orgs = new ArrayList();
             int len = 0;
@@ -158,8 +160,10 @@
             scheme = new ClassificationSchemeImpl(registryService.getLifeCycleManagerImpl());
             scheme.setName(new InternationalStringImpl("ntis-gov:naics"));
             scheme.setKey(new KeyImpl(TModel.NAICS_TMODEL_KEY));
-        }else
-        {
+        } else
+        {   //TODO:Before going to the registry, check if it a predefined Enumeration
+
+
             //Lets ask the uddi registry if it has the TModels
             IRegistry registry = registryService.getRegistry();
             FindQualifiers juddiFindQualifiers = mapFindQualifiers(findQualifiers);
@@ -168,18 +172,18 @@
             try
             {
                 //We are looking for one exact match, so getting upto 3 records is fine
-                TModelList list = registry.findTModel(namePatterns,null,null,juddiFindQualifiers,3);
+                TModelList list = registry.findTModel(namePatterns, null, null, juddiFindQualifiers, 3);
                 TModelInfos infos = null;
                 Vector tmvect = null;
-                if( list != null )   infos  = list.getTModelInfos();
-                if(infos != null ) tmvect =  infos.getTModelInfoVector() ;
-                if(tmvect != null )
+                if (list != null) infos = list.getTModelInfos();
+                if (infos != null) tmvect = infos.getTModelInfoVector();
+                if (tmvect != null)
                 {
-                    if(  tmvect.size() > 1)
-                     throw new InvalidRequestException("Multiple matches found");
-                    
-                    TModelInfo info = (TModelInfo)tmvect.elementAt(0);
-                    scheme.setName( new InternationalStringImpl(info.getName().getValue()));
+                    if (tmvect.size() > 1)
+                        throw new InvalidRequestException("Multiple matches found");
+
+                    TModelInfo info = (TModelInfo) tmvect.elementAt(0);
+                    scheme.setName(new InternationalStringImpl(info.getName().getValue()));
                     scheme.setKey(new KeyImpl(info.getTModelKey()));
                 }
 
@@ -216,7 +220,37 @@
                                      Collection externalIdentifiers,
                                      Collection externalLinks) throws JAXRException
     {
-        return null;
+        Collection col = new ArrayList();
+
+        //Lets ask the uddi registry if it has the TModels
+        IRegistry registry = registryService.getRegistry();
+        FindQualifiers juddiFindQualifiers = mapFindQualifiers(findQualifiers);
+        Iterator iter = null;
+        if (namePatterns != null) iter = namePatterns.iterator();
+        while (iter.hasNext())
+        {
+            String namestr = (String) iter.next();
+            try
+            {
+                TModelList list = registry.findTModel(namestr, null, null, juddiFindQualifiers, 10);
+                TModelInfos infos = null;
+                Vector tmvect = null;
+                if (list != null) infos = list.getTModelInfos();
+                if (infos != null) tmvect = infos.getTModelInfoVector();
+                for (int i = 0; tmvect != null && i < tmvect.size(); i++)
+                {
+                    TModelInfo info = (TModelInfo) tmvect.elementAt(i);
+                    col.add(ScoutUddiJaxrHelper.getConcept(info, this.registryService.getBusinessLifeCycleManager()));
+                }
+
+            } catch (RegistryException e)
+            {
+                e.printStackTrace();
+                throw new JAXRException(e.getLocalizedMessage());
+            }
+        }
+
+        return new BulkResponseImpl(col);
     }
 
     public BulkResponse findRegistryPackages(Collection findQualifiers,
@@ -254,18 +288,41 @@
         RegistryObject regobj = null;
         if (LifeCycleManager.CLASSIFICATION_SCHEME.equalsIgnoreCase(objectType))
         {
-            regobj = new ClassificationSchemeImpl(registryService.getLifeCycleManagerImpl());
-            regobj.setKey(new KeyImpl(id));
-        }if (LifeCycleManager.ORGANIZATION.equalsIgnoreCase(objectType))
+            try
+            {
+                TModelDetail tmodeldetail = registry.getTModelDetail(id);
+                regobj = (RegistryObject) ScoutUddiJaxrHelper.getConcept(tmodeldetail, registryService.getBusinessLifeCycleManager());
+
+            } catch (RegistryException e)
+            {
+                e.printStackTrace();
+                throw new JAXRException(e.getLocalizedMessage());
+            }
+        }
+        if (LifeCycleManager.ORGANIZATION.equalsIgnoreCase(objectType))
         {
             //Get the Organization from the uddi registry
             try
             {
                 BusinessDetail orgdetail = registry.getBusinessDetail(id);
-                regobj = (RegistryObject)ScoutUddiJaxrHelper.getOrganization(orgdetail,registryService.getBusinessLifeCycleManager());
+                regobj = (RegistryObject) ScoutUddiJaxrHelper.getOrganization(orgdetail, registryService.getBusinessLifeCycleManager());
+            } catch (RegistryException e)
+            {
+                e.printStackTrace();
+                throw new JAXRException(e.getLocalizedMessage());
+            }
+        }
+        if (LifeCycleManager.CONCEPT.equalsIgnoreCase(objectType))
+        {
+            try
+            {
+                TModelDetail tmodeldetail = registry.getTModelDetail(id);
+                regobj = (RegistryObject) ScoutUddiJaxrHelper.getConcept(tmodeldetail, registryService.getBusinessLifeCycleManager());
+
             } catch (RegistryException e)
             {
                 e.printStackTrace();
+                throw new JAXRException(e.getLocalizedMessage());
             }
         }
         return regobj;
@@ -281,9 +338,74 @@
         return null;
     }
 
-    public BulkResponse getRegistryObjects(Collection objectKeys, String objectTypes) throws JAXRException
+    public BulkResponse getRegistryObjects(Collection objectKeys, String objectType) throws JAXRException
     {
-        return null;
+        IRegistry registry = registryService.getRegistry();
+        //Convert into a vector of strings
+        Vector keys = new Vector();
+        Iterator iter = objectKeys.iterator();
+        while(iter.hasNext())
+        {
+            Key key = (Key)iter.next();
+            keys.add(key.getId());
+        }
+        Collection col = new ArrayList();
+        LifeCycleManager lcm = registryService.getLifeCycleManagerImpl();
+
+        RegistryObject regobj = null;
+        if (LifeCycleManager.CLASSIFICATION_SCHEME.equalsIgnoreCase(objectType))
+        {
+            try
+            {
+                TModelDetail tmodeldetail = registry.getTModelDetail(keys);
+                Vector tmvect = tmodeldetail.getTModelVector();
+                for (int i = 0; tmvect != null && i < tmvect.size(); i++)
+                {
+                    col.add(ScoutUddiJaxrHelper.getConcept((TModel) tmvect.elementAt(i), lcm));
+                }
+
+            } catch (RegistryException e)
+            {
+                e.printStackTrace();
+                throw new JAXRException(e.getLocalizedMessage());
+            }
+        }
+        if (LifeCycleManager.ORGANIZATION.equalsIgnoreCase(objectType))
+        {
+            //Get the Organization from the uddi registry
+            try
+            {
+                BusinessDetail orgdetail = registry.getBusinessDetail(keys);
+                Vector bizvect = orgdetail.getBusinessEntityVector();
+                for (int i = 0; bizvect != null && i < bizvect.size(); i++)
+                {
+                    col.add(ScoutUddiJaxrHelper.getOrganization((BusinessEntity) bizvect.elementAt(i), lcm));
+                }
+            } catch (RegistryException e)
+            {
+                e.printStackTrace();
+                throw new JAXRException(e.getLocalizedMessage());
+            }
+        }
+        if (LifeCycleManager.CONCEPT.equalsIgnoreCase(objectType))
+        {
+            try
+            {
+                TModelDetail tmodeldetail = registry.getTModelDetail(keys);
+                Vector tmvect = tmodeldetail.getTModelVector();
+                for (int i = 0; tmvect != null && i < tmvect.size(); i++)
+                {
+                    col.add(ScoutUddiJaxrHelper.getConcept((TModel) tmvect.elementAt(i), lcm));
+                }
+
+            } catch (RegistryException e)
+            {
+                e.printStackTrace();
+                throw new JAXRException(e.getLocalizedMessage());
+            }
+        }
+        return new BulkResponseImpl(col);
+
     }
 
     public BulkResponse getRegistryObjects(String objectTypes) throws JAXRException

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/CapabilityProfileImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/CapabilityProfileImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/CapabilityProfileImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/CapabilityProfileImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/CapabilityProfileImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/CapabilityProfileImpl.java	Sun Jan 23 00:30:26 2005
@@ -21,15 +21,19 @@
 
 /**
  * Implements CapabilityProfile of JAXR API
+ *
  * @author Jeremy Boynes <jb...@apache.org>
  * @author Anil Saldhana  <an...@apache.org>
  */
-public class CapabilityProfileImpl implements CapabilityProfile {
-    public int getCapabilityLevel() throws JAXRException {
+public class CapabilityProfileImpl implements CapabilityProfile
+{
+    public int getCapabilityLevel() throws JAXRException
+    {
         return 0;
     }
 
-    public String getVersion() throws JAXRException {
+    public String getVersion() throws JAXRException
+    {
         return "1.0";
     }
 }

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/ConnectionFactoryImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/ConnectionFactoryImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/ConnectionFactoryImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/ConnectionFactoryImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/ConnectionFactoryImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/ConnectionFactoryImpl.java	Sun Jan 23 00:30:26 2005
@@ -36,7 +36,8 @@
  * @author Anil Saldhana  <an...@apache.org>
  * @author Jeremy Boynes  <jb...@apache.org>
  */
-public class ConnectionFactoryImpl extends ConnectionFactory implements Serializable {
+public class ConnectionFactoryImpl extends ConnectionFactory implements Serializable
+{
     private static final String QUERYMANAGER_PROPERTY = "javax.xml.registry.queryManagerURL";
     private static final String LIFECYCLEMANAGER_PROPERTY = "javax.xml.registry.lifeCycleManagerURL";
     private static final String SEMANTICEQUIVALENCES_PROPERTY = "javax.xml.registry.semanticEquivalences";
@@ -55,29 +56,37 @@
      * Public no-arg constructor so that this ConnectionFactory can be
      * instantiated by the JAXR ConnectionFactory;
      */
-    public ConnectionFactoryImpl() {
+    public ConnectionFactoryImpl()
+    {
     }
 
-    public Connection createConnection() throws JAXRException {
-        if (queryManagerURL == null) {
+    public Connection createConnection() throws JAXRException
+    {
+        if (queryManagerURL == null)
+        {
             throw new InvalidRequestException("queryManager is not set");
         }
         URL queryManager;
         URL lifeCycleManager;
-        try {
+        try
+        {
             queryManager = new URL(queryManagerURL);
-        } catch (MalformedURLException e) {
+        } catch (MalformedURLException e)
+        {
             throw new InvalidRequestException("Invalid queryManagerURL: " + queryManagerURL, e);
         }
-        try {
+        try
+        {
             lifeCycleManager = lifeCycleManagerURL == null ? queryManager : new URL(lifeCycleManagerURL);
-        } catch (MalformedURLException e) {
+        } catch (MalformedURLException e)
+        {
             throw new InvalidRequestException("Invalid lifeCycleManagerURL: " + lifeCycleManagerURL, e);
         }
         return new ConnectionImpl(queryManager, lifeCycleManager, null, maxRows == null ? -1 : maxRows.intValue());
     }
 
-    public FederatedConnection createFederatedConnection(Collection collection) throws JAXRException {
+    public FederatedConnection createFederatedConnection(Collection collection) throws JAXRException
+    {
         throw new UnsupportedCapabilityException("FederatedConnections are not supported in this release");
     }
 
@@ -88,24 +97,31 @@
      *
      * @return a Properties object containing the properies that will be used to create Connection
      */
-    public Properties getProperties() {
+    public Properties getProperties()
+    {
         Properties props = new Properties();
-        if (queryManagerURL != null) {
+        if (queryManagerURL != null)
+        {
             props.put(QUERYMANAGER_PROPERTY, queryManagerURL);
         }
-        if (lifeCycleManagerURL != null) {
+        if (lifeCycleManagerURL != null)
+        {
             props.put(LIFECYCLEMANAGER_PROPERTY, lifeCycleManagerURL);
         }
-        if (semanticEquivalences != null) {
+        if (semanticEquivalences != null)
+        {
             props.put(SEMANTICEQUIVALENCES_PROPERTY, semanticEquivalences);
         }
-        if (postalAddressScheme != null) {
+        if (postalAddressScheme != null)
+        {
             props.put(POSTALADDRESSSCHEME_PROPERTY, postalAddressScheme);
         }
-        if (authenticationMethod != null) {
+        if (authenticationMethod != null)
+        {
             props.put(AUTHENTICATIONMETHOD_PROPERTY, authenticationMethod);
         }
-        if (maxRows != null) {
+        if (maxRows != null)
+        {
             props.put(MAXROWS_PROPERTY, maxRows.toString());
         }
         return props;
@@ -116,7 +132,8 @@
      *
      * @param properties the new properties for this ConnectionFactory
      */
-    public void setProperties(Properties properties) {
+    public void setProperties(Properties properties)
+    {
         queryManagerURL = properties.getProperty(QUERYMANAGER_PROPERTY);
         lifeCycleManagerURL = properties.getProperty(LIFECYCLEMANAGER_PROPERTY);
         semanticEquivalences = properties.getProperty(SEMANTICEQUIVALENCES_PROPERTY);
@@ -126,55 +143,68 @@
         maxRows = (val == null) ? null : Integer.valueOf(val);
     }
 
-    public static ConnectionFactory newInstance() {
+    public static ConnectionFactory newInstance()
+    {
         return new ConnectionFactoryImpl();
     }
 
-    public String getAuthenticationMethod() {
+    public String getAuthenticationMethod()
+    {
         return authenticationMethod;
     }
 
-    public void setAuthenticationMethod(String authenticationMethod) {
+    public void setAuthenticationMethod(String authenticationMethod)
+    {
         this.authenticationMethod = authenticationMethod;
     }
 
-    public String getLifeCycleManagerURL() {
+    public String getLifeCycleManagerURL()
+    {
         return lifeCycleManagerURL;
     }
 
-    public void setLifeCycleManagerURL(String lifeCycleManagerURL) {
+    public void setLifeCycleManagerURL(String lifeCycleManagerURL)
+    {
         this.lifeCycleManagerURL = lifeCycleManagerURL;
     }
 
-    public Integer getMaxRows() {
+    public Integer getMaxRows()
+    {
         return maxRows;
     }
 
-    public void setMaxRows(Integer maxRows) {
+    public void setMaxRows(Integer maxRows)
+    {
         this.maxRows = maxRows;
     }
 
-    public String getPostalAddressScheme() {
+    public String getPostalAddressScheme()
+    {
         return postalAddressScheme;
     }
 
-    public void setPostalAddressScheme(String postalAddressScheme) {
+    public void setPostalAddressScheme(String postalAddressScheme)
+    {
         this.postalAddressScheme = postalAddressScheme;
     }
 
-    public String getQueryManagerURL() {
+    public String getQueryManagerURL()
+    {
         return queryManagerURL;
     }
 
-    public void setQueryManagerURL(String queryManagerURL) {
+    public void setQueryManagerURL(String queryManagerURL)
+    {
         this.queryManagerURL = queryManagerURL;
     }
 
-    public String getSemanticEquivalences() {
+    public String getSemanticEquivalences()
+    {
         return semanticEquivalences;
     }
 
-    public void setSemanticEquivalences(String semanticEquivalences) {
+    public void setSemanticEquivalences(String semanticEquivalences)
+    {
         this.semanticEquivalences = semanticEquivalences;
     }
 }

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/ConnectionImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/ConnectionImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/ConnectionImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/ConnectionImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/ConnectionImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/ConnectionImpl.java	Sun Jan 23 00:30:26 2005
@@ -17,15 +17,14 @@
 package org.apache.ws.scout.registry;
 
 import org.apache.juddi.proxy.RegistryProxy;
-import org.apache.juddi.proxy.Transport;
 
 import javax.xml.registry.Connection;
 import javax.xml.registry.JAXRException;
 import javax.xml.registry.RegistryService;
+import java.io.Serializable;
 import java.net.URL;
-import java.util.Set;
 import java.util.Properties;
-import java.io.Serializable;
+import java.util.Set;
 
 /**
  * Apache Scout Implementation of a JAXR Connection.
@@ -33,7 +32,8 @@
  *
  * @author Anil Saldhana  <an...@apache.org>
  */
-public class ConnectionImpl implements Connection, Serializable {
+public class ConnectionImpl implements Connection, Serializable
+{
     private boolean closed = false;
     private boolean synchronous = true;
     private Set credentials;
@@ -41,7 +41,8 @@
     private final String postalScheme;
     private final int maxRows;
 
-    public ConnectionImpl(URL queryManagerURL, URL lifeCycleManagerURL, String postalScheme, int maxRows) {
+    public ConnectionImpl(URL queryManagerURL, URL lifeCycleManagerURL, String postalScheme, int maxRows)
+    {
         Properties prop = new Properties();
         /**
          * If you want to override any of the properties
@@ -49,7 +50,7 @@
          * accordingly.
          */
         String transport = System.getProperty("juddi.proxy.transportClass");
-        if( transport != null) prop.setProperty("juddi.proxy.transportClass",transport);
+        if (transport != null) prop.setProperty("juddi.proxy.transportClass", transport);
         /**
          * Even if the properties passed contains no values,
          * juddi takes default values
@@ -62,33 +63,40 @@
 
     }
 
-    public RegistryService getRegistryService() throws JAXRException {
+    public RegistryService getRegistryService() throws JAXRException
+    {
         RegistryServiceImpl reg = new RegistryServiceImpl(registry, postalScheme, maxRows);
         reg.setConnection(this);
         return reg;
     }
 
-    public void close() {
+    public void close()
+    {
         closed = true;
     }
 
-    public boolean isClosed() {
+    public boolean isClosed()
+    {
         return closed;
     }
 
-    public Set getCredentials() {
+    public Set getCredentials()
+    {
         return credentials;
     }
 
-    public void setCredentials(Set credentials) {
+    public void setCredentials(Set credentials)
+    {
         this.credentials = credentials;
     }
 
-    public boolean isSynchronous() {
+    public boolean isSynchronous()
+    {
         return synchronous;
     }
 
-    public void setSynchronous(boolean synchronous) {
+    public void setSynchronous(boolean synchronous)
+    {
         this.synchronous = synchronous;
     }
 }

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/LifeCycleManagerImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/LifeCycleManagerImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/LifeCycleManagerImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/LifeCycleManagerImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/LifeCycleManagerImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/LifeCycleManagerImpl.java	Sun Jan 23 00:30:26 2005
@@ -18,11 +18,9 @@
 
 import org.apache.juddi.datatype.Description;
 import org.apache.juddi.datatype.Name;
-import org.apache.juddi.datatype.service.BusinessServices;
-import org.apache.juddi.datatype.business.BusinessEntity;
+import org.apache.juddi.datatype.response.BusinessDetail;
 import org.apache.juddi.datatype.response.BusinessInfo;
 import org.apache.juddi.datatype.response.ServiceInfo;
-import org.apache.juddi.datatype.response.BusinessDetail;
 import org.apache.ws.scout.registry.infomodel.*;
 import org.apache.ws.scout.util.ScoutUddiJaxrHelper;
 
@@ -33,33 +31,13 @@
 import javax.xml.registry.LifeCycleManager;
 import javax.xml.registry.RegistryService;
 import javax.xml.registry.UnsupportedCapabilityException;
-import javax.xml.registry.infomodel.Association;
-import javax.xml.registry.infomodel.Classification;
-import javax.xml.registry.infomodel.ClassificationScheme;
-import javax.xml.registry.infomodel.Concept;
-import javax.xml.registry.infomodel.EmailAddress;
-import javax.xml.registry.infomodel.ExternalIdentifier;
-import javax.xml.registry.infomodel.ExternalLink;
-import javax.xml.registry.infomodel.ExtrinsicObject;
-import javax.xml.registry.infomodel.InternationalString;
-import javax.xml.registry.infomodel.Key;
-import javax.xml.registry.infomodel.LocalizedString;
-import javax.xml.registry.infomodel.Organization;
-import javax.xml.registry.infomodel.PersonName;
-import javax.xml.registry.infomodel.PostalAddress;
-import javax.xml.registry.infomodel.RegistryObject;
-import javax.xml.registry.infomodel.RegistryPackage;
-import javax.xml.registry.infomodel.Service;
-import javax.xml.registry.infomodel.ServiceBinding;
-import javax.xml.registry.infomodel.Slot;
-import javax.xml.registry.infomodel.SpecificationLink;
-import javax.xml.registry.infomodel.TelephoneNumber;
-import javax.xml.registry.infomodel.User;
+import javax.xml.registry.infomodel.*;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
 import java.util.Locale;
 import java.util.Vector;
+import java.util.Iterator;
 
 /**
  * Implements JAXR LifeCycleManager Interface
@@ -73,7 +51,7 @@
 
     public LifeCycleManagerImpl(RegistryService registry)
     {
-        this.registry = (RegistryServiceImpl)registry;
+        this.registry = (RegistryServiceImpl) registry;
     }
 
     public RegistryService getRegistryService()
@@ -132,7 +110,7 @@
             return new PostalAddressImpl(registry.getDefaultPostalScheme());
         } else if (LifeCycleManager.REGISTRY_ENTRY.equals(interfaceName))
         {
-            return new RegistryEntryImpl(this);
+            throw new UnsupportedCapabilityException();
         } else if (LifeCycleManager.REGISTRY_PACKAGE.equals(interfaceName))
         {
             throw new UnsupportedCapabilityException();
@@ -141,7 +119,7 @@
             return new ServiceImpl(this);
         } else if (LifeCycleManager.SERVICE_BINDING.equals(interfaceName))
         {
-            throw new UnsupportedCapabilityException();
+            return new ServiceBindingImpl(this);
         } else if (LifeCycleManager.SLOT.equals(interfaceName))
         {
             return new SlotImpl();
@@ -165,7 +143,7 @@
 
     public Association createAssociation(RegistryObject targetObject, Concept associationType) throws JAXRException
     {
-        Association assoc =  (Association) this.createObject(LifeCycleManager.ASSOCIATION);
+        Association assoc = (Association) this.createObject(LifeCycleManager.ASSOCIATION);
         assoc.setTargetObject(targetObject);
         assoc.setAssociationType(associationType);
         return assoc;
@@ -173,9 +151,9 @@
 
     public Classification createClassification(Concept concept) throws JAXRException, InvalidRequestException
     {
-        if(concept.getClassificationScheme() == null )
+        if (concept.getClassificationScheme() == null)
             throw new InvalidRequestException("Concept is not under classification scheme");
-        Classification classify =  (Classification) this.createObject(LifeCycleManager.CLASSIFICATION);
+        Classification classify = (Classification) this.createObject(LifeCycleManager.CLASSIFICATION);
         classify.setConcept(concept);
         return classify;
     }
@@ -193,7 +171,7 @@
 
     public Classification createClassification(ClassificationScheme scheme,
                                                String name, String value)
-    throws JAXRException
+            throws JAXRException
     {
         return createClassification(scheme, this.createInternationalString(name), value);
     }
@@ -201,8 +179,8 @@
     public ClassificationScheme createClassificationScheme(Concept concept) throws JAXRException, InvalidRequestException
     {
         //Check if the passed concept has a classificationscheme or has a parent concept
-        if(concept.getParentConcept() != null || concept.getClassificationScheme() != null )
-           throw new InvalidRequestException("Concept has classificationscheme or has a parent");
+        if (concept.getParentConcept() != null || concept.getClassificationScheme() != null)
+            throw new InvalidRequestException("Concept has classificationscheme or has a parent");
 
 
         ClassificationScheme cs = new ClassificationSchemeImpl(this);
@@ -212,7 +190,7 @@
 
     public ClassificationScheme createClassificationScheme(InternationalString name,
                                                            InternationalString des)
-    throws JAXRException, InvalidRequestException
+            throws JAXRException, InvalidRequestException
     {
         ClassificationScheme cs = new ClassificationSchemeImpl(this);
         cs.setName(name);
@@ -220,17 +198,18 @@
         return cs;
     }
 
-    public ClassificationScheme createClassificationScheme(String name, String desc )
-    throws JAXRException, InvalidRequestException
+    public ClassificationScheme createClassificationScheme(String name, String desc)
+            throws JAXRException, InvalidRequestException
     {
         return createClassificationScheme(this.createInternationalString(name),
                 this.createInternationalString(desc));
     }
 
     public Concept createConcept(RegistryObject parent, InternationalString name, String value)
-    throws JAXRException
+            throws JAXRException
     {
         ConceptImpl concept = new ConceptImpl(this);
+        concept.setClassificationScheme((ClassificationScheme)parent);
         concept.setParent(parent);
         concept.setName(name);
         concept.setValue(value);
@@ -239,7 +218,7 @@
 
     public Concept createConcept(RegistryObject parent, String name, String value) throws JAXRException
     {
-        return createConcept(parent,this.createInternationalString(name),value);
+        return createConcept(parent, this.createInternationalString(name), value);
     }
 
     public EmailAddress createEmailAddress(String address) throws JAXRException
@@ -249,35 +228,35 @@
 
     public EmailAddress createEmailAddress(String address, String type) throws JAXRException
     {
-        return new EmailAddressImpl(address,type);
+        return new EmailAddressImpl(address, type);
     }
 
     public ExternalIdentifier createExternalIdentifier(ClassificationScheme ids,
                                                        InternationalString name,
                                                        String value) throws JAXRException
     {
-        return new ExternalIdentifierImpl(this,ids,name,value);
+        return new ExternalIdentifierImpl(this, ids, name, value);
     }
 
     public ExternalIdentifier createExternalIdentifier(ClassificationScheme ids,
                                                        String name, String value) throws JAXRException
     {
-        return createExternalIdentifier(ids,this.createInternationalString(name),value);
-    }
-
-    public ExternalLink createExternalLink(String externalURI, InternationalString description) throws JAXRException
-    {
-        return null;
+        return createExternalIdentifier(ids, this.createInternationalString(name), value);
     }
 
-    public ExternalLink createExternalLink(String uri, String desc ) throws JAXRException
+    public ExternalLink createExternalLink(String uri, InternationalString desc) throws JAXRException
     {
         ExternalLink ext = new ExternalLinkImpl(this);
         ext.setExternalURI(uri);
-        ext.setDescription(this.createInternationalString(desc));
+        ext.setDescription(desc);
         return ext;
     }
 
+    public ExternalLink createExternalLink(String uri, String desc) throws JAXRException
+    {
+        return createExternalLink(uri, createInternationalString(desc));
+    }
+
     public InternationalString createInternationalString() throws JAXRException
     {
         return new InternationalStringImpl();
@@ -310,7 +289,7 @@
 
     public Organization createOrganization(InternationalString name) throws JAXRException
     {
-        Organization org =  (Organization) this.createObject(LifeCycleManager.ORGANIZATION);
+        Organization org = (Organization) this.createObject(LifeCycleManager.ORGANIZATION);
         org.setName(name);
         return org;
     }
@@ -324,7 +303,7 @@
 
     public PersonName createPersonName(String fullName) throws JAXRException
     {
-        PersonName pn =  (PersonName) this.createObject(LifeCycleManager.PERSON_NAME);
+        PersonName pn = (PersonName) this.createObject(LifeCycleManager.PERSON_NAME);
         pn.setFullName(fullName);
         return pn;
     }
@@ -356,7 +335,7 @@
 
     public Service createService(String name) throws JAXRException
     {
-        return  createService(this.createInternationalString(name));
+        return createService(this.createInternationalString(name));
     }
 
     public ServiceBinding createServiceBinding() throws JAXRException
@@ -365,7 +344,8 @@
     }
 
     public Slot createSlot(String name, String value, String slotType) throws JAXRException
-    {   Collection col = new ArrayList();
+    {
+        Collection col = new ArrayList();
         col.add(value);
         Slot slot = (Slot) this.createObject(LifeCycleManager.SLOT);
         slot.setName(name);
@@ -400,12 +380,16 @@
 
     public BulkResponse deleteObjects(Collection keys, String objectType) throws JAXRException
     {
-        return null;
+        BulkResponse bulk = new BulkResponseImpl();
+
+        return bulk;
     }
 
-    public BulkResponse saveObjects(Collection objects) throws JAXRException
+    public BulkResponse saveObjects(Collection col ) throws JAXRException
     {
-        return null;
+        BulkResponse bulk = new BulkResponseImpl();
+
+        return bulk;
     }
 
     /*************************************************************************
@@ -484,7 +468,7 @@
 
     Organization createOrganization(BusinessDetail detail) throws JAXRException
     {
-        return ScoutUddiJaxrHelper.getOrganization(detail,this);
+        return ScoutUddiJaxrHelper.getOrganization(detail, this);
     }
 
     Service createService(ServiceInfo info) throws JAXRException

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/RegistryServiceImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/RegistryServiceImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/RegistryServiceImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/RegistryServiceImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/RegistryServiceImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/RegistryServiceImpl.java	Sun Jan 23 00:30:26 2005
@@ -35,10 +35,12 @@
 /**
  * Scout implementation of javax.xml.registry.RegistryService
  * For futher details, look into the JAXR API Javadoc.
+ *
  * @author Anil Saldhana  <an...@apache.org>
  * @author Jeremy Boynes <jb...@apache.org>
  */
-public class RegistryServiceImpl implements RegistryService {
+public class RegistryServiceImpl implements RegistryService
+{
     private final RegistryProxy registry;
     private final BusinessQueryManagerImpl queryManager;
     private final BusinessLifeCycleManagerImpl lifeCycleManager;
@@ -47,71 +49,84 @@
     private final int maxRows;
 
 
-    private  ConnectionImpl connection;
+    private ConnectionImpl connection;
 
-    public RegistryServiceImpl(RegistryProxy registry, String postalScheme, int maxRows) {
+    public RegistryServiceImpl(RegistryProxy registry, String postalScheme, int maxRows)
+    {
         this.registry = registry;
         this.maxRows = maxRows;
         queryManager = new BusinessQueryManagerImpl(this);
         lifeCycleManager = new BusinessLifeCycleManagerImpl(this);
-        if (postalScheme == null) {
+        if (postalScheme == null)
+        {
             this.postalScheme = null;
-        } else {
+        } else
+        {
             this.postalScheme = new ClassificationSchemeImpl(lifeCycleManager);
             this.postalScheme.setKey(new KeyImpl(postalScheme));
         }
     }
 
-    IRegistry getRegistry() {
+    IRegistry getRegistry()
+    {
         return registry;
     }
 
-    BusinessLifeCycleManagerImpl getLifeCycleManagerImpl() {
+    BusinessLifeCycleManagerImpl getLifeCycleManagerImpl()
+    {
         return lifeCycleManager;
     }
 
-    int getMaxRows() {
+    int getMaxRows()
+    {
         return maxRows;
     }
 
-    public CapabilityProfile getCapabilityProfile() {
+    public CapabilityProfile getCapabilityProfile()
+    {
         return new CapabilityProfileImpl();
     }
 
-    public BusinessQueryManager getBusinessQueryManager() throws JAXRException {
+    public BusinessQueryManager getBusinessQueryManager() throws JAXRException
+    {
         return queryManager;
     }
 
-    public BusinessLifeCycleManager getBusinessLifeCycleManager() throws JAXRException {
+    public BusinessLifeCycleManager getBusinessLifeCycleManager() throws JAXRException
+    {
         return lifeCycleManager;
     }
 
-    public BulkResponse getBulkResponse(String s) throws JAXRException, InvalidRequestException {
-        if(s == "" || s==null)
+    public BulkResponse getBulkResponse(String s) throws JAXRException, InvalidRequestException
+    {
+        if (s == "" || s == null)
             throw new InvalidRequestException();
         return null;
     }
 
-    public DeclarativeQueryManager getDeclarativeQueryManager() throws JAXRException, UnsupportedCapabilityException {
+    public DeclarativeQueryManager getDeclarativeQueryManager() throws JAXRException, UnsupportedCapabilityException
+    {
         throw new UnsupportedCapabilityException();
     }
 
-    public ClassificationScheme getDefaultPostalScheme() throws JAXRException {
+    public ClassificationScheme getDefaultPostalScheme() throws JAXRException
+    {
         return postalScheme;
     }
 
-    public String makeRegistrySpecificRequest(String s) throws JAXRException {
+    public String makeRegistrySpecificRequest(String s) throws JAXRException
+    {
         throw new UnsupportedCapabilityException();
     }
 
     public ConnectionImpl getConnection()
     {
-            return connection;
+        return connection;
     }
 
     public void setConnection(ConnectionImpl connection)
     {
-            this.connection = connection;
+        this.connection = connection;
     }
 
 }

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/AssociationImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/AssociationImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/AssociationImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/AssociationImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/AssociationImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/AssociationImpl.java	Sun Jan 23 00:30:26 2005
@@ -16,12 +16,12 @@
  */
 package org.apache.ws.scout.registry.infomodel;
 
+import javax.xml.registry.JAXRException;
+import javax.xml.registry.LifeCycleManager;
 import javax.xml.registry.infomodel.Association;
 import javax.xml.registry.infomodel.Concept;
-import javax.xml.registry.infomodel.RegistryObject;
 import javax.xml.registry.infomodel.InternationalString;
-import javax.xml.registry.JAXRException;
-import javax.xml.registry.LifeCycleManager;
+import javax.xml.registry.infomodel.RegistryObject;
 
 /**
  * Implements JAXR Association Interface.
@@ -86,16 +86,16 @@
 
     public void setAssociationType(Concept concept) throws JAXRException
     {
-         type = concept;
+        type = concept;
     }
 
     public void setSourceObject(RegistryObject ro) throws JAXRException
     {
-         source = ro;
+        source = ro;
     }
 
     public void setTargetObject(RegistryObject ro) throws JAXRException
     {
-         target = ro;
+        target = ro;
     }
 }

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationImpl.java	Sun Jan 23 00:30:26 2005
@@ -29,7 +29,8 @@
  * @author Anil Saldhana  <an...@apache.org>
  */
 public class ClassificationImpl extends RegistryObjectImpl
-        implements javax.xml.registry.infomodel.Classification {
+        implements javax.xml.registry.infomodel.Classification
+{
 
     private ClassificationScheme scheme = new ClassificationSchemeImpl(null);
     private Concept concept = new ConceptImpl(null);
@@ -41,46 +42,56 @@
     /**
      * Creates a new instance of ClassificationImpl
      */
-    public ClassificationImpl(LifeCycleManager lifeCycleManager) {
+    public ClassificationImpl(LifeCycleManager lifeCycleManager)
+    {
         super(lifeCycleManager);
     }
 
     public ClassificationScheme getClassificationScheme()
-            throws JAXRException {
+            throws JAXRException
+    {
         return scheme;
     }
 
-    public RegistryObject getClassifiedObject() throws JAXRException {
+    public RegistryObject getClassifiedObject() throws JAXRException
+    {
         return classfiedobj;
     }
 
-    public Concept getConcept() throws JAXRException {
+    public Concept getConcept() throws JAXRException
+    {
         return concept;
     }
 
-    public String getValue() throws JAXRException {
+    public String getValue() throws JAXRException
+    {
         return value;
     }
 
-    public boolean isExternal() throws JAXRException {
+    public boolean isExternal() throws JAXRException
+    {
         return external;
     }
 
     public void setClassificationScheme(ClassificationScheme cscheme)
-            throws JAXRException {
+            throws JAXRException
+    {
         scheme = cscheme;
     }
 
     public void setClassifiedObject(RegistryObject registryObject)
-            throws JAXRException {
+            throws JAXRException
+    {
         classfiedobj = registryObject;
     }
 
-    public void setConcept(Concept cpt) throws JAXRException {
+    public void setConcept(Concept cpt) throws JAXRException
+    {
         concept = cpt;
     }
 
-    public void setValue(String str) throws JAXRException {
+    public void setValue(String str) throws JAXRException
+    {
         value = str;
     }
 

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationSchemeImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationSchemeImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationSchemeImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationSchemeImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationSchemeImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ClassificationSchemeImpl.java	Sun Jan 23 00:30:26 2005
@@ -22,6 +22,7 @@
 import javax.xml.registry.infomodel.Concept;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Iterator;
 
 /**
  * Implements JAXR Interface.
@@ -31,65 +32,83 @@
  */
 public class ClassificationSchemeImpl
         extends RegistryEntryImpl
-        implements ClassificationScheme {
+        implements ClassificationScheme
+{
 
     private Collection childConcepts = new ArrayList();
 
     private int valueType = 1;
 
     private boolean external = false;
-
-    private Collection descendants = new ArrayList();
-
+    
     /**
      * Creates a new instance of ClassificationSchemeImpl
      */
-    public ClassificationSchemeImpl(LifeCycleManager lifeCycleManager) {
+    public ClassificationSchemeImpl(LifeCycleManager lifeCycleManager)
+    {
         super(lifeCycleManager);
     }
 
     public void addChildConcept(Concept concept)
-            throws JAXRException {
+            throws JAXRException
+    {
         childConcepts.add(concept);
     }
 
     public void addChildConcepts(Collection collection)
-            throws JAXRException {
+            throws JAXRException
+    {
         childConcepts.addAll(collection);
     }
 
     public int getChildConceptCount()
-            throws JAXRException {
+            throws JAXRException
+    {
         return childConcepts.size();
     }
 
-    public Collection getChildrenConcepts() throws JAXRException {
+    public Collection getChildrenConcepts() throws JAXRException
+    {
         return childConcepts;
     }
 
-    public Collection getDescendantConcepts() throws JAXRException {
-        return this.descendants;
+    public Collection getDescendantConcepts() throws JAXRException
+    {
+         Collection coll = new ArrayList();
+        Iterator iter = childConcepts.iterator();
+        while(iter != null && iter.hasNext())
+        {
+            ConceptImpl c = (ConceptImpl)iter.next();
+            coll.add(c);
+            coll.addAll(c.getDescendantConcepts());
+        }
+        return coll;
     }
 
-    public int getValueType() throws JAXRException {
+    public int getValueType() throws JAXRException
+    {
         return this.valueType;
     }
 
-    public boolean isExternal() throws JAXRException {
+    public boolean isExternal() throws JAXRException
+    {
         return this.external;
     }
 
     public void removeChildConcept(Concept concept)
-            throws JAXRException {
+            throws JAXRException
+    {
         this.childConcepts.remove(concept);
     }
 
     public void removeChildConcepts(Collection collection)
-            throws JAXRException {
+            throws JAXRException
+    {
         this.childConcepts.removeAll(collection);
     }
 
-    public void setValueType(int param) throws JAXRException {
+    public void setValueType(int param) throws JAXRException
+    {
         this.valueType = param;
     }
 

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ConceptImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ConceptImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ConceptImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ConceptImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ConceptImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ConceptImpl.java	Sun Jan 23 00:30:26 2005
@@ -23,6 +23,7 @@
 import javax.xml.registry.infomodel.RegistryObject;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Iterator;
 
 /**
  * Implements JAXR Interface.
@@ -30,70 +31,109 @@
  *
  * @author Anil Saldhana  <an...@apache.org>
  */
-public class ConceptImpl extends RegistryObjectImpl implements Concept {
+public class ConceptImpl extends RegistryObjectImpl implements Concept
+{
     private String value = new String();
 
-    private RegistryObject parent = new RegistryObjectImpl(null);
+    private RegistryObject parent = null;
     private Concept parentconcept = null;
 
-    private ClassificationSchemeImpl scheme = new ClassificationSchemeImpl(null);
+    private ClassificationScheme scheme = null;
     private Collection childconcepts = new ArrayList();
 
     /**
      * Creates a new instance of ConceptImpl
      */
-    public ConceptImpl(LifeCycleManager lifeCycleManager) {
+    public ConceptImpl(LifeCycleManager lifeCycleManager)
+    {
         super(lifeCycleManager);
     }
 
-    public void addChildConcept(Concept concept) {
+    public void addChildConcept(Concept concept)
+    {
         this.childconcepts.add(concept);
+        ((ConceptImpl)concept).setParentconcept(this);
     }
 
-    public void addChildConcepts(Collection collection) {
-        this.childconcepts.addAll(collection);
+    public void addChildConcepts(Collection collection)
+    {
+        Iterator iter = collection.iterator();
+        while(iter.hasNext())
+        {
+            Concept c = (Concept)iter.next();
+            ((ConceptImpl)c).setParentconcept(this);
+            childconcepts.add(c);
+        }
+
     }
 
-    public int getChildConceptCount() {
+    public int getChildConceptCount()
+    {
         return this.childconcepts.size();
     }
 
-    public Collection getChildrenConcepts() {
+    public Collection getChildrenConcepts()
+    {
         return this.childconcepts;
     }
 
-    public ClassificationScheme getClassificationScheme() {
+    public ClassificationScheme getClassificationScheme()
+    {
         return scheme;
     }
 
-    public Collection getDescendantConcepts() {
-        return null;
+    public Collection getDescendantConcepts()
+    {
+        Collection coll = new ArrayList();
+        Iterator iter = childconcepts.iterator();
+        while(iter != null && iter.hasNext())
+        {
+            ConceptImpl c = (ConceptImpl)iter.next();
+            coll.add(c);
+            coll.addAll(c.getDescendantConcepts());
+        }
+        return coll;
     }
 
-    public RegistryObject getParent() {
+    public RegistryObject getParent()
+    {
         return parent;
     }
 
-    public Concept getParentConcept() {
+    public Concept getParentConcept()
+    {
         return parentconcept;
     }
 
-    public String getPath() {
+    public String getPath()
+    {
         return null;
     }
 
-    public String getValue() throws JAXRException {
+    public String getValue() throws JAXRException
+    {
         return value;
     }
 
-    public void removeChildConcept(Concept concept) {
+    public void removeChildConcept(Concept c)
+    {
+        ((ConceptImpl)c).setParentconcept(null);
+        childconcepts.remove(c);
     }
 
-    public void removeChildConcepts(Collection collection) {
-        this.childconcepts.removeAll(collection);
+    public void removeChildConcepts(Collection collection)
+    {
+        Iterator iter = collection.iterator();
+        while(iter.hasNext())
+        {
+            Concept c = (Concept)iter.next();
+            ((ConceptImpl)c).setParentconcept(null);
+            childconcepts.add(c);
+        }
     }
 
-    public void setValue(String str) {
+    public void setValue(String str)
+    {
         value = str;
     }
 
@@ -105,6 +145,7 @@
     public void setParentconcept(Concept parentconcept)
     {
         this.parentconcept = parentconcept;
+        parent = null; //We deal with concept as parent
     }
 
     public void setScheme(ClassificationSchemeImpl scheme)
@@ -114,6 +155,20 @@
 
     public void setChildconcepts(Collection childconcepts)
     {
-        this.childconcepts = childconcepts;
+        this.childconcepts.clear();
+        Iterator iter = childconcepts.iterator();
+        while(iter.hasNext())
+        {
+            Concept c = (Concept)iter.next();
+            ((ConceptImpl)c).setParentconcept(this);
+            childconcepts.add(c);
+        }
+    }
+
+    //Specific API
+    public void setClassificationScheme(ClassificationScheme sc)
+    {
+        scheme = sc;
+        parent = sc;
     }
 }

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/EmailAddressImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/EmailAddressImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/EmailAddressImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/EmailAddressImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/EmailAddressImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/EmailAddressImpl.java	Sun Jan 23 00:30:26 2005
@@ -26,11 +26,13 @@
  *
  * @author Anil Saldhana  <an...@apache.org>
  */
-public class EmailAddressImpl implements EmailAddress {
+public class EmailAddressImpl implements EmailAddress
+{
     private String email;
     private String type;
 
-    public EmailAddressImpl() {
+    public EmailAddressImpl()
+    {
     }
 
     public EmailAddressImpl(String email)
@@ -44,23 +46,28 @@
         this.type = type;
     }
 
-    public String getAddress() throws JAXRException {
+    public String getAddress() throws JAXRException
+    {
         return email;
     }
 
-    public String getType() throws JAXRException {
+    public String getType() throws JAXRException
+    {
         return type;
     }
 
-    public void setAddress(String str) throws JAXRException {
+    public void setAddress(String str) throws JAXRException
+    {
         this.email = str;
     }
 
-    public void setType(String str) throws JAXRException {
+    public void setType(String str) throws JAXRException
+    {
         this.type = str;
     }
 
-    public boolean equals(Object o) {
+    public boolean equals(Object o)
+    {
         if (this == o) return true;
         if (!(o instanceof EmailAddressImpl)) return false;
         final EmailAddressImpl emailAddress = (EmailAddressImpl) o;
@@ -69,14 +76,16 @@
         return true;
     }
 
-    public int hashCode() {
+    public int hashCode()
+    {
         int result;
         result = (email != null ? email.hashCode() : 0);
         result = 29 * result + (type != null ? type.hashCode() : 0);
         return result;
     }
 
-    public String toString() {
+    public String toString()
+    {
         return email == null ? "null" : email;
     }
 }

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExtensibleObjectImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExtensibleObjectImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExtensibleObjectImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExtensibleObjectImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExtensibleObjectImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExtensibleObjectImpl.java	Sun Jan 23 00:30:26 2005
@@ -29,32 +29,40 @@
  *
  * @author Anil Saldhana  <an...@apache.org>
  */
-public class ExtensibleObjectImpl implements ExtensibleObject {
+public class ExtensibleObjectImpl implements ExtensibleObject
+{
     private Map slots = new HashMap();
 
-    public void addSlot(Slot slot) throws JAXRException {
+    public void addSlot(Slot slot) throws JAXRException
+    {
         slots.put(slot.getName(), slot);
     }
 
-    public void addSlots(Collection slots) throws JAXRException {
-        for (Iterator i = slots.iterator(); i.hasNext();) {
+    public void addSlots(Collection slots) throws JAXRException
+    {
+        for (Iterator i = slots.iterator(); i.hasNext();)
+        {
             addSlot((Slot) i.next());
         }
     }
 
-    public Slot getSlot(String slotName) {
+    public Slot getSlot(String slotName)
+    {
         return (Slot) slots.get(slotName);
     }
 
-    public Collection getSlots() {
+    public Collection getSlots()
+    {
         return slots.values();
     }
 
-    public void removeSlot(String slotName) {
+    public void removeSlot(String slotName)
+    {
         slots.remove(slotName);
     }
 
-    public void removeSlots(Collection soltNames) {
+    public void removeSlots(Collection soltNames)
+    {
         slots.keySet().removeAll(soltNames);
     }
 }

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExternalIdentifierImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExternalIdentifierImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExternalIdentifierImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExternalIdentifierImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExternalIdentifierImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExternalIdentifierImpl.java	Sun Jan 23 00:30:26 2005
@@ -19,8 +19,8 @@
 import javax.xml.registry.JAXRException;
 import javax.xml.registry.LifeCycleManager;
 import javax.xml.registry.infomodel.ClassificationScheme;
-import javax.xml.registry.infomodel.RegistryObject;
 import javax.xml.registry.infomodel.InternationalString;
+import javax.xml.registry.infomodel.RegistryObject;
 
 /**
  * Implements JAXR Interface.
@@ -29,7 +29,8 @@
  * @author Anil Saldhana  <an...@apache.org>
  */
 public class ExternalIdentifierImpl extends RegistryObjectImpl
-        implements javax.xml.registry.infomodel.ExternalIdentifier {
+        implements javax.xml.registry.infomodel.ExternalIdentifier
+{
 
     private ClassificationScheme identity = new ClassificationSchemeImpl(null);
     private String value = new String();
@@ -38,39 +39,45 @@
     /**
      * Creates a new instance of ExternalIdentifierImpl
      */
-    public ExternalIdentifierImpl(LifeCycleManager lifeCycleManager) {
+    public ExternalIdentifierImpl(LifeCycleManager lifeCycleManager)
+    {
         super(lifeCycleManager);
     }
 
     public ExternalIdentifierImpl(LifeCycleManager lifeCycleManager,
                                   ClassificationScheme identity,
                                   InternationalString name,
-                                  String value )
+                                  String value)
     {
-        super(lifeCycleManager,name);
+        super(lifeCycleManager, name);
         this.identity = identity;
         this.value = value;
     }
 
     public ClassificationScheme getIdentificationScheme()
-            throws JAXRException {
+            throws JAXRException
+    {
         return identity;
     }
 
-    public RegistryObject getRegistryObject() throws JAXRException {
+    public RegistryObject getRegistryObject() throws JAXRException
+    {
         return parent;
     }
 
-    public String getValue() throws JAXRException {
+    public String getValue() throws JAXRException
+    {
         return value;
     }
 
     public void setIdentificationScheme(ClassificationScheme cs)
-            throws JAXRException {
+            throws JAXRException
+    {
         identity = cs;
     }
 
-    public void setValue(String str) throws JAXRException {
+    public void setValue(String str) throws JAXRException
+    {
         value = str;
     }
 

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExternalLinkImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExternalLinkImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExternalLinkImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExternalLinkImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExternalLinkImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ExternalLinkImpl.java	Sun Jan 23 00:30:26 2005
@@ -29,7 +29,8 @@
  * @author Anil Saldhana  <an...@apache.org>
  */
 public class ExternalLinkImpl extends RegistryObjectImpl
-        implements javax.xml.registry.infomodel.ExternalLink {
+        implements javax.xml.registry.infomodel.ExternalLink
+{
     private String uri = new String();
     private boolean validateuri = false;
     private Collection linkedObj = new ArrayList();
@@ -37,27 +38,33 @@
     /**
      * Creates a new instance of ExternalLinkImpl
      */
-    public ExternalLinkImpl(LifeCycleManager lifeCycleManager) {
+    public ExternalLinkImpl(LifeCycleManager lifeCycleManager)
+    {
         super(lifeCycleManager);
     }
 
-    public String getExternalURI() throws JAXRException {
+    public String getExternalURI() throws JAXRException
+    {
         return uri;
     }
 
-    public Collection getLinkedObjects() throws JAXRException {
+    public Collection getLinkedObjects() throws JAXRException
+    {
         return linkedObj;
     }
 
-    public boolean getValidateURI() throws JAXRException {
+    public boolean getValidateURI() throws JAXRException
+    {
         return validateuri;
     }
 
-    public void setExternalURI(String str) throws JAXRException {
+    public void setExternalURI(String str) throws JAXRException
+    {
         this.uri = str;
     }
 
-    public void setValidateURI(boolean param) throws JAXRException {
+    public void setValidateURI(boolean param) throws JAXRException
+    {
         this.validateuri = param;
     }
 

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/InternationalStringImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/InternationalStringImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/InternationalStringImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/InternationalStringImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/InternationalStringImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/InternationalStringImpl.java	Sun Jan 23 00:30:26 2005
@@ -31,13 +31,15 @@
  *
  * @author Anil Saldhana  <an...@apache.org>
  */
-public class InternationalStringImpl implements InternationalString {
+public class InternationalStringImpl implements InternationalString
+{
     /**
      * Maintains an Hashmap of locale to string value
      */
     private final Map map = new HashMap();
 
-    public InternationalStringImpl() {
+    public InternationalStringImpl()
+    {
     }
 
     public InternationalStringImpl(String str)
@@ -47,73 +49,90 @@
 
     }
 
-    public InternationalStringImpl(Locale locale, String str, String charsetName) {
+    public InternationalStringImpl(Locale locale, String str, String charsetName)
+    {
         MapKey mapKey = new MapKey(locale, charsetName);
         map.put(mapKey, new LocalizedStringImpl(locale, str, charsetName));
     }
 
-    public void addLocalizedString(LocalizedString localizedString) throws JAXRException {
+    public void addLocalizedString(LocalizedString localizedString) throws JAXRException
+    {
         MapKey mapKey = new MapKey(localizedString);
         map.put(mapKey, localizedString);
     }
 
-    public void addLocalizedStrings(Collection collection) throws JAXRException {
-        for (Iterator i = collection.iterator(); i.hasNext();) {
+    public void addLocalizedStrings(Collection collection) throws JAXRException
+    {
+        for (Iterator i = collection.iterator(); i.hasNext();)
+        {
             LocalizedString localizedString = (LocalizedString) i.next();
             map.put(new MapKey(localizedString), localizedString);
         }
     }
 
-    public Collection getLocalizedStrings() throws JAXRException {
+    public Collection getLocalizedStrings() throws JAXRException
+    {
         return Collections.unmodifiableCollection(map.values());
     }
 
-    public String getValue() throws JAXRException {
+    public String getValue() throws JAXRException
+    {
         return getValue(Locale.getDefault());
     }
 
-    public void setValue(String str) throws JAXRException {
+    public void setValue(String str) throws JAXRException
+    {
         setValue(Locale.getDefault(), str);
     }
 
-    public String getValue(Locale locale) throws JAXRException {
+    public String getValue(Locale locale) throws JAXRException
+    {
         LocalizedString localizedString = (LocalizedString) map.get(new MapKey(locale, LocalizedString.DEFAULT_CHARSET_NAME));
         return localizedString != null ? localizedString.getValue() : null;
     }
 
-    public void setValue(Locale locale, String value) throws JAXRException {
+    public void setValue(Locale locale, String value) throws JAXRException
+    {
         map.put(new MapKey(locale, LocalizedString.DEFAULT_CHARSET_NAME), new LocalizedStringImpl(locale, value, LocalizedString.DEFAULT_CHARSET_NAME));
     }
 
-    public void removeLocalizedString(LocalizedString localizedString) throws JAXRException {
+    public void removeLocalizedString(LocalizedString localizedString) throws JAXRException
+    {
         map.remove(new MapKey(localizedString));
     }
 
-    public void removeLocalizedStrings(Collection collection) throws JAXRException {
-        for (Iterator i = collection.iterator(); i.hasNext();) {
+    public void removeLocalizedStrings(Collection collection) throws JAXRException
+    {
+        for (Iterator i = collection.iterator(); i.hasNext();)
+        {
             removeLocalizedString((LocalizedString) i.next());
         }
     }
 
-    public LocalizedString getLocalizedString(Locale locale, String charset) throws JAXRException {
+    public LocalizedString getLocalizedString(Locale locale, String charset) throws JAXRException
+    {
         return (LocalizedString) map.get(new MapKey(locale, charset));
     }
 
-    private static class MapKey {
+    private static class MapKey
+    {
         private final Locale locale;
         private final String charsetName;
 
-        public MapKey(Locale locale, String charsetName) {
+        public MapKey(Locale locale, String charsetName)
+        {
             this.locale = locale;
             this.charsetName = charsetName;
         }
 
-        public MapKey(LocalizedString localizedString) throws JAXRException {
+        public MapKey(LocalizedString localizedString) throws JAXRException
+        {
             this.locale = localizedString.getLocale();
             this.charsetName = localizedString.getCharsetName();
         }
 
-        public boolean equals(Object o) {
+        public boolean equals(Object o)
+        {
             if (this == o) return true;
             if (!(o instanceof MapKey)) return false;
             final MapKey mapKey = (MapKey) o;
@@ -122,14 +141,16 @@
             return true;
         }
 
-        public int hashCode() {
+        public int hashCode()
+        {
             int result;
             result = locale.hashCode();
             result = 29 * result + charsetName.hashCode();
             return result;
         }
 
-        public String toString() {
+        public String toString()
+        {
             StringBuffer buf = new StringBuffer(32);
             buf.append('[').append(locale).append(',').append(charsetName).append(']');
             return buf.toString();

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/KeyImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/KeyImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/KeyImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/KeyImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/KeyImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/KeyImpl.java	Sun Jan 23 00:30:26 2005
@@ -24,25 +24,31 @@
  *
  * @author Anil Saldhana  <an...@apache.org>
  */
-public class KeyImpl implements Key {
+public class KeyImpl implements Key
+{
     private String id;
 
-    public KeyImpl() {
+    public KeyImpl()
+    {
     }
 
-    public KeyImpl(String id) {
+    public KeyImpl(String id)
+    {
         this.id = id;
     }
 
-    public String getId() {
+    public String getId()
+    {
         return id;
     }
 
-    public void setId(String str) {
+    public void setId(String str)
+    {
         this.id = str;
     }
 
-    public boolean equals(Object o) {
+    public boolean equals(Object o)
+    {
         if (this == o) return true;
         if (!(o instanceof KeyImpl)) return false;
         final KeyImpl key = (KeyImpl) o;
@@ -50,11 +56,13 @@
         return true;
     }
 
-    public int hashCode() {
+    public int hashCode()
+    {
         return (id != null ? id.hashCode() : 0);
     }
 
-    public String toString() {
+    public String toString()
+    {
         return id;
     }
 }

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/LocalizedStringImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/LocalizedStringImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/LocalizedStringImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/LocalizedStringImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/LocalizedStringImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/LocalizedStringImpl.java	Sun Jan 23 00:30:26 2005
@@ -25,12 +25,14 @@
  *
  * @author Anil Saldhana  <an...@apache.org>
  */
-public class LocalizedStringImpl implements LocalizedString {
+public class LocalizedStringImpl implements LocalizedString
+{
     private String charsetName;
     private Locale locale;
     private String value;
 
-    public LocalizedStringImpl() {
+    public LocalizedStringImpl()
+    {
         this.locale = Locale.getDefault();
         this.charsetName = LocalizedString.DEFAULT_CHARSET_NAME;
     }
@@ -42,11 +44,14 @@
      * @param value       the value; may be null
      * @param charsetName the charset; must not be null
      */
-    public LocalizedStringImpl(Locale locale, String value, String charsetName) {
-        if (locale == null) {
+    public LocalizedStringImpl(Locale locale, String value, String charsetName)
+    {
+        if (locale == null)
+        {
             throw new IllegalArgumentException("locale cannot be null");
         }
-        if (charsetName == null) {
+        if (charsetName == null)
+        {
             throw new IllegalArgumentException("charsetName cannot be null");
         }
         this.locale = locale;
@@ -54,33 +59,41 @@
         this.charsetName = charsetName;
     }
 
-    public String getCharsetName() {
+    public String getCharsetName()
+    {
         return charsetName;
     }
 
-    public Locale getLocale() {
+    public Locale getLocale()
+    {
         return locale;
     }
 
-    public String getValue() {
+    public String getValue()
+    {
         return value;
     }
 
-    public void setCharsetName(String charsetName) {
-        if (charsetName == null) {
+    public void setCharsetName(String charsetName)
+    {
+        if (charsetName == null)
+        {
             throw new IllegalArgumentException("charsetName cannot be null");
         }
         this.charsetName = charsetName;
     }
 
-    public void setLocale(Locale locale) {
-        if (locale == null) {
+    public void setLocale(Locale locale)
+    {
+        if (locale == null)
+        {
             throw new IllegalArgumentException("locale cannot be null");
         }
         this.locale = locale;
     }
 
-    public void setValue(String value) {
+    public void setValue(String value)
+    {
         this.value = value;
     }
 
@@ -92,7 +105,8 @@
      * @param o the other object
      * @return true if they are equal
      */
-    public boolean equals(Object o) {
+    public boolean equals(Object o)
+    {
         if (this == o) return true;
         if (!(o instanceof LocalizedStringImpl)) return false;
         final LocalizedStringImpl localizedString = (LocalizedStringImpl) o;
@@ -102,7 +116,8 @@
         return true;
     }
 
-    public int hashCode() {
+    public int hashCode()
+    {
         int result;
         result = charsetName.hashCode();
         result = 29 * result + locale.hashCode();
@@ -110,7 +125,8 @@
         return result;
     }
 
-    public String toString() {
+    public String toString()
+    {
         return value;
     }
 }

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/OrganizationImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/OrganizationImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/OrganizationImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/OrganizationImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/OrganizationImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/OrganizationImpl.java	Sun Jan 23 00:30:26 2005
@@ -26,7 +26,6 @@
 import javax.xml.registry.infomodel.TelephoneNumber;
 import javax.xml.registry.infomodel.User;
 import java.util.Collection;
-import java.util.Collections;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Set;
@@ -38,17 +37,20 @@
  *
  * @author Anil Saldhana  <an...@apache.org>
  */
-public class OrganizationImpl extends RegistryObjectImpl implements Organization {
+public class OrganizationImpl extends RegistryObjectImpl implements Organization
+{
     private User primaryContact;
     private Set users = new HashSet();
     private Set telephoneNumbers = new HashSet();
     private Set services = new HashSet();
 
-    public OrganizationImpl(LifeCycleManager lifeCycleManager) {
+    public OrganizationImpl(LifeCycleManager lifeCycleManager)
+    {
         super(lifeCycleManager);
     }
 
-    public User getPrimaryContact() throws JAXRException {
+    public User getPrimaryContact() throws JAXRException
+    {
         //TODO: How do we fix this? Run JAXRQueryTest and you will hit this problem.
         //if (primaryContact == null) {
         //    throw new IllegalStateException("primaryContact is null and the spec says we cannot return a null value");
@@ -56,53 +58,71 @@
         return primaryContact;
     }
 
-    public void setPrimaryContact(User user) throws JAXRException {
-        if (user == null) {
+    public void setPrimaryContact(User user) throws JAXRException
+    {
+        if (user == null)
+        {
             throw new IllegalArgumentException("primaryContact must not be null");
         }
         users.add(user);
         primaryContact = user;
+        ((UserImpl) user).setOrganization(this);
     }
 
-    public void addUser(User user) throws JAXRException {
+    public void addUser(User user) throws JAXRException
+    {
         users.add(user);
+        ((UserImpl) user).setOrganization(this);
     }
 
-    public void addUsers(Collection collection) throws JAXRException {
+    public void addUsers(Collection collection) throws JAXRException
+    {
         // do this by hand to ensure all members are actually instances of User
-        for (Iterator iterator = collection.iterator(); iterator.hasNext();) {
+        for (Iterator iterator = collection.iterator(); iterator.hasNext();)
+        {
             User user = (User) iterator.next();
             users.add(user);
+            ((UserImpl) user).setOrganization(this);
         }
     }
 
-    public Collection getUsers() throws JAXRException {
+    public Collection getUsers() throws JAXRException
+    {
         return users;
     }
 
-    public void removeUser(User user) throws JAXRException {
-        if (primaryContact.equals(user)) {
+    public void removeUser(User user) throws JAXRException
+    {
+        if (primaryContact.equals(user))
+        {
             throw new InvalidRequestException("Cannot remove primaryContact");
         }
         users.remove(user);
     }
 
-    public void removeUsers(Collection collection) throws JAXRException {
-        if (collection.contains(primaryContact)) {
+    public void removeUsers(Collection collection) throws JAXRException
+    {
+        if (collection.contains(primaryContact))
+        {
             throw new InvalidRequestException("Cannot remove primaryContact");
         }
         users.removeAll(collection);
     }
 
-    public Collection getTelephoneNumbers(String phoneType) throws JAXRException {
+    public Collection getTelephoneNumbers(String phoneType) throws JAXRException
+    {
         Set filteredNumbers;
-        if (phoneType == null) {
+        if (phoneType == null)
+        {
             filteredNumbers = telephoneNumbers;
-        } else {
+        } else
+        {
             filteredNumbers = new HashSet(telephoneNumbers.size());
-            for (Iterator i = telephoneNumbers.iterator(); i.hasNext();) {
+            for (Iterator i = telephoneNumbers.iterator(); i.hasNext();)
+            {
                 TelephoneNumber number = (TelephoneNumber) i.next();
-                if (phoneType.equals(number.getType())) {
+                if (phoneType.equals(number.getType()))
+                {
                     filteredNumbers.add(number);
                 }
             }
@@ -110,37 +130,45 @@
         return filteredNumbers;
     }
 
-    public void setTelephoneNumbers(Collection collection) throws JAXRException {
+    public void setTelephoneNumbers(Collection collection) throws JAXRException
+    {
         // do this by hand to ensure all members are actually instances of TelephoneNumber
         Set numbers = new HashSet(collection.size());
-        for (Iterator i = collection.iterator(); i.hasNext();) {
+        for (Iterator i = collection.iterator(); i.hasNext();)
+        {
             TelephoneNumber number = (TelephoneNumber) i.next();
             numbers.add(number);
         }
         this.telephoneNumbers = numbers;
     }
 
-    public void addService(Service service) throws JAXRException {
+    public void addService(Service service) throws JAXRException
+    {
         services.add(service);
     }
 
-    public void addServices(Collection collection) throws JAXRException {
+    public void addServices(Collection collection) throws JAXRException
+    {
         // do this by hand to ensure all members are actually instances of Service
-        for (Iterator iterator = collection.iterator(); iterator.hasNext();) {
+        for (Iterator iterator = collection.iterator(); iterator.hasNext();)
+        {
             Service service = (Service) iterator.next();
             services.add(service);
         }
     }
 
-    public Collection getServices() throws JAXRException {
+    public Collection getServices() throws JAXRException
+    {
         return services;
     }
 
-    public void removeService(Service service) throws JAXRException {
+    public void removeService(Service service) throws JAXRException
+    {
         services.remove(service);
     }
 
-    public void removeServices(Collection collection) throws JAXRException {
+    public void removeServices(Collection collection) throws JAXRException
+    {
         services.removeAll(collection);
     }
 
@@ -148,47 +176,58 @@
     // Level 1 features must throw exceptions
     ///////////////////////////////////////////////////////////////////////////
 
-    public Organization getParentOrganization() throws JAXRException {
+    public Organization getParentOrganization() throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public Collection getDescendantOrganizations() throws JAXRException {
+    public Collection getDescendantOrganizations() throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public Organization getRootOrganization() throws JAXRException {
+    public Organization getRootOrganization() throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public void addChildOrganization(Organization organization) throws JAXRException {
+    public void addChildOrganization(Organization organization) throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public void addChildOrganizations(Collection collection) throws JAXRException {
+    public void addChildOrganizations(Collection collection) throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public int getChildOrganizationCount() throws JAXRException {
+    public int getChildOrganizationCount() throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public Collection getChildOrganizations() throws JAXRException {
+    public Collection getChildOrganizations() throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public void removeChildOrganization(Organization organization) throws JAXRException {
+    public void removeChildOrganization(Organization organization) throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public void removeChildOrganizations(Collection collection) throws JAXRException {
+    public void removeChildOrganizations(Collection collection) throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public PostalAddress getPostalAddress() throws JAXRException {
+    public PostalAddress getPostalAddress() throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public void setPostalAddress(PostalAddress postalAddress) throws JAXRException {
+    public void setPostalAddress(PostalAddress postalAddress) throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 }

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/PersonNameImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/PersonNameImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/PersonNameImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/PersonNameImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/PersonNameImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/PersonNameImpl.java	Sun Jan 23 00:30:26 2005
@@ -25,49 +25,60 @@
  *
  * @author Anil Saldhana  <an...@apache.org>
  */
-public class PersonNameImpl implements javax.xml.registry.infomodel.PersonName {
+public class PersonNameImpl implements javax.xml.registry.infomodel.PersonName
+{
 
     private String fullname = "";
 
     /**
      * Creates a new instance of PersonNameImpl
      */
-    public PersonNameImpl() {
+    public PersonNameImpl()
+    {
     }
 
-    public PersonNameImpl(String fullname) {
+    public PersonNameImpl(String fullname)
+    {
         this.fullname = fullname;
     }
 
-    public String getFullName() throws JAXRException {
+    public String getFullName() throws JAXRException
+    {
         return this.fullname;
     }
 
-    public void setFullName(String str) throws JAXRException {
+    public void setFullName(String str) throws JAXRException
+    {
         this.fullname = str;
     }
 
-    public String getFirstName() throws JAXRException {
+    public String getFirstName() throws JAXRException
+    {
         throw new UnsupportedCapabilityException();
     }
 
-    public String getLastName() throws JAXRException {
+    public String getLastName() throws JAXRException
+    {
         throw new UnsupportedCapabilityException();
     }
 
-    public String getMiddleName() throws JAXRException {
+    public String getMiddleName() throws JAXRException
+    {
         throw new UnsupportedCapabilityException();
     }
 
-    public void setFirstName(String str) throws JAXRException {
+    public void setFirstName(String str) throws JAXRException
+    {
         throw new UnsupportedCapabilityException();
     }
 
-    public void setLastName(String str) throws JAXRException {
+    public void setLastName(String str) throws JAXRException
+    {
         throw new UnsupportedCapabilityException();
     }
 
-    public void setMiddleName(String str) throws JAXRException {
+    public void setMiddleName(String str) throws JAXRException
+    {
         throw new UnsupportedCapabilityException();
     }
 }

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/PostalAddressImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/PostalAddressImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/PostalAddressImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/PostalAddressImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/PostalAddressImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/PostalAddressImpl.java	Sun Jan 23 00:30:26 2005
@@ -26,7 +26,8 @@
  *
  * @author Anil Saldhana  <an...@apache.org>
  */
-public class PostalAddressImpl extends ExtensibleObjectImpl implements PostalAddress {
+public class PostalAddressImpl extends ExtensibleObjectImpl implements PostalAddress
+{
     private static final String EMPTY_STRING = "";
     private String street = EMPTY_STRING;
     private String streetNumber = EMPTY_STRING;
@@ -40,7 +41,8 @@
     /**
      * Creates a new instance of PostalAddressImpl
      */
-    public PostalAddressImpl(ClassificationScheme postalScheme) {
+    public PostalAddressImpl(ClassificationScheme postalScheme)
+    {
         this.postalScheme = postalScheme;
     }
 
@@ -48,67 +50,83 @@
     {
     }
 
-    public String getCity() {
+    public String getCity()
+    {
         return city;
     }
 
-    public void setCity(String city) {
+    public void setCity(String city)
+    {
         this.city = city;
     }
 
-    public String getCountry() {
+    public String getCountry()
+    {
         return country;
     }
 
-    public void setCountry(String country) {
+    public void setCountry(String country)
+    {
         this.country = country;
     }
 
-    public String getPostalCode() {
+    public String getPostalCode()
+    {
         return postalCode;
     }
 
-    public void setPostalCode(String postalCode) {
+    public void setPostalCode(String postalCode)
+    {
         this.postalCode = postalCode;
     }
 
-    public ClassificationScheme getPostalScheme() {
+    public ClassificationScheme getPostalScheme()
+    {
         return postalScheme;
     }
 
-    public void setPostalScheme(ClassificationScheme postalScheme) {
+    public void setPostalScheme(ClassificationScheme postalScheme)
+    {
         this.postalScheme = postalScheme;
     }
 
-    public String getStateOrProvince() {
+    public String getStateOrProvince()
+    {
         return stateOrProvince;
     }
 
-    public void setStateOrProvince(String stateOrProvince) {
+    public void setStateOrProvince(String stateOrProvince)
+    {
         this.stateOrProvince = stateOrProvince;
     }
 
-    public String getStreet() {
+    public String getStreet()
+    {
         return street;
     }
 
-    public void setStreet(String street) {
+    public void setStreet(String street)
+    {
         this.street = street;
     }
 
-    public String getStreetNumber() {
+    public String getStreetNumber()
+    {
         return streetNumber;
     }
 
-    public void setStreetNumber(String streetNumber) {
+    public void setStreetNumber(String streetNumber)
+    {
         this.streetNumber = streetNumber;
     }
 
-    public String getType() {
+    public String getType()
+    {
         return type;
     }
 
-    public void setType(String type) {
+    public void setType(String type)
+    {
         this.type = type;
     }
 }

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/RegistryEntryImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/RegistryEntryImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/RegistryEntryImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/RegistryEntryImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/RegistryEntryImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/RegistryEntryImpl.java	Sun Jan 23 00:30:26 2005
@@ -27,7 +27,8 @@
  *
  * @author Anil Saldhana  <an...@apache.org>
  */
-public class RegistryEntryImpl extends RegistryObjectImpl implements RegistryEntry {
+public class RegistryEntryImpl extends RegistryObjectImpl implements RegistryEntry
+{
     private Date expiry = null;
     private int major = 1;
     private int minor = 0;
@@ -39,51 +40,63 @@
     /**
      * Creates a new instance of RegistryEntryImpl
      */
-    public RegistryEntryImpl(LifeCycleManager lifeCycleManager) {
+    public RegistryEntryImpl(LifeCycleManager lifeCycleManager)
+    {
         super(lifeCycleManager);
     }
 
-    public Date getExpiration() throws JAXRException {
+    public Date getExpiration() throws JAXRException
+    {
         return expiry;
     }
 
-    public int getMajorVersion() throws JAXRException {
+    public int getMajorVersion() throws JAXRException
+    {
         return major;
     }
 
-    public int getMinorVersion() throws JAXRException {
+    public int getMinorVersion() throws JAXRException
+    {
         return minor;
     }
 
-    public int getStability() throws JAXRException {
+    public int getStability() throws JAXRException
+    {
         return stability;
     }
 
-    public int getStatus() throws JAXRException {
+    public int getStatus() throws JAXRException
+    {
         return status;
     }
 
-    public String getUserVersion() throws JAXRException {
+    public String getUserVersion() throws JAXRException
+    {
         return userversion;
     }
 
-    public void setExpiration(Date date) throws JAXRException {
+    public void setExpiration(Date date) throws JAXRException
+    {
         expiry = date;
     }
 
-    public void setMajorVersion(int param) throws JAXRException {
+    public void setMajorVersion(int param) throws JAXRException
+    {
         major = param;
     }
 
-    public void setMinorVersion(int param) throws JAXRException {
+    public void setMinorVersion(int param) throws JAXRException
+    {
         minor = param;
     }
 
-    public void setStability(int param) throws JAXRException {
+    public void setStability(int param) throws JAXRException
+    {
         stability = param;
     }
 
-    public void setUserVersion(String str) throws JAXRException {
+    public void setUserVersion(String str) throws JAXRException
+    {
         userversion = str;
     }
 

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/RegistryObjectImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/RegistryObjectImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/RegistryObjectImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/RegistryObjectImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/RegistryObjectImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/RegistryObjectImpl.java	Sun Jan 23 00:30:26 2005
@@ -41,7 +41,8 @@
  *
  * @author Anil Saldhana  <an...@apache.org>
  */
-public class RegistryObjectImpl extends ExtensibleObjectImpl implements RegistryObject {
+public class RegistryObjectImpl extends ExtensibleObjectImpl implements RegistryObject
+{
     private final LifeCycleManager lifeCycleManager;
     private Key key;
     private InternationalString name = new InternationalStringImpl();
@@ -54,194 +55,238 @@
 
     private OrganizationImpl submittingOrganization;
 
-    public RegistryObjectImpl(LifeCycleManager lifeCycleManager) {
+    public RegistryObjectImpl(LifeCycleManager lifeCycleManager)
+    {
         this.lifeCycleManager = lifeCycleManager;
     }
-    public RegistryObjectImpl(LifeCycleManager lifeCycleManager,InternationalString n) {
+
+    public RegistryObjectImpl(LifeCycleManager lifeCycleManager, InternationalString n)
+    {
         this.lifeCycleManager = lifeCycleManager;
         name = n;
     }
 
-    public Key getKey() {
+    public Key getKey()
+    {
         return key;
     }
 
-    public InternationalString getDescription() {
+    public InternationalString getDescription()
+    {
         return desc;
     }
 
-    public void setDescription(InternationalString description) {
+    public void setDescription(InternationalString description)
+    {
         this.desc = description;
     }
 
-    public InternationalString getName() {
+    public InternationalString getName()
+    {
         return name;
     }
 
-    public void setName(InternationalString name) {
+    public void setName(InternationalString name)
+    {
         this.name = name;
     }
 
-    public void setKey(Key k) {
+    public void setKey(Key k)
+    {
         key = k;
     }
 
-    public String toXML() throws JAXRException {
+    public String toXML() throws JAXRException
+    {
         throw new UnsupportedCapabilityException("toXML is not supported");
     }
 
-    public void addClassification(Classification classification) {
+    public void addClassification(Classification classification)
+    {
         classifications.add(classification);
     }
 
-    public void addClassifications(Collection collection) {
-        for (Iterator i = collection.iterator(); i.hasNext();) {
+    public void addClassifications(Collection collection)
+    {
+        for (Iterator i = collection.iterator(); i.hasNext();)
+        {
             Classification classification = (Classification) i.next();
             classifications.add(classification);
         }
     }
 
-    public void removeClassification(Classification classification) {
+    public void removeClassification(Classification classification)
+    {
         classifications.remove(classification);
     }
 
-    public void removeClassifications(Collection collection) {
+    public void removeClassifications(Collection collection)
+    {
         classifications.removeAll(collection);
     }
 
-    public Collection getClassifications() {
+    public Collection getClassifications()
+    {
         return Collections.unmodifiableSet(classifications);
     }
 
-    public void setClassifications(Collection collection) {
+    public void setClassifications(Collection collection)
+    {
         Set newClassifications = new HashSet(collection.size());
-        for (Iterator i = collection.iterator(); i.hasNext();) {
+        for (Iterator i = collection.iterator(); i.hasNext();)
+        {
             Classification classification = (Classification) i.next();
             newClassifications.add(classification);
         }
         classifications = newClassifications;
     }
 
-    public void addAssociation(Association association) {
+    public void addAssociation(Association association)
+    {
         associations.add(association);
     }
 
-    public void addAssociations(Collection collection) throws JAXRException {
-        for (Iterator i = collection.iterator(); i.hasNext();) {
+    public void addAssociations(Collection collection) throws JAXRException
+    {
+        for (Iterator i = collection.iterator(); i.hasNext();)
+        {
             Association association = (Association) i.next();
             associations.add(association);
         }
     }
 
-    public Collection getAssociations() throws JAXRException {
+    public Collection getAssociations() throws JAXRException
+    {
         return Collections.unmodifiableSet(associations);
     }
 
-    public void setAssociations(Collection collection) {
+    public void setAssociations(Collection collection)
+    {
         Set newAssociations = new HashSet(collection.size());
-        for (Iterator i = collection.iterator(); i.hasNext();) {
+        for (Iterator i = collection.iterator(); i.hasNext();)
+        {
             Association association = (Association) i.next();
             newAssociations.add(association);
         }
         associations = newAssociations;
     }
 
-    public void removeAssociation(Association association) {
+    public void removeAssociation(Association association)
+    {
         associations.remove(association);
     }
 
-    public void removeAssociations(Collection collection) {
+    public void removeAssociations(Collection collection)
+    {
         associations.removeAll(collection);
     }
 
-    public void addExternalIdentifier(ExternalIdentifier externalIdentifier) {
+    public void addExternalIdentifier(ExternalIdentifier externalIdentifier)
+    {
         externalIds.add(externalIdentifier);
-        ((ExternalIdentifierImpl)externalIdentifier).setRegistryObject(this);
+        ((ExternalIdentifierImpl) externalIdentifier).setRegistryObject(this);
     }
 
-    public void addExternalIdentifiers(Collection collection) {
-        for (Iterator i = collection.iterator(); i.hasNext();) {
+    public void addExternalIdentifiers(Collection collection)
+    {
+        for (Iterator i = collection.iterator(); i.hasNext();)
+        {
             ExternalIdentifier externalId = (ExternalIdentifier) i.next();
             externalIds.add(externalId);
-            ((ExternalIdentifierImpl)externalId).setRegistryObject(this);
+            ((ExternalIdentifierImpl) externalId).setRegistryObject(this);
         }
     }
 
-    public void removeExternalIdentifier(ExternalIdentifier externalIdentifier) {
+    public void removeExternalIdentifier(ExternalIdentifier externalIdentifier)
+    {
         externalIds.remove(externalIdentifier);
-        ((ExternalIdentifierImpl)externalIdentifier).setRegistryObject(null);
+        ((ExternalIdentifierImpl) externalIdentifier).setRegistryObject(null);
     }
 
-    public void removeExternalIdentifiers(Collection collection) {
+    public void removeExternalIdentifiers(Collection collection)
+    {
         //Lets clear out the reference to this in the ext id
         Iterator iter = collection.iterator();
-        while(iter != null && iter.hasNext())
+        while (iter != null && iter.hasNext())
         {
-           ExternalIdentifier externalId = (ExternalIdentifier) iter.next();
-           ((ExternalIdentifierImpl)externalId).setRegistryObject(null);
+            ExternalIdentifier externalId = (ExternalIdentifier) iter.next();
+            ((ExternalIdentifierImpl) externalId).setRegistryObject(null);
         }
         externalIds.removeAll(collection);
     }
 
-    public Collection getExternalIdentifiers() {
-        return Collections.unmodifiableSet(externalIds) ;
+    public Collection getExternalIdentifiers()
+    {
+        return Collections.unmodifiableSet(externalIds);
     }
 
-    public void setExternalIdentifiers(Collection collection) {
+    public void setExternalIdentifiers(Collection collection)
+    {
         Set newExternalIds = new HashSet(collection.size());
-        for (Iterator i = collection.iterator(); i.hasNext();) {
+        for (Iterator i = collection.iterator(); i.hasNext();)
+        {
             ExternalIdentifier externalId = (ExternalIdentifier) i.next();
             newExternalIds.add(externalId);
         }
         externalIds = newExternalIds;
     }
 
-    public void addExternalLink(ExternalLink externalLink) {
+    public void addExternalLink(ExternalLink externalLink)
+    {
         externalLinks.add(externalLink);
-        ((ExternalLinkImpl)externalLink).addLinkedObject(this);
+        ((ExternalLinkImpl) externalLink).addLinkedObject(this);
     }
 
-    public void addExternalLinks(Collection collection) {
-        for (Iterator i = collection.iterator(); i.hasNext();) {
+    public void addExternalLinks(Collection collection)
+    {
+        for (Iterator i = collection.iterator(); i.hasNext();)
+        {
             ExternalLink externalLink = (ExternalLink) i.next();
             externalLinks.add(externalLink);
-            ((ExternalLinkImpl)externalLink).addLinkedObject(this);
+            ((ExternalLinkImpl) externalLink).addLinkedObject(this);
         }
     }
 
-    public void removeExternalLink(ExternalLink externalLink) {
-        ((ExternalLinkImpl)externalLink).removeLinkedObject(this);
+    public void removeExternalLink(ExternalLink externalLink)
+    {
+        ((ExternalLinkImpl) externalLink).removeLinkedObject(this);
         externalLinks.remove(externalLink);
     }
 
-    public void removeExternalLinks(Collection collection) {
+    public void removeExternalLinks(Collection collection)
+    {
         Iterator iter = collection.iterator();
-        while(iter != null && iter.hasNext())
+        while (iter != null && iter.hasNext())
         {
-           ExternalLink externalLink = (ExternalLink) iter.next();
-           ((ExternalLinkImpl)externalLink).removeLinkedObject(this);
+            ExternalLink externalLink = (ExternalLink) iter.next();
+            ((ExternalLinkImpl) externalLink).removeLinkedObject(this);
         }
         externalLinks.removeAll(collection);
     }
 
-    public Collection getExternalLinks() {
+    public Collection getExternalLinks()
+    {
         return Collections.unmodifiableSet(externalLinks);
     }
 
-    public void setExternalLinks(Collection collection) {
+    public void setExternalLinks(Collection collection)
+    {
         Set newExternalLinks = new HashSet(collection.size());
-        for (Iterator i = collection.iterator(); i.hasNext();) {
+        for (Iterator i = collection.iterator(); i.hasNext();)
+        {
             ExternalLink externalLink = (ExternalLink) i.next();
             newExternalLinks.add(externalLink);
         }
         externalLinks = newExternalLinks;
     }
 
-    public Organization getSubmittingOrganization() {
+    public Organization getSubmittingOrganization()
+    {
         return submittingOrganization;
     }
 
-    public LifeCycleManager getLifeCycleManager() {
+    public LifeCycleManager getLifeCycleManager()
+    {
         return lifeCycleManager;
     }
 
@@ -253,14 +298,16 @@
      * @param obj the object to compare to
      * @return true if the other object is of the same class and has the same key value
      */
-    public boolean equals(Object obj) {
+    public boolean equals(Object obj)
+    {
         if (obj == this) return true;
         if (obj == null || !this.getClass().equals(obj.getClass())) return false;
         final RegistryObjectImpl other = (RegistryObjectImpl) obj;
         return this.key != null && key.equals(other.key);
     }
 
-    public int hashCode() {
+    public int hashCode()
+    {
         return key == null ? 0 : key.hashCode();
     }
 
@@ -268,19 +315,23 @@
     // Level 1 features must throw exceptions
     ///////////////////////////////////////////////////////////////////////////
 
-    public Collection getAuditTrail() throws JAXRException {
+    public Collection getAuditTrail() throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public Collection getAssociatedObjects() throws JAXRException {
+    public Collection getAssociatedObjects() throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public Concept getObjectType() throws JAXRException {
+    public Concept getObjectType() throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public Collection getRegistryPackages() throws JAXRException {
+    public Collection getRegistryPackages() throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 }

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ServiceImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ServiceImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ServiceImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ServiceImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ServiceImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/ServiceImpl.java	Sun Jan 23 00:30:26 2005
@@ -18,11 +18,13 @@
 
 import javax.xml.registry.JAXRException;
 import javax.xml.registry.LifeCycleManager;
+import javax.xml.registry.UnexpectedObjectException;
 import javax.xml.registry.infomodel.Organization;
 import javax.xml.registry.infomodel.Service;
 import javax.xml.registry.infomodel.ServiceBinding;
 import java.util.ArrayList;
 import java.util.Collection;
+import java.util.Iterator;
 
 /**
  * Implements JAXR Interface.
@@ -30,7 +32,8 @@
  *
  * @author Anil Saldhana  <an...@apache.org>
  */
-public class ServiceImpl extends RegistryEntryImpl implements Service {
+public class ServiceImpl extends RegistryEntryImpl implements Service
+{
 
     private Organization org = null;
     private Collection serviceBindings = new ArrayList();
@@ -38,42 +41,60 @@
     /**
      * Creates a new instance of ServiceImpl
      */
-    public ServiceImpl(LifeCycleManager lifeCycleManager) {
+    public ServiceImpl(LifeCycleManager lifeCycleManager)
+    {
         super(lifeCycleManager);
     }
 
-    public void addServiceBinding(ServiceBinding serviceBinding)
-            throws JAXRException {
-        serviceBindings.add(serviceBinding);
-    }
-
-    public void addServiceBindings(Collection collection)
-            throws JAXRException {
-        serviceBindings.addAll(collection);
+    public void addServiceBinding(ServiceBinding sb)
+            throws JAXRException
+    {
+        serviceBindings.add(sb);
+        ((ServiceBindingImpl)sb).setService(this);
+    }
+
+    public void addServiceBindings(Collection col)
+            throws JAXRException
+    {
+       try{
+        Iterator iter = col.iterator();
+        while(iter.hasNext())
+        {
+            addServiceBinding((ServiceBinding)iter.next());
+        }
+       }catch(ClassCastException ce)
+       {
+           throw new UnexpectedObjectException(ce.getLocalizedMessage());
+       }
     }
 
     public Organization getProvidingOrganization()
-            throws JAXRException {
+            throws JAXRException
+    {
         if (org == null) return super.getSubmittingOrganization();
         return org;
     }
 
-    public Collection getServiceBindings() throws JAXRException {
+    public Collection getServiceBindings() throws JAXRException
+    {
         return serviceBindings;
     }
 
     public void removeServiceBinding(ServiceBinding serviceBinding)
-            throws JAXRException {
+            throws JAXRException
+    {
         serviceBindings.remove(serviceBinding);
     }
 
     public void removeServiceBindings(Collection collection)
-            throws JAXRException {
+            throws JAXRException
+    {
         serviceBindings.removeAll(collection);
     }
 
     public void setProvidingOrganization(Organization organization)
-            throws JAXRException {
+            throws JAXRException
+    {
         this.org = organization;
     }
 }

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/SlotImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/SlotImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/SlotImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/SlotImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/SlotImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/SlotImpl.java	Sun Jan 23 00:30:26 2005
@@ -16,83 +16,86 @@
  */
 package org.apache.ws.scout.registry.infomodel;
 
- import javax.xml.registry.infomodel.Slot;
- import javax.xml.registry.JAXRException;
- import java.util.Collection;
+import javax.xml.registry.JAXRException;
+import javax.xml.registry.infomodel.Slot;
+import java.util.Collection;
 import java.util.Collections;
 import java.util.HashSet;
 
- /**
-  * Implements Jaxr API
-  *
-  * @author <ma...@apache.org>Anil Saldhana
-  * @since Nov 20, 2004
-  */
- public class SlotImpl implements Slot
- {
-     private String slotType;
-     private String name;
-     private Collection values;
-
-     public SlotImpl()
-     {
-         values = Collections.EMPTY_SET;
-     }
-
-     public String getName() throws JAXRException
-     {
-       return name;
-     }
+/**
+ * Implements Jaxr API
+ *
+ * @author <ma...@apache.org>Anil Saldhana
+ * @since Nov 20, 2004
+ */
+public class SlotImpl implements Slot
+{
+    private String slotType;
+    private String name;
+    private Collection values;
+
+    public SlotImpl()
+    {
+        values = Collections.EMPTY_SET;
+    }
+
+    public String getName() throws JAXRException
+    {
+        return name;
+    }
 
-     public String getSlotType() throws JAXRException
-     {
+    public String getSlotType() throws JAXRException
+    {
         return slotType;
-     }
+    }
 
-     public Collection getValues() throws JAXRException
-     {
-         return values;
-     }
-
-     public void setName(String s) throws JAXRException
-     {
-         name = s;
-     }
-
-     public void setSlotType(String s) throws JAXRException
-     {
-         slotType = s;
-     }
-
-     public void setValues(Collection collection) throws JAXRException
-     {
-         if (collection == null) {
-             throw new IllegalArgumentException("values cannot be null");
-         }
-         // "the value of a Slot is locally unique within a slot instance"
-         // to enforce this, convert the supplied Collection to a Set
-         values = new HashSet(collection);
-     }
-
-     /**
-      * Slots can be used in Collections but the spec does not define equals()
-      * We define two slots with the same name as being equal as the spec says
-      * name is unique within the scope of the RegistryObject.
-      */
-     public boolean equals(Object o) {
-         if (this == o) return true;
-         if (!(o instanceof SlotImpl)) return false;
-
-         final SlotImpl slot = (SlotImpl) o;
-
-         if (name != null ? !name.equals(slot.name) : slot.name != null) return false;
-
-         return true;
-     }
-
-     public int hashCode() {
-         return (name != null ? name.hashCode() : 0);
-     }
- }
+    public Collection getValues() throws JAXRException
+    {
+        return values;
+    }
+
+    public void setName(String s) throws JAXRException
+    {
+        name = s;
+    }
+
+    public void setSlotType(String s) throws JAXRException
+    {
+        slotType = s;
+    }
+
+    public void setValues(Collection collection) throws JAXRException
+    {
+        if (collection == null)
+        {
+            throw new IllegalArgumentException("values cannot be null");
+        }
+        // "the value of a Slot is locally unique within a slot instance"
+        // to enforce this, convert the supplied Collection to a Set
+        values = new HashSet(collection);
+    }
+
+    /**
+     * Slots can be used in Collections but the spec does not define equals()
+     * We define two slots with the same name as being equal as the spec says
+     * name is unique within the scope of the RegistryObject.
+     */
+    public boolean equals(Object o)
+    {
+        if (this == o) return true;
+        if (!(o instanceof SlotImpl)) return false;
+
+        final SlotImpl slot = (SlotImpl) o;
+
+        if (name != null ? !name.equals(slot.name) : slot.name != null) return false;
+
+        return true;
+    }
+
+    public int hashCode()
+    {
+        return (name != null ? name.hashCode() : 0);
+    }
+}
 
 

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/SpecificationLinkImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/SpecificationLinkImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/SpecificationLinkImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/SpecificationLinkImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/SpecificationLinkImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/SpecificationLinkImpl.java	Sun Jan 23 00:30:26 2005
@@ -16,12 +16,12 @@
  */
 package org.apache.ws.scout.registry.infomodel;
 
-import javax.xml.registry.infomodel.SpecificationLink;
-import javax.xml.registry.infomodel.ServiceBinding;
-import javax.xml.registry.infomodel.RegistryObject;
-import javax.xml.registry.infomodel.InternationalString;
 import javax.xml.registry.JAXRException;
 import javax.xml.registry.LifeCycleManager;
+import javax.xml.registry.infomodel.InternationalString;
+import javax.xml.registry.infomodel.RegistryObject;
+import javax.xml.registry.infomodel.ServiceBinding;
+import javax.xml.registry.infomodel.SpecificationLink;
 import java.util.Collection;
 
 /**
@@ -31,7 +31,7 @@
  * @since Nov 20, 2004
  */
 public class SpecificationLinkImpl extends RegistryObjectImpl
-implements SpecificationLink
+        implements SpecificationLink
 {
     private Collection usageParams;
     private InternationalString descr;
@@ -45,22 +45,22 @@
 
     public ServiceBinding getServiceBinding() throws JAXRException
     {
-         return binding;
+        return binding;
     }
 
     public RegistryObject getSpecificationObject() throws JAXRException
     {
-         return specObj;
+        return specObj;
     }
 
     public InternationalString getUsageDescription() throws JAXRException
     {
-         return descr;
+        return descr;
     }
 
     public Collection getUsageParameters() throws JAXRException
     {
-         return usageParams;
+        return usageParams;
     }
 
     public void setSpecificationObject(RegistryObject registryObject) throws JAXRException
@@ -76,5 +76,11 @@
     public void setUsageParameters(Collection collection) throws JAXRException
     {
         usageParams = collection;
+    }
+
+    //Specific API
+    public void setServiceBinding(ServiceBinding s)
+    {
+        binding = s;
     }
 }

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/TelephoneNumberImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/TelephoneNumberImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/TelephoneNumberImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/TelephoneNumberImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/TelephoneNumberImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/TelephoneNumberImpl.java	Sun Jan 23 00:30:26 2005
@@ -26,62 +26,77 @@
  *
  * @author Anil Saldhana  <an...@apache.org>
  */
-public class TelephoneNumberImpl implements TelephoneNumber {
+public class TelephoneNumberImpl implements TelephoneNumber
+{
     private String number;
     private String type;
 
-    public TelephoneNumberImpl() {
+    public TelephoneNumberImpl()
+    {
     }
 
-    public String getNumber() {
+    public String getNumber()
+    {
         return number;
     }
 
-    public void setNumber(String number) {
+    public void setNumber(String number)
+    {
         this.number = number;
     }
 
-    public String getType() {
+    public String getType()
+    {
         return type;
     }
 
-    public void setType(String type) {
+    public void setType(String type)
+    {
         this.type = type;
     }
 
-    public String getAreaCode() throws JAXRException {
+    public String getAreaCode() throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public void setAreaCode(String areaCode) throws JAXRException {
+    public void setAreaCode(String areaCode) throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public String getCountryCode() throws JAXRException {
+    public String getCountryCode() throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public void setCountryCode(String countryCode) throws JAXRException {
+    public void setCountryCode(String countryCode) throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public String getExtension() throws JAXRException {
+    public String getExtension() throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public void setExtension(String extension) throws JAXRException {
+    public void setExtension(String extension) throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public String getUrl() throws JAXRException {
+    public String getUrl() throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public void setUrl(String url) throws JAXRException {
+    public void setUrl(String url) throws JAXRException
+    {
         throw new UnsupportedCapabilityException("Level 1 feature");
     }
 
-    public boolean equals(Object o) {
+    public boolean equals(Object o)
+    {
         if (this == o) return true;
         if (!(o instanceof TelephoneNumberImpl)) return false;
         final TelephoneNumberImpl telephoneNumber = (TelephoneNumberImpl) o;
@@ -90,14 +105,16 @@
         return true;
     }
 
-    public int hashCode() {
+    public int hashCode()
+    {
         int result;
         result = (number != null ? number.hashCode() : 0);
         result = 29 * result + (type != null ? type.hashCode() : 0);
         return result;
     }
 
-    public String toString() {
+    public String toString()
+    {
         return number == null ? "null" : number;
     }
 }

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/UserImpl.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/UserImpl.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/UserImpl.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/UserImpl.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/UserImpl.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/registry/infomodel/UserImpl.java	Sun Jan 23 00:30:26 2005
@@ -18,6 +18,7 @@
 
 import javax.xml.registry.JAXRException;
 import javax.xml.registry.LifeCycleManager;
+import javax.xml.registry.UnsupportedCapabilityException;
 import javax.xml.registry.infomodel.Organization;
 import javax.xml.registry.infomodel.PersonName;
 import javax.xml.registry.infomodel.User;
@@ -31,75 +32,98 @@
  *
  * @author Anil Saldhana  <an...@apache.org>
  */
-public class UserImpl extends RegistryObjectImpl implements User {
-    private PersonName personName = new PersonNameImpl();
+public class UserImpl extends RegistryObjectImpl implements User
+{
+    private PersonName personName = null;
 
     private Collection postalAddresses = new ArrayList();
     private Collection emailAddresses = new ArrayList();
     private Collection telnumbers = new ArrayList();
-    private URL url;
+
     private String type = "";
 
+    private Organization org = null;
+
     /**
      * Creates a new instance of UserImpl
      */
-    public UserImpl(LifeCycleManager lifeCycleManager) {
+    public UserImpl(LifeCycleManager lifeCycleManager)
+    {
         super(lifeCycleManager);
     }
 
-    public Organization getOrganization() throws JAXRException {
-        return null;
+    public Organization getOrganization() throws JAXRException
+    {
+        return org;
     }
 
-    public PersonName getPersonName() throws JAXRException {
+    public PersonName getPersonName() throws JAXRException
+    {
         return personName;
     }
 
-    public Collection getPostalAddresses() throws JAXRException {
+    public Collection getPostalAddresses() throws JAXRException
+    {
         return postalAddresses;
     }
 
     public Collection getTelephoneNumbers(String str)
-            throws JAXRException {
+            throws JAXRException
+    {
         return telnumbers;
     }
 
-    public String getType() throws JAXRException {
+    public String getType() throws JAXRException
+    {
         return type;
     }
 
-    public URL getUrl() throws JAXRException {
-        return url;
+    public URL getUrl() throws JAXRException
+    {
+        throw new UnsupportedCapabilityException();
     }
 
     public void setEmailAddresses(Collection collection)
-            throws JAXRException {
+            throws JAXRException
+    {
         emailAddresses = collection;
     }
 
-    public void setPersonName(PersonName pname) throws JAXRException {
+    public void setPersonName(PersonName pname) throws JAXRException
+    {
         personName = pname;
     }
 
     public void setPostalAddresses(Collection collection)
-            throws JAXRException {
+            throws JAXRException
+    {
         postalAddresses = collection;
     }
 
     public void setTelephoneNumbers(Collection collection)
-            throws JAXRException {
+            throws JAXRException
+    {
         telnumbers = collection;
     }
 
-    public void setType(String str) throws JAXRException {
+    public void setType(String str) throws JAXRException
+    {
         type = str;
     }
 
-    public void setUrl(URL uRL) throws JAXRException {
-        this.url = uRL;
+    public void setUrl(URL uRL) throws JAXRException
+    {
+        throw new UnsupportedCapabilityException();
     }
 
-    public Collection getEmailAddresses() throws JAXRException {
+    public Collection getEmailAddresses() throws JAXRException
+    {
         return emailAddresses;
+    }
+
+    //Specific API
+    public void setOrganization(Organization o)
+    {
+        org = o;
     }
 }

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutJaxrUddiHelper.java	Sun Jan 23 00:30:26 2005
@@ -301,6 +301,7 @@
         try
         {
             ct.setPersonName(new PersonName(user.getPersonName().getFullName()));
+            ct.setUseType(user.getType());
             //Postal Address
             Collection postc = user.getPostalAddresses();
             Iterator iterator = postc.iterator();

Modified: webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutUddiJaxrHelper.java
Url: http://svn.apache.org/viewcvs/webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutUddiJaxrHelper.java?view=diff&rev=126203&p1=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutUddiJaxrHelper.java&r1=126202&p2=webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutUddiJaxrHelper.java&r2=126203
==============================================================================
--- webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutUddiJaxrHelper.java	(original)
+++ webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout/util/ScoutUddiJaxrHelper.java	Sun Jan 23 00:30:26 2005
@@ -31,6 +31,8 @@
 import org.apache.juddi.datatype.business.Contact;
 import org.apache.juddi.datatype.business.Contacts;
 import org.apache.juddi.datatype.response.BusinessDetail;
+import org.apache.juddi.datatype.response.TModelDetail;
+import org.apache.juddi.datatype.response.TModelInfo;
 import org.apache.juddi.datatype.service.BusinessService;
 import org.apache.juddi.datatype.service.BusinessServices;
 import org.apache.juddi.datatype.tmodel.TModel;
@@ -39,6 +41,7 @@
 import org.apache.ws.scout.registry.infomodel.UserImpl;
 import org.apache.ws.scout.registry.infomodel.PersonNameImpl;
 import org.apache.ws.scout.registry.infomodel.ServiceImpl;
+import org.apache.ws.scout.registry.infomodel.ConceptImpl;
 
 import javax.xml.registry.JAXRException;
 import javax.xml.registry.LifeCycleManager;
@@ -68,6 +71,44 @@
  */
 public class ScoutUddiJaxrHelper
 {
+    public static Organization getOrganization(BusinessEntity entity,
+                                                   LifeCycleManager lcm)
+                throws JAXRException
+        {
+            Vector namevect = entity.getNameVector();
+            Name n = (Name)namevect.elementAt(0);
+            String name = n.getValue() ;
+            Vector descvect = entity.getDescriptionVector();
+            Description desc = (Description)descvect.elementAt(0);
+
+            Organization org = new OrganizationImpl(lcm);
+            org.setName(getIString(name,lcm));
+            org.setDescription(getIString((String)desc.getValue(),lcm));
+            org.setKey(lcm.createKey(entity.getBusinessKey()));
+
+            //Set Services also
+            BusinessServices services = entity.getBusinessServices();
+            Vector svect = services.getBusinessServiceVector();
+            for(int i=0; svect != null && i< svect.size();i++)
+            {
+                BusinessService s = (BusinessService)svect.elementAt(i);
+                org.addService(getService(s,lcm));
+            }
+            //Get Contacts or Users
+            Contacts contacts = entity.getContacts();
+            Vector cvect = contacts.getContactVector();
+            for(int i=0; cvect != null && i< cvect.size();i++)
+            {
+                Contact contact = (Contact)cvect.elementAt(i);
+                User user = new UserImpl(null);
+                String pname = contact.getPersonName().getValue();
+                user.setPersonName(new PersonNameImpl(pname));
+                org.addUser(user);
+            }
+            return org;
+        }
+
+
     public static Organization getOrganization(BusinessDetail bizdetail,
                                                LifeCycleManager lcm)
             throws JAXRException
@@ -101,6 +142,7 @@
             Contact contact = (Contact)cvect.elementAt(i);
             User user = new UserImpl(null);
             String pname = contact.getPersonName().getValue();
+            user.setType( contact.getUseType());
             user.setPersonName(new PersonNameImpl(pname));
             org.addUser(user);
         }
@@ -127,6 +169,46 @@
         Description desc = (Description)descvect.elementAt(0);
         serve.setDescription(lcm.createInternationalString(desc.getValue()));
         return serve;
+    }
+
+    public static Concept getConcept(TModelDetail tm, LifeCycleManager lcm)
+    throws JAXRException
+    {
+        Concept concept = new ConceptImpl(lcm);
+        Vector tc = tm.getTModelVector();
+        TModel tmodel = (TModel)tc.elementAt(0);
+        concept.setKey(lcm.createKey(tmodel.getTModelKey()));
+        concept.setName(lcm.createInternationalString( tmodel.getName() ) );
+
+        Vector descvect = tmodel.getDescriptionVector();
+        Description desc = (Description)descvect.elementAt(0);
+        concept.setDescription(lcm.createInternationalString(desc.getValue()));
+
+        return concept;
+    }
+
+    public static Concept getConcept(TModel tmodel, LifeCycleManager lcm)
+    throws JAXRException
+    {
+        Concept concept = new ConceptImpl(lcm);
+        concept.setKey(lcm.createKey(tmodel.getTModelKey()));
+        concept.setName(lcm.createInternationalString( tmodel.getName() ) );
+
+        Vector descvect = tmodel.getDescriptionVector();
+        Description desc = (Description)descvect.elementAt(0);
+        concept.setDescription(lcm.createInternationalString(desc.getValue()));
+
+        return concept;
+    }
+
+    public static Concept getConcept(TModelInfo tm, LifeCycleManager lcm)
+    throws JAXRException
+    {
+        Concept concept = new ConceptImpl(lcm);
+        concept.setKey(lcm.createKey(tm.getTModelKey()));
+        concept.setName(lcm.createInternationalString( tm.getName().getValue() ) );
+
+        return concept;
     }
 
 }

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


Re: Predefined Enumerations

Posted by Davanum Srinivas <da...@gmail.com>.
hehe..and BTW, nice work -
http://indicthreads.com/interviews/126/jboss_j2ee_server.html

-- dims


On Thu, 3 Feb 2005 09:25:43 -0800 (PST), Anil Saldhana
<an...@yahoo.com> wrote:
> Thanks Dims.  :-)
> 
> You have let me down. ;-)
> 
> I think I will hack an implementation that can be
> pulled out later and plugged in with a correct one.
> :-)
> 
> 
> --- Davanum Srinivas <da...@gmail.com> wrote:
> 
> > sorry. no clue :(
> >
> > -- dims
> >
> >
> > On Tue, 1 Feb 2005 22:32:24 -0800 (PST), Anil
> > Saldhana
> > <an...@yahoo.com> wrote:
> > > http://issues.apache.org/jira/browse/SCOUT-5
> > >
> > > Anybody has a good insight into whats the best way
> > to
> > > implement this?
> > >
> > > __________________________________
> > > Do you Yahoo!?
> > > Yahoo! Mail - Find what you need with new enhanced
> > search.
> > > http://info.mail.yahoo.com/mail_250
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > scout-dev-unsubscribe@ws.apache.org
> > > For additional commands, e-mail:
> > scout-dev-help@ws.apache.org
> > >
> > >
> >
> >
> > --
> > Davanum Srinivas -
> > http://webservices.apache.org/~dims/
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> > scout-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail:
> > scout-dev-help@ws.apache.org
> >
> >
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - now with 250MB free storage. Learn more.
> http://info.mail.yahoo.com/mail_250
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: scout-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: scout-dev-help@ws.apache.org
> 
> 


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/

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


Re: Predefined Enumerations

Posted by Anil Saldhana <an...@yahoo.com>.
Thanks Dims.  :-)

You have let me down. ;-)

I think I will hack an implementation that can be
pulled out later and plugged in with a correct one.
:-)


--- Davanum Srinivas <da...@gmail.com> wrote:

> sorry. no clue :(
> 
> -- dims
> 
> 
> On Tue, 1 Feb 2005 22:32:24 -0800 (PST), Anil
> Saldhana
> <an...@yahoo.com> wrote:
> > http://issues.apache.org/jira/browse/SCOUT-5
> > 
> > Anybody has a good insight into whats the best way
> to
> > implement this?
> > 
> > __________________________________
> > Do you Yahoo!?
> > Yahoo! Mail - Find what you need with new enhanced
> search.
> > http://info.mail.yahoo.com/mail_250
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> scout-dev-unsubscribe@ws.apache.org
> > For additional commands, e-mail:
> scout-dev-help@ws.apache.org
> > 
> > 
> 
> 
> -- 
> Davanum Srinivas -
> http://webservices.apache.org/~dims/
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> scout-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail:
> scout-dev-help@ws.apache.org
> 
> 



		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - now with 250MB free storage. Learn more.
http://info.mail.yahoo.com/mail_250

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


Re: Predefined Enumerations

Posted by Davanum Srinivas <da...@gmail.com>.
sorry. no clue :(

-- dims


On Tue, 1 Feb 2005 22:32:24 -0800 (PST), Anil Saldhana
<an...@yahoo.com> wrote:
> http://issues.apache.org/jira/browse/SCOUT-5
> 
> Anybody has a good insight into whats the best way to
> implement this?
> 
> __________________________________
> Do you Yahoo!?
> Yahoo! Mail - Find what you need with new enhanced search.
> http://info.mail.yahoo.com/mail_250
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: scout-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: scout-dev-help@ws.apache.org
> 
> 


-- 
Davanum Srinivas - http://webservices.apache.org/~dims/

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


Predefined Enumerations

Posted by Anil Saldhana <an...@yahoo.com>.
http://issues.apache.org/jira/browse/SCOUT-5

Anybody has a good insight into whats the best way to
implement this?


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Mail - Find what you need with new enhanced search.
http://info.mail.yahoo.com/mail_250

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


Re: svn commit: r126203 - in webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout: registry registry/infomodel util

Posted by Anil Saldhana <an...@yahoo.com>.
Hi Jeremy,
  this was the first time, I pressed auto format on my
scout code in my IntelliJ IDEA.  

I will take care that my commits are only of code
changes and not formatting.  :-)

Regards,
Anil

--- Jeremy Boynes <jb...@apache.org> wrote:

> anil@apache.org wrote:
> > Author: anil
> > Date: Sun Jan 23 00:30:26 2005
> > New Revision: 126203
> > 
> > URL:
> http://svn.apache.org/viewcvs?view=rev&rev=126203
> > Log:
> > Latest Scout Implementation.  There is a large
> scope for refactoring/improvement of the code.  I
> need to add the testcases also.
> > 
> 
> Anil,
> 
> To ease review and those of us trying to follow the
> project, please can 
> you separate formatting changes from actual code
> changes - most of this 
> diff seems to be formatting but there are real
> changes mixed in which 
> are hard to spot.
> 
> Thanks
> --
> Jeremy
 


		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com 

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


Re: svn commit: r126203 - in webservices/scout/trunk/modules/scout/src/java/org/apache/ws/scout: registry registry/infomodel util

Posted by Jeremy Boynes <jb...@apache.org>.
anil@apache.org wrote:
> Author: anil
> Date: Sun Jan 23 00:30:26 2005
> New Revision: 126203
> 
> URL: http://svn.apache.org/viewcvs?view=rev&rev=126203
> Log:
> Latest Scout Implementation.  There is a large scope for refactoring/improvement of the code.  I need to add the testcases also.
> 

Anil,

To ease review and those of us trying to follow the project, please can 
you separate formatting changes from actual code changes - most of this 
diff seems to be formatting but there are real changes mixed in which 
are hard to spot.

Thanks
--
Jeremy

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