Package javax.xml.registry.infomodel

Examples of javax.xml.registry.infomodel.InternationalString


  public static BusinessService getBusinessServiceFromJAXRService(
      Service service) throws JAXRException {
    BusinessService bs = objectFactory.createBusinessService();
    try {
      InternationalString iname = service.getName();
           
      addNames(bs.getName(), iname);
          
            InternationalString idesc = service.getDescription();
   
           addDescriptions(bs.getDescription(), idesc);

            Organization o = service.getProvidingOrganization();
View Full Code Here


/*
      if (s != null && s.getName() != null) {
                tm.setOperator(s.getName());
            }
*/
      InternationalString iname = classificationScheme.getName();
      
            tm.setName(getFirstName(iname));

      InternationalString idesc = classificationScheme.getDescription();
     
        addDescriptions(tm.getDescription(), idesc);

            IdentifierBag idBag = getIdentifierBagFromExternalIdentifiers(classificationScheme.getExternalIdentifiers());
            if (idBag!=null) {
View Full Code Here

            Slot sl2 = concept.getSlot("operator");
      if (sl2 != null && sl2.getName() != null)
        tm.setOperator(sl2.getName());
      */
      InternationalString iname = concept.getName();

            tm.setName(getFirstName(iname));

            InternationalString idesc = concept.getDescription();
     
            addDescriptions(tm.getDescription(), idesc);

//          External Links
            Collection<ExternalLink> externalLinks = concept.getExternalLinks();
View Full Code Here

            } else {
                biz.setBusinessKey("");
            }
      // Lets get the Organization attributes at the top level
     
      InternationalString iname = organization.getName();
     
      if (iname != null) {
                addNames(biz.getName(), iname);
      }
     
      InternationalString idesc = organization.getDescription();
     
            addDescriptions(biz.getDescription(), idesc);

      if (organization.getPrimaryContact() != null &&
        organization.getPrimaryContact().getPersonName()!= null &&
View Full Code Here

           if(url != null) {
             org.uddi.api_v3.OverviewURL ourl = new org.uddi.api_v3.OverviewURL();
             ourl.setValue(url.toString());
             od.setOverviewURL(ourl);
           }
           InternationalString extDesc = link.getDescription();
           if(extDesc != null) {
               Description description = objectFactory.createDescription();
               od.getDescription().add(description);
               description.setValue(extDesc.getValue());
           }
           return od;
       }
View Full Code Here

            RegistryService rs = connection.getRegistryService();
            BusinessQueryManager bqm = rs.getBusinessQueryManager();
            blm = rs.getBusinessLifeCycleManager();
          
            Concept concept = blm.createConcept(null, CONCEPT_NAME, "");
            InternationalString is = blm.createInternationalString("This is the concept for Apache Scout Test");
            concept.setDescription(is);

            //Lets provide a link to juddi registry
            ExternalLink wslink =
                    blm.createExternalLink("http://to-rhaps4.toronto.redhat.com:9000/juddi",
View Full Code Here

        try {
            RegistryService rs = connection.getRegistryService();
            blm = rs.getBusinessLifeCycleManager();
            Collection<Concept> concepts = new ArrayList<Concept>();
            Concept concept = blm.createConcept(null, "TestConcept", "");
            InternationalString is = blm.createInternationalString("This is the concept for Apache Scout Test");
            concept.setDescription(is);
            concepts.add(concept);

            BulkResponse br = blm.saveConcepts(concepts);
            assertEquals(BulkResponse.STATUS_SUCCESS, br.getStatus());
View Full Code Here

        RegistryService rs = connection.getRegistryService();
        BusinessQueryManager bqm = rs.getBusinessQueryManager();
        blm = rs.getBusinessLifeCycleManager();

        InternationalString is;
        BulkResponse br;
        Key key;
        Locale locale = Locale.GERMAN;

        // create Organization
       
        Organization organization = (Organization) blm.createObject(BusinessLifeCycleManager.ORGANIZATION);

        is = getIString(locale, "Apache Scout Org");
        is.setValue(Locale.JAPANESE, "Apache Scoot Org");
        organization.setName(is);
        is = getIString(locale, "This is the org for Apache Scout Test");
        is.setValue(Locale.JAPANESE, "This is the org for Apache Scout Test");
        organization.setDescription(is);

        Collection<Organization> organizations = new ArrayList<Organization>();
        organizations.add(organization);

        br = blm.saveOrganizations(organizations);
        checkResponse(br);

        assertEquals(1, br.getCollection().size());
        key = (Key) br.getCollection().iterator().next();

        Organization organization1 = (Organization) bqm.getRegistryObject(key.getId(), LifeCycleManager.ORGANIZATION);

        System.out.println(organization1.getName().getValue() + " " + organization1.getDescription().getValue());
       
        assertEquals(organization.getName().getValue(locale),
                     organization1.getName().getValue(locale));
        assertEquals(organization.getName().getValue(Locale.JAPANESE),
                organization1.getName().getValue(Locale.JAPANESE));
       
        assertEquals(organization.getDescription().getValue(locale),
                     organization1.getDescription().getValue(locale));
        assertEquals(organization.getDescription().getValue(Locale.JAPANESE),
                organization1.getDescription().getValue(Locale.JAPANESE));

        // create Service
        Service service = (Service) blm.createObject(BusinessLifeCycleManager.SERVICE);

        is = getIString(locale, "Apache Scout Service");
        is.setValue(Locale.JAPANESE, "Apache Scoot Service");
        service.setName(is);
        is = getIString(locale, "This is the service for Apache Scout Test");
        is.setValue(Locale.JAPANESE, "This is the service for Apache Scoot Test");
        service.setDescription(is);

        organization1.addService(service);
       
        Collection<Service> services = new ArrayList<Service>();
View Full Code Here

        blm = rs.getBusinessLifeCycleManager();

        Locale locale = Locale.GERMAN;

        Concept concept = (Concept) blm.createObject(BusinessLifeCycleManager.CONCEPT);
        InternationalString is;

        is = getIString(locale, "Apache Scout Concept -- APACHE SCOUT TEST");
        concept.setName(is);
        is = getIString(locale, "This is the concept for Apache Scout Test");
        concept.setDescription(is);
View Full Code Here

    private LocalizedString usString;
    private LocalizedString ukString;
    private LocalizedString caString;

    public void testAddLocalizedString() throws JAXRException {
        InternationalString is = new InternationalStringImpl(Locale.US, "USA", LocalizedString.DEFAULT_CHARSET_NAME);
        Collection localizedStrings = is.getLocalizedStrings();
        assertEquals(1, localizedStrings.size());
        assertTrue(localizedStrings.contains(usString));
        is.addLocalizedString(ukString);
        localizedStrings = is.getLocalizedStrings();
        assertEquals(2, localizedStrings.size());
        assertTrue(localizedStrings.contains(usString));
        assertTrue(localizedStrings.contains(ukString));

        // add again and see that we overwrite
        is.addLocalizedString(ukString);
        localizedStrings = is.getLocalizedStrings();
        assertEquals(2, localizedStrings.size());
        assertTrue(localizedStrings.contains(usString));
        assertTrue(localizedStrings.contains(ukString));
    }
View Full Code Here

TOP

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

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.