Hello all

Yesterday, I committed the first pieces of GeoAPI implementations. My previous commits were only plumbing (utility methods, etc.). So we are getting closer to more interesting stuff.

The GeoAPI implementation committed yesterday was the most basic type: InternationalString (not yet a very geographic stuff...). The idea is inspired from JSR-150 (Internationalization Service for J2EE) with support for time zone removed (for now). The idea is that we are going to handle potentially big objects that should be the same for every languages. For example the WGS84 Coordinate Reference System is the same object no matter the spoken language, and would be represented in Apache SIS by the same instance for everyone. Nevertheless it still need to provide localized descriptions of itself, especially when used on a server serving web pages to users all around the world. So instead of providing methods like:

    String getDomainOfValidity();

it provides:

    InternationalString getDomainOfValidity();

where InternationalString is basically a java.lang.CharSequence with a toString(Locale) method. Maybe you noticed that the utility methods committed recently were designed to work on CharSequence rather than String; this was obviously on purpose :-).

We do not provide the following method:

    String getDomainOfValidity(Locale);

because it is sometime too early for knowing the locale. For example we may want to use the domain of validity for building a new metadata object, which needs itself to be internationalizable (the INSPIRE legislation defines a TextGroup for this purpose which works basically in the same way).

The classes are there:

https://builds.apache.org/job/sis-trunk/site/apidocs/org/apache/sis/util/type/package-summary.html

The Javadoc discusses about "GenericName" which are not yet there, but they will be committed probably next week.

    Martin

Reply via email to