Package javax.xml.registry.infomodel

Examples of javax.xml.registry.infomodel.InternationalString


        assertTrue(localizedStrings.contains(usString));
        assertTrue(localizedStrings.contains(ukString));
    }

    public void testAddLocalizedStrings() 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));
        ArrayList strings = new ArrayList(2);
        strings.add(ukString);
        strings.add(caString);
        is.addLocalizedStrings(strings);
        localizedStrings = is.getLocalizedStrings();
        assertEquals(3, localizedStrings.size());
        assertTrue(localizedStrings.contains(usString));
        assertTrue(localizedStrings.contains(caString));
        assertTrue(localizedStrings.contains(ukString));
    }
View Full Code Here


        assertTrue(localizedStrings.contains(caString));
        assertTrue(localizedStrings.contains(ukString));
    }

    public void testGetValue() throws JAXRException {
        InternationalString is = new InternationalStringImpl();
        is.addLocalizedString(usString);
        is.addLocalizedString(defaultString);
        is.addLocalizedString(ukString);
        assertEquals("default", is.getValue());
    }
View Full Code Here

        is.addLocalizedString(ukString);
        assertEquals("default", is.getValue());
    }

    public void testSetValue() throws JAXRException {
        InternationalString is = new InternationalStringImpl();
        is.addLocalizedString(defaultString);
        is.setValue("foo");
        assertEquals("foo", is.getValue());
    }
View Full Code Here

        is.setValue("foo");
        assertEquals("foo", is.getValue());
    }

    public void testGetValueWithLocale() throws JAXRException {
        InternationalString is = new InternationalStringImpl();
        is.addLocalizedString(usString);
        is.addLocalizedString(ukString);
        assertEquals("USA", is.getValue(Locale.US));
    }
View Full Code Here

        is.addLocalizedString(ukString);
        assertEquals("USA", is.getValue(Locale.US));
    }

    public void testGetValueWithUndefinedLocale() throws JAXRException {
        InternationalString is = new InternationalStringImpl();
        is.addLocalizedString(usString);
        assertNull(is.getValue(Locale.UK));
    }
View Full Code Here

        is.addLocalizedString(usString);
        assertNull(is.getValue(Locale.UK));
    }

    public void testSetValueWithLocale() throws JAXRException {
        InternationalString is = new InternationalStringImpl();
        is.addLocalizedString(usString);
        is.addLocalizedString(ukString);
        is.setValue(Locale.US, "foo");
        assertEquals("foo", is.getValue(Locale.US));
        assertEquals("England", is.getValue(Locale.UK));
        assertEquals(2, is.getLocalizedStrings().size());
    }
View Full Code Here

        assertEquals("England", is.getValue(Locale.UK));
        assertEquals(2, is.getLocalizedStrings().size());
    }

    public void testRemoveLocalizedString() throws JAXRException {
        InternationalString is = new InternationalStringImpl();
        is.addLocalizedString(usString);
        is.addLocalizedString(ukString);
        is.addLocalizedString(caString);
        assertEquals(3, is.getLocalizedStrings().size());
        is.removeLocalizedString(ukString);
        Collection localizedStrings = is.getLocalizedStrings();
        assertEquals(2, localizedStrings.size());
        assertTrue(localizedStrings.contains(usString));
        assertFalse(localizedStrings.contains(ukString));
        assertTrue(localizedStrings.contains(caString));
    }
View Full Code Here

        assertFalse(localizedStrings.contains(ukString));
        assertTrue(localizedStrings.contains(caString));
    }

    public void testRemoveLocalizedStrings() throws JAXRException {
        InternationalString is = new InternationalStringImpl();
        is.addLocalizedString(usString);
        is.addLocalizedString(ukString);
        is.addLocalizedString(caString);
        assertEquals(3, is.getLocalizedStrings().size());
        Collection localizedStrings = new ArrayList();
        localizedStrings.add(usString);
        localizedStrings.add(caString);
        is.removeLocalizedStrings(localizedStrings);
        localizedStrings = is.getLocalizedStrings();
        assertEquals(1, localizedStrings.size());
        assertFalse(localizedStrings.contains(usString));
        assertTrue(localizedStrings.contains(ukString));
        assertFalse(localizedStrings.contains(caString));
    }
View Full Code Here

        assertTrue(localizedStrings.contains(ukString));
        assertFalse(localizedStrings.contains(caString));
    }

    public void testGetLocalizedString() throws JAXRException {
        InternationalString is = new InternationalStringImpl();
        is.addLocalizedString(usString);
        assertEquals(usString, is.getLocalizedString(Locale.US, LocalizedString.DEFAULT_CHARSET_NAME));
        assertNull(is.getLocalizedString(Locale.US, "US-ASCII"));
    }
View Full Code Here

           Service svc = serviceBinding.getService();
      if (svc != null && svc.getKey() != null && svc.getKey().getId() != null) {
              bt.setServiceKey(svc.getKey().getId());
           }
     
      InternationalString idesc = serviceBinding.getDescription();
           
            addDescriptions(bt.getDescription(), idesc);

      // SpecificationLink
           Collection<SpecificationLink> slcol = serviceBinding.getSpecificationLinks();
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.