Examples of BulkResponseImpl


Examples of com.sun.xml.registry.common.BulkResponseImpl

        *
        */
       BulkResponse transformResponse(TModelDetail detail, Collection keys,
       String type) throws JAXRException {

           BulkResponseImpl bResponse = null;
           if (detail != null) {
               bResponse = new BulkResponseImpl();
               Collection fbResponse = new ArrayList();

               Collection tModels =
                   detail.getTModel();
               Iterator iter = tModels.iterator();
               while (iter.hasNext()){
                   RegistryObject registryObject =
                   mapper.tModel2ConceptOrClassificationScheme((TModel)iter.next());
                   if (type.equals(mapper.FIND))
                       fbResponse.add(registryObject);
                   else
                       fbResponse.add(registryObject.getKey());
               }
               bResponse.setCollection(fbResponse);
           }
           return bResponse;
       }
View Full Code Here

Examples of com.sun.xml.registry.common.BulkResponseImpl

        */
       BulkResponse transformResponse(RegisteredInfo info,
                                             Collection keys, String type)
       throws JAXRException {

           BulkResponseImpl bResponse = null;
           if (info != null) {
               bResponse = new BulkResponseImpl();
               Collection fbResponse = new ArrayList();

               BusinessInfos infos = info.getBusinessInfos();
               Collection  binfos = infos.getBusinessInfo();
               Organization org = null;
               Iterator iter = binfos.iterator();
               while (iter.hasNext()){
                   org = mapper.businessInfo2Organization((BusinessInfo)iter.next());
                   fbResponse.add(org);
               }

               TModelInfos tminfos = info.getTModelInfos();
               Collection tinfos = tminfos.getTModelInfo();
               //get each TModelInfo
               ConceptImpl concept = null;
               Iterator titer = tinfos.iterator();
               while (titer.hasNext()){
                   concept = (ConceptImpl)
                           mapper.tModel2Concept((TModelInfo)titer.next());
                   //logger.finest("Transformed tmodel");
                   fbResponse.add(concept);
               }
               bResponse.setCollection(fbResponse);
           }
           return bResponse;
       }
View Full Code Here

Examples of com.sun.xml.registry.common.BulkResponseImpl

    BulkResponse transformResponse(PublisherAssertions assertions,
                                          Collection keys, String type)
    throws JAXRException {

        BulkResponseImpl bResponse = null;
        if (assertions != null) {
            bResponse = new BulkResponseImpl();
            String generic = assertions.getGeneric();
            String operator = assertions.getOperator();
            String authorizedName = assertions.getAuthorizedName();

            Collection publisherAssertions =
                assertions.getPublisherAssertion();

            Collection associations =
                mapper.publisherAssertions2Associations(publisherAssertions);

            if (type.equalsIgnoreCase(mapper.SAVE))
                 bResponse.setCollection(keys);
            else
                bResponse.setCollection(associations);
        }
        return bResponse;
    }
View Full Code Here

Examples of com.sun.xml.registry.common.BulkResponseImpl

             throw new JAXRException(jbe);
         }

         if (bulkResponse == null) {
            
             bulkResponse = new BulkResponseImpl();
         }
        

         return bulkResponse;
     }
View Full Code Here

Examples of com.sun.xml.registry.common.BulkResponseImpl

    BulkResponse transformResponse(AuthToken token, Collection keys, String type)
     throws JAXRException {
       

         BulkResponseImpl bulkResponse = new BulkResponseImpl();
         Collection tokens = new ArrayList();
         String authInfo = token.getAuthInfo();
        
         tokens.add(authInfo);
         bulkResponse.setCollection(tokens);

         return bulkResponse;
    }
View Full Code Here

Examples of com.sun.xml.registry.common.BulkResponseImpl

         */

      BulkResponse transformResponse(BusinessList list, Collection keys, String type)
        throws JAXRException {
           
            BulkResponseImpl bResponse = null;
            if (list != null) {
                bResponse = new BulkResponseImpl();
                Collection fbResponse = new ArrayList();
               
                BusinessInfos infos = list.getBusinessInfos();
                //Object infos2 = list.getBusinessInfos();
               
                //get each businessInfo
                //BusinessInfos infos = (BusinessInfos)infos2;
                Organization org = null;
                if (infos != null) {
                    //for (int i = 0; i < infos.getBusinessInfoLength(); i++) {
                       
                        Collection binfos = infos.getBusinessInfo();
                        Iterator iter = binfos.iterator();
                        while (iter.hasNext()){
                       
                        org = mapper.businessInfo2Organization((BusinessInfo)iter.next());
                       
                        fbResponse.add(org);
                    }
                }
                bResponse.setCollection(fbResponse);
            }
            return bResponse;
        }
View Full Code Here

Examples of com.sun.xml.registry.common.BulkResponseImpl

    BulkResponse transformResponse(AssertionStatusReport report,
                                              Collection keys, String type)
        throws JAXRException {

       
            BulkResponseImpl bResponse = new BulkResponseImpl();;
            if (report != null) {
                String generic = report.getGeneric();
                String operator = report.getOperator();
                Collection assertionStatusItems =
                    report.getAssertionStatusItem();
                Collection associations =
                    mapper.assertionStatusItems2Associations(assertionStatusItems);
                if (associations != null)
                    bResponse.setCollection(associations);
            }
            return bResponse;
        }
View Full Code Here

Examples of com.sun.xml.registry.common.BulkResponseImpl

        */

     BulkResponse transformResponse(RelatedBusinessesList list, Collection keys, String type)
       throws JAXRException {

           BulkResponseImpl bResponse = null;
           Collection fbResponse = new ArrayList();
           if (list != null) {
               bResponse = new BulkResponseImpl();
               RelatedBusinessInfos infos =
                       list.getRelatedBusinessInfos();
               //get each businessInfo
               Collection associations = null;
               Collection rinfos =
                           infos.getRelatedBusinessInfo();
               Iterator iter = rinfos.iterator();
               while (iter.hasNext()){
                   associations =
                           mapper.relatedBusinessInfo2Associations((RelatedBusinessInfo)iter.next(), keys);
                   if (associations != null){
                       fbResponse.addAll(associations);
                       //logger.finest("Added Associations");
                   }
               }
               bResponse.setCollection(fbResponse);
           }
           return bResponse;
       }
View Full Code Here

Examples of com.sun.xml.registry.common.BulkResponseImpl

        */

     BulkResponse transformResponse(ServiceList list, Collection keys, String type)
       throws JAXRException {

           BulkResponseImpl bResponse = null;
           if (list != null) {
               bResponse = new BulkResponseImpl();
               Collection fServiceResponse = new ArrayList();

               ServiceInfos infos = list.getServiceInfos();
               //get each businessInfo
               Collection sinfos = infos.getServiceInfo();
               Iterator iter = sinfos.iterator();
               Service service = null;
               while (iter.hasNext()){
                   service = mapper.serviceInfo2Service((ServiceInfo)iter.next());
                   fServiceResponse.add(service);
               }
               bResponse.setCollection(fServiceResponse);
           }
           return bResponse;
       }
View Full Code Here

Examples of com.sun.xml.registry.common.BulkResponseImpl

        */

      BulkResponse transformResponse(TModelList list, Collection keys,
                                             String type) throws JAXRException {

           BulkResponseImpl bResponse = new BulkResponseImpl();
           if (list != null) {
               bResponse = new BulkResponseImpl();
               Collection fTModelResponse = new ArrayList();

               TModelInfos infos = list.getTModelInfos();
               //do incremental load here so can get detail
               //get each TModelInfo
               ConceptImpl concept = null;
               Collection tkeys = new ArrayList();
               Collection tinfos = infos.getTModelInfo();
               Iterator iter = tinfos.iterator();
               while (iter.hasNext()){

                   String id = ((TModelInfo)iter.next()).getTModelKey();
                   KeyImpl key = new KeyImpl(id);
                   tkeys.add(key);
               }

               //now do a getConcepts
               //need to look at this -FIX??
               Collection schemes = new ArrayList();
               if (tkeys.size() > 0) {
                   BulkResponse response = mapper.getConcepts(tkeys);
                   if (response.getExceptions() == null) {
                       //get the objects for this
                       Collection rokeys = response.getCollection();
                       //need to return ClassificationSchemes
                       Iterator kiter = rokeys.iterator();
                       while (kiter.hasNext()) {
                           RegistryObject ro = (RegistryObject)kiter.next();
                           schemes.add(ro);
                       }
                   }
               }
               //set the bulk response
               bResponse.setCollection(schemes);
           }
           return bResponse;
       }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.