Examples of SimpleInternationalString


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

    public void testProcessStep() throws IOException, JAXBException {
        final Marshaller         marshaller   = pool.acquireMarshaller();
        final Unmarshaller       unmarshaller = pool.acquireUnmarshaller();
        final DefaultProcessing  processing   = new DefaultProcessing();
        final DefaultProcessStep processStep  = new DefaultProcessStep("Some process step.");
        processing.setProcedureDescription(new SimpleInternationalString("Some procedure."));
        processStep.setProcessingInformation(processing);
        /*
         * XML marshalling, and compare with the content of "ProcessStep.xml" file.
         */
        final String xml = marshal(marshaller, processStep);
View Full Code Here

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

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

     * 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

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

    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

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

            if (title == null) {
                title = party.getPositionName();
                if (title == null) {
                    String name = party.getIndividualName();
                    if (name != null) {
                        title = new SimpleInternationalString(name);
                    }
                }
            }
        }
    }
View Full Code Here

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

    /**
     * Returns the given string as an {@code InternationalString} if non-null, or {@code null} otherwise.
     */
    private static InternationalString toInternationalString(final String value) {
        return (value != null) ? new SimpleInternationalString(value) : null;
    }
View Full Code Here

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

        if (list != null) {
            final Set<InternationalString> words = new LinkedHashSet<InternationalString>();
            for (String keyword : list.split(KEYWORD_SEPARATOR)) {
                keyword = keyword.trim();
                if (!keyword.isEmpty()) {
                    words.add(new SimpleInternationalString(keyword));
                }
            }
            if (!words.isEmpty()) {
                keywords = new DefaultKeywords();
                keywords.setKeywords(words);
View Full Code Here

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

            // Also add history.
            final String history = decoder.stringValue(HISTORY);
            if (history != null) {
                final DefaultDataQuality quality = new DefaultDataQuality();
                final DefaultLineage lineage = new DefaultLineage();
                lineage.setStatement(new SimpleInternationalString(history));
                quality.setLineage(lineage);
                addIfAbsent(metadata.getDataQualityInfo(), quality);
            }
        }
        /*
 
View Full Code Here

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

        if (duration != null) try {
            final TemporalFactory factory = TemporalUtilities.getTemporalFactory();
            InternationalString years = null;
            int value;
            if ((value = duration.getYears()) != 0) {
                years = new SimpleInternationalString(Integer.toString(value));
            }
            InternationalString months = null;
            if ((value = duration.getMonths()) != 0) {
                months = new SimpleInternationalString(Integer.toString(value));
            }
            InternationalString weeks = null; // no weeks in javax.xml.datatype.Duration
            InternationalString days = null;
            if ((value = duration.getDays()) != 0) {
                days = new SimpleInternationalString(Integer.toString(value));
            }
            InternationalString hours = null;
            if ((value = duration.getHours()) != 0) {
                hours = new SimpleInternationalString(Integer.toString(value));
            }
            InternationalString minutes = null;
            if ((value = duration.getMinutes()) != 0) {
                minutes = new SimpleInternationalString(Integer.toString(value));
            }
            InternationalString seconds = null;
            if ((value = duration.getSeconds()) != 0) {
                seconds = new SimpleInternationalString(Integer.toString(value));
            }
            metadata = factory.createPeriodDuration(years, months, weeks, days, hours, minutes, seconds);
        } catch (UnsupportedOperationException e) {
            warningOccured("setElement", e);
        }
View Full Code Here

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

                    authority = value;
                    continue;
                }
                else if (key.equals(REMARKS_KEY)) {
                    if (value instanceof String) {
                        value = new SimpleInternationalString((String) value);
                    }
                    remarks = value;
                    continue;
                }
            }
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.