Package javax.xml.registry.infomodel

Examples of javax.xml.registry.infomodel.Classification


    Collection<Classification> classifications = null;
    if (categoryBag != null) {
      classifications = new ArrayList<Classification>();
      List<KeyedReference> keyedReferenceList = categoryBag.getKeyedReference();
      for (KeyedReference keyedReference : keyedReferenceList) {
        Classification classification = new ClassificationImpl(lifeCycleManager);
        classification.setValue(keyedReference.getKeyValue());
        classification.setName(new InternationalStringImpl(keyedReference.getKeyName()));
        String tmodelKey = keyedReference.getTModelKey();
        if (tmodelKey != null) {
          ClassificationScheme scheme = new ClassificationSchemeImpl(lifeCycleManager);
          scheme.setKey(new KeyImpl(tmodelKey));
          classification.setClassificationScheme(scheme);
        }
        classifications.add(classification);
      }
    }
    return classifications;
View Full Code Here


    Collection<Classification> classifications = null;
    if (categoryBag != null) {
      classifications = new ArrayList<Classification>();
      List<KeyedReference> keyedReferenceList = categoryBag.getKeyedReference();
      for (KeyedReference keyedReference : keyedReferenceList) {
        Classification classification = new ClassificationImpl(lifeCycleManager);
        classification.setValue(keyedReference.getKeyValue());
        classification.setName(new InternationalStringImpl(keyedReference.getKeyName()));
        String tmodelKey = keyedReference.getTModelKey();
        if (tmodelKey != null) {
          ClassificationScheme scheme = new ClassificationSchemeImpl(lifeCycleManager);
          scheme.setKey(new KeyImpl(tmodelKey));
          classification.setClassificationScheme(scheme);
        }
        classifications.add(classification);
      }
    }
    return classifications;
View Full Code Here

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

    public Classification createClassification(Concept concept) throws JAXRException, InvalidRequestException {
        if (concept.getClassificationScheme() == null) {
            throw new InvalidRequestException("Concept is not under classification scheme");
        }
        Classification classify = (Classification) this.createObject(LifeCycleManager.CLASSIFICATION);
        classify.setConcept(concept);
        return classify;
    }
View Full Code Here

    }

    public Classification createClassification(ClassificationScheme scheme,
                                               InternationalString name,
                                               String value) throws JAXRException {
        Classification cl = (Classification) this.createObject(LifeCycleManager.CLASSIFICATION);
        cl.setClassificationScheme(scheme);
        cl.setName(name);
        cl.setValue(value);

        ((ClassificationImpl) cl).setExternal(true);

        return cl;
    }
View Full Code Here

            ServiceBinding serviceBinding = creator.createServiceBinding();
            service.addServiceBinding(serviceBinding);
            organization.addService(service);
            //Add a classification
            ClassificationScheme cs = finder.findClassificationSchemeByName(this.getClass().getName());
            Classification classification = creator.createClassification(cs);
            organization.addClassification(classification);
           
            User user = blm.createUser();
            PersonName personName = blm.createPersonName(PERSON_NAME);
            TelephoneNumber telephoneNumber = blm.createTelephoneNumber();
View Full Code Here

            service.setDescription(blm.createInternationalString("Registry Test Service Description"));
            Collection<String> findQualifiers = new ArrayList<String>();
            findQualifiers.add(FindQualifier.AND_ALL_KEYS);
            findQualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
            ClassificationScheme cScheme = bqm.findClassificationSchemeByName(findQualifiers, "org.jboss.soa.esb.:testcategory");
            Classification classification = blm.createClassification(cScheme, "category", "registry");
            service.addClassification(classification);
            organization.addService(service);
            Collection<Service> services = new ArrayList<Service>();
            services.add(service);
            BulkResponse br = blm.saveServices(services);
            assertEquals(BulkResponse.STATUS_SUCCESS, br.getStatus());
    } catch (JAXRException je) {
      fail(je.getMessage());
    }
      //find Service
        try
        {
            RegistryService rs = connection.getRegistryService();
            bqm = rs.getBusinessQueryManager();
            blm = rs.getBusinessLifeCycleManager();
            Finder finder = new Finder(bqm, uddiversion);
            //Find the service
            Service service = finder.findService("registry","Registry Test ServiceName", blm);
            assertEquals("Registry Test ServiceName", service.getName().getValue());
        } catch (JAXRException je) {
            fail(je.getMessage());
        }
        //publish serviceBinding
        try {
            RegistryService rs = connection.getRegistryService();
            bqm = rs.getBusinessQueryManager();
            blm = rs.getBusinessLifeCycleManager();
            Finder finder = new Finder(bqm, uddiversion);
            //Find the service
            Service service = finder.findService("registry","Registry Test ServiceName", blm);
           
            ServiceBinding serviceBinding = blm.createServiceBinding();
            serviceBinding.setDescription(blm.createInternationalString("eprDescription"));
            String xml = "<epr>epr uri</epr>";
            serviceBinding.setAccessURI(xml);
       
            ArrayList<ServiceBinding> serviceBindings = new ArrayList<ServiceBinding>();
            serviceBindings.add(serviceBinding);
            service.addServiceBindings(serviceBindings);
            Collection<String> findQualifiers = new ArrayList<String>();
            findQualifiers.add(FindQualifier.AND_ALL_KEYS);
            findQualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
            ClassificationScheme cScheme = bqm.findClassificationSchemeByName(findQualifiers, "org.jboss.soa.esb.:testcategory");
            Classification classification = blm.createClassification(cScheme, "category", "registry");
            service.addClassification(classification);
          
            BulkResponse br  = blm.saveServiceBindings(serviceBindings);
            assertEquals(BulkResponse.STATUS_SUCCESS, br.getStatus());
            BulkResponse br2  = blm.saveServiceBindings(serviceBindings); //Save one more
View Full Code Here

            ServiceBinding serviceBinding = creator.createServiceBinding();
            service.addServiceBinding(serviceBinding);
            organization.addService(service);
            //Add a classification
            ClassificationScheme cs = finder.findClassificationSchemeByName(this.getClass().getName());
            Classification classification = creator.createClassification(cs);
            organization.addClassification(classification);
           
            orgs.add(organization);

            //Now save the Organization along with a Service, ServiceBinding and Classification
View Full Code Here

            //Lets provide a link to juddi registry
            ExternalLink wslink =
                    blm.createExternalLink("http://to-rhaps4.toronto.redhat.com:9000/juddi",
                            "juddi");
            concept.addExternalLink(wslink);
            Classification cl = createClassificationForUDDI(bqm);

            concept.addClassification(cl);

            Collection<Concept> concepts = new ArrayList<Concept>();
            concepts.add(concept);
View Full Code Here

            throws JAXRException
    {
        //Scheme which maps onto uddi tmodel
        ClassificationScheme udditmodel = bqm.findClassificationSchemeByName(null, "uddi-org:types");

        Classification cl = blm.createClassification(udditmodel, "wsdl", "wsdl");
        return cl;
    }
View Full Code Here

TOP

Related Classes of javax.xml.registry.infomodel.Classification

Copyright © 2018 www.massapicom. 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.