use of org.apache.sis.util.iso.ResourceInternationalString in project sis by apache.
the class Types method create.
/**
* Adds internationalized designation and definition information for all properties in the given type.
* Then, returns the result of {@link FeatureTypeBuilder#build()}.
*
* @param builder the feature type builder for which to add designations and definitions.
* @param previous previously created international strings as array of length 2.
* The first element is the designation and the second element is the definition.
*/
private static DefaultFeatureType create(final FeatureTypeBuilder builder, final Map<String, InternationalString[]> previous) {
for (final PropertyTypeBuilder p : builder.properties()) {
final GenericName name = p.getName();
if (!AttributeConvention.contains(name)) {
final InternationalString[] resources = previous.computeIfAbsent(name.toString(), (key) -> new InternationalString[] { new ResourceInternationalString("org.apache.sis.internal.storage.gpx.Designations", key), new ResourceInternationalString("org.apache.sis.internal.storage.gpx.Definitions", key) });
p.setDefinition(resources[1]);
p.setDesignation(resources[0]);
}
}
return builder.build();
}
Aggregations