Package org.apache.sis.util.iso

Examples of org.apache.sis.util.iso.SimpleInternationalString


        instance = new DefaultCitation(HardCodedCitations.EPSG);
        assertFalse(std.equals(instance, HardCodedCitations.GEOTIFF, ComparisonMode.STRICT));
        assertTrue (std.equals(instance, HardCodedCitations.EPSG,    ComparisonMode.STRICT));

        // test comparison with a modified copy
        instance.setTitle(new SimpleInternationalString("A dummy title"));
        assertFalse(std.equals(instance, HardCodedCitations.EPSG,    ComparisonMode.STRICT));
    }
View Full Code Here


     * Creates a metadata object having a cyclic association. The cycle is between
     * {@code platform.instrument} and {@code instrument.isMountedOn}.
     */
    static DefaultPlatform createCyclicMetadata() {
        final DefaultInstrument instrument = new DefaultInstrument();
        instrument.setType(new SimpleInternationalString("An instrument type."));
        final DefaultPlatform platform = new DefaultPlatform();
        platform.setDescription(new SimpleInternationalString("A platform."));
        instrument.setMountedOn(platform);
        platform.getInstruments().add(instrument);
        return platform;
    }
View Full Code Here

    public void testEqualsOnCyclicMetadata() {
        final DefaultPlatform p1 = createCyclicMetadata();
        final DefaultPlatform p2 = createCyclicMetadata();
        assertTrue(p1.equals(p2));
        ((DefaultInstrument) getSingleton(p2.getInstruments()))
                .setType(new SimpleInternationalString("An other instrument type."));
        assertFalse(p1.equals(p2));
    }
View Full Code Here

     * {@link DefaultGeorectified#setCheckPointAvailable(boolean)}.
     */
    @Test
    public void testCheckPointAvailable() {
        final DefaultGeorectified metadata = new DefaultGeorectified();
        final InternationalString description = new SimpleInternationalString("A check point description.");
        assertFalse("checkPointAvailability", metadata.isCheckPointAvailable());

        // Setting the description shall set automatically the availability.
        metadata.setCheckPointDescription(description);
        assertTrue("checkPointAvailability", metadata.isCheckPointAvailable());
View Full Code Here

    /**
     * Creates the citation to use for testing purpose.
     */
    private static DefaultCitation createCitation() {
        final DefaultCitation citation = new DefaultCitation();
        final InternationalString title = new SimpleInternationalString("Undercurrent");
        citation.setTitle(title);
        citation.setISBN("9782505004509");
        citation.getPresentationForms().add(PresentationForm.DOCUMENT_HARDCOPY);
        citation.getPresentationForms().add(PresentationForm.IMAGE_HARDCOPY);
        citation.getAlternateTitles().add(new SimpleInternationalString("Alt A"));
        citation.getAlternateTitles().add(new SimpleInternationalString("Alt B"));

        final DefaultResponsibleParty author = new DefaultResponsibleParty();
        author.setIndividualName("Testsuya Toyoda");
        author.setRole(Role.AUTHOR);
        citation.getCitedResponsibleParties().add(author);
View Full Code Here

     */
    @Test
    public void testTreeWithCustomElements() {
        final DefaultKeywords keywords = new DefaultKeywords();
        keywords.setKeywords(Arrays.asList(
                new SimpleInternationalString("Apple"),
                new SimpleInternationalString("Orange"),
                new SimpleInternationalString("Kiwi")));

        final DefaultDataIdentification identification = new DefaultDataIdentification();
        identification.setDescriptiveKeywords(Collections.singleton(keywords));
        identification.setTopicCategories(Arrays.asList(
                TopicCategory.HEALTH,
View Full Code Here

     *
     * @return The title given at construction time.
     */
    @Override
    public InternationalString getTitle() {
        return new SimpleInternationalString(title);
    }
View Full Code Here

    public static final class InternationalString extends StringConverter<org.opengis.util.InternationalString> {
        private static final long serialVersionUID = -7386778914761469877L;
        public InternationalString() {super(org.opengis.util.InternationalString.class);} // Instantiated by ServiceLoader.

        @Override org.opengis.util.InternationalString doConvert(String source) {
            return new SimpleInternationalString(source);
        }
View Full Code Here

     */
    @Test
    public void testToUnlocalizedString() {
        assertNull  (        StringAdapter.toString((CharSequence) null));
        assertEquals("Test", StringAdapter.toString("Test"));
        assertEquals("Test", StringAdapter.toString(new SimpleInternationalString("Test")));
    }
View Full Code Here

        final TreeTable.Node child1 = parent.newChild();
        final TreeTable.Node child2 = root  .newChild();
        root  .setValue(NAME, new StringBuilder("Root"));
        parent.setValue(NAME, "A parent");
        child1.setValue(NAME, new StringBuilder("A child"));
        child2.setValue(NAME, new SimpleInternationalString("A child"));
        root  .setValue(VALUE_AS_NUMBER, 8);
        parent.setValue(VALUE_AS_NUMBER, 4);

        final String asString = table.toString();
        assertEquals(3, replaceCharSequences(table, null));
View Full Code Here

TOP

Related Classes of org.apache.sis.util.iso.SimpleInternationalString

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.