Class Types.Description
java.lang.Object
org.apache.sis.util.AbstractInternationalString
org.apache.sis.util.ResourceInternationalString
org.apache.sis.util.iso.Types.Description
- All Implemented Interfaces:
Serializable, CharSequence, Comparable<org.opengis.util.InternationalString>, Formattable, org.opengis.util.InternationalString
- Direct Known Subclasses:
Types.CodeTitle
- Enclosing class:
Types
The
InternationalString returned by the Types.getDescription(…) methods.- Since:
- 0.3
- Version:
- 0.3
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ClassLoaderThe class loader to use for fetching GeoAPI resources.private static final longFor cross-version compatibility.Fields inherited from class ResourceInternationalString
key, resources -
Constructor Summary
ConstructorsConstructorDescriptionDescription(String resources, String key) Creates a new international string from the specified resource bundle and key. -
Method Summary
Modifier and TypeMethodDescription(package private) Stringfallback()Returns a fallback if no resource is found.protected final ResourceBundleLoads the resources using the class loader used for loading GeoAPI interfaces.(package private) static StringresourceKey(org.opengis.util.CodeList<?> code) Returns the resource key for the given code list.final StringReturns the description for the given locale, or fallback on a default description if no resources exist for that locale.Methods inherited from class ResourceInternationalString
equals, hashCodeMethods inherited from class AbstractInternationalString
charAt, compareTo, formatTo, length, subSequence, toStringMethods inherited from interface CharSequence
chars, codePoints
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDFor cross-version compatibility.- See Also:
-
CLASSLOADER
The class loader to use for fetching GeoAPI resources. Since the resources are bundled in the GeoAPI JAR file, we use the instance that loaded GeoAPI for more determinist behavior.
-
-
Constructor Details
-
Description
-
-
Method Details
-
getBundle
Loads the resources using the class loader used for loading GeoAPI interfaces.- Overrides:
getBundlein classResourceInternationalString- Parameters:
locale- the locale for which to get the resource bundle.- Returns:
- the resource bundle for the given locale.
- See Also:
-
toString
Returns the description for the given locale, or fallback on a default description if no resources exist for that locale.- Specified by:
toStringin interfaceorg.opengis.util.InternationalString- Overrides:
toStringin classResourceInternationalString- Parameters:
locale- the desired locale for the string to be returned.- Returns:
- the string in the specified locale, or in a fallback locale.
- See Also:
-
fallback
String fallback()Returns a fallback if no resource is found. -
resourceKey
Returns the resource key for the given code list.
-