Package org.geotools.util

Examples of org.geotools.util.SimpleInternationalString


        InternationalString _minutes = null;
        InternationalString _seconds = null;

        long temp = durationInMilliSeconds / yearMS;
        if (temp >= 1) {
            _years = new SimpleInternationalString(String.valueOf(temp));
            durationInMilliSeconds -= temp * yearMS;
        }
        this.years = _years;

        temp = durationInMilliSeconds / monthMS;
        if (temp >= 1) {
            _months = new SimpleInternationalString(String.valueOf(temp));
            durationInMilliSeconds -= temp * monthMS;
        }
        this.months = _months;

        temp = durationInMilliSeconds / weekMS;
        if (temp >= 1) {
            _week = new SimpleInternationalString(String.valueOf(temp));
            durationInMilliSeconds -= temp * weekMS;
        }
        this.weeks = _week;

        //we look if the gap is more than one day (86400000 ms)
        temp = durationInMilliSeconds / dayMS;
        if (temp >= 1) {
            _days = new SimpleInternationalString(String.valueOf(temp));
            durationInMilliSeconds -= temp * dayMS;
        }
        this.days = _days;

        temp = durationInMilliSeconds / hourMS;
        if (temp >= 1) {
            _hours = new SimpleInternationalString(String.valueOf(temp));
            durationInMilliSeconds -= temp * hourMS;
        }
        this.hours = _hours;

        temp = durationInMilliSeconds / minMS;
        if (temp >= 1) {
            _minutes = new SimpleInternationalString(String.valueOf(temp));
            durationInMilliSeconds -= temp * minMS;
        }
        this.minutes = _minutes;

        temp = durationInMilliSeconds / secondMS;
        if (temp >= 1) {
            _seconds = new SimpleInternationalString(String.valueOf(temp));
            durationInMilliSeconds -= temp * secondMS;
        }
        this.seconds = _seconds;

    /*if (durationInMilliSeconds != 0) {
View Full Code Here


        this(new GraphicImpl(),
                null,
                null,
                null,
                new DescriptionImpl(
                    new SimpleInternationalString("title"),
                    new SimpleInternationalString("abstract")));
    }
View Full Code Here

      return Classes.getShortName( binding );
    }
    return name;
  }
    private InternationalString description() {
        return description != null ? new SimpleInternationalString(description) : null;
    }
View Full Code Here

                intString.add("", "_" + lang, translations.get(lang));
            }
            return intString;
        } else {
            String simpleText = getFirstChildValue(root);
            return new SimpleInternationalString(simpleText  == null ? "" : simpleText);
        }
    }
View Full Code Here

        assertEquals("remarks_fr_CA", "Pareil",                identifier.getRemarks().toString(Locale.CANADA_FRENCH));
        assertEquals("remarks_fr_BE", "Voici des remarques",   identifier.getRemarks().toString(new Locale("fr", "BE")));

        if (false) {
            // Disabled in order to avoid logging a warning (it disturb the JUnit output)
            properties.put("remarks", new SimpleInternationalString("Overrides remarks"));
            identifier = new NamedIdentifier(properties);
            assertEquals("remarks", "Overrides remarks", identifier.getRemarks().toString(Locale.ENGLISH));
        }

        assertNotNull(properties.remove("authority"));
View Full Code Here

     *
     * @param english
     * @return SimpleInternationalString
     */
    public static InternationalString text(String english){
        return new SimpleInternationalString( english );
    }
View Full Code Here

     * example {@link String}, {@link InternationalString}, {@link URI}, etc.
     */
    private static Object convert(final Class<?> valueType, final Object value) {
        if (value!=null && !valueType.isAssignableFrom(value.getClass())) {
            if (InternationalString.class.isAssignableFrom(valueType)) {
               return new SimpleInternationalString(value.toString());
            }
            if (URL.class.isAssignableFrom(valueType)) try {
                return new URL(value.toString());
            } catch (MalformedURLException exception) {
                // TODO: localize and provides more details.
View Full Code Here

            if (elementType.isInstance(argument)) {
                parsed = argument;
            } else if (argument instanceof CharSequence) {
                final String text = argument.toString();
                if (InternationalString.class.isAssignableFrom(elementType)) {
                    parsed = new SimpleInternationalString(text);
                } else if (File.class.isAssignableFrom(elementType)) {
                    parsed = new File(text);
                } else if (URL.class.isAssignableFrom(elementType)) try {
                    parsed = new URL(text);
                } catch (MalformedURLException e) {
View Full Code Here

    public CitationImpl(final CharSequence title) {
        final InternationalString t;
        if (title instanceof InternationalString) {
            t = (InternationalString) title;
        } else {
            t = new SimpleInternationalString(title.toString());
        }
        setTitle(t);
    }
View Full Code Here

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

TOP

Related Classes of org.geotools.util.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.