org.opengis.referencing.ObjectFactory Maven / Gradle / Ivy
Show all versions of gt-opengis Show documentation
/*
* GeoTools - The Open Source Java GIS Toolkit
* http://geotools.org
*
* (C) 2011, Open Source Geospatial Foundation (OSGeo)
* (C) 2003-2005, Open Geospatial Consortium Inc.
*
* All Rights Reserved. http://www.opengis.org/legal/
*/
package org.opengis.referencing;
import java.util.Collections;
import java.util.Locale;
import java.util.Map;
import java.util.Properties;
import org.opengis.annotation.Extension;
import org.opengis.metadata.Identifier;
import org.opengis.metadata.citation.Citation;
import org.opengis.util.GenericName;
import org.opengis.util.InternationalString;
/**
* Base interface for all factories of {@linkplain IdentifiedObject identified objects}. Factories
* build up complex objects from simpler objects or values. This factory allows applications to make
* {@linkplain org.opengis.referencing.cs.CoordinateSystem coordinate systems}, {@linkplain
* org.opengis.referencing.datum.Datum datum} or {@linkplain
* org.opengis.referencing.crs.CoordinateReferenceSystem coordinate reference systems} that cannot
* be created by an {@linkplain AuthorityFactory authority factory}. This factory is very flexible,
* whereas the authority factory is easier to use.
*
* Object properties
* Most factory methods expect a {@link Map} argument. The map can be a {@link Properties} instance.
* The map shall contains at least a {@code "name"} property. In the common case where the name is
* the only property, the map may be constructed with
* Collections.{@linkplain Collections#singletonMap singletonMap}("name", theName)
* where theName is an arbitrary name as free text.
*
*
Implementations are encouraged to recognize at least the properties listed in the following
* table. Additional implementation-specific properties can be added. Unknown properties shall be
* ignored.
*
*
*
*
*
* Property name
* Value type
* Value given to
*
*
* {@value org.opengis.referencing.IdentifiedObject#NAME_KEY}
* {@link org.opengis.referencing.ReferenceIdentifier} or {@link String}
* {@link IdentifiedObject#getName}
*
*
* {@value org.opengis.referencing.IdentifiedObject#ALIAS_KEY}
* {@link String}, {@linkplain String}[]
,
* {@link GenericName} or {@linkplain GenericName}[]
* {@link IdentifiedObject#getAlias}
*
*
* {@value org.opengis.metadata.Identifier#AUTHORITY_KEY}
* {@link String} or {@link Citation}
* {@link Identifier#getAuthority} on the {@linkplain IdentifiedObject#getName name}
*
*
* {@value org.opengis.referencing.ReferenceIdentifier#CODESPACE_KEY}
* {@link String}
* {@link ReferenceIdentifier#getCodeSpace} on the {@linkplain IdentifiedObject#getName name}
*
*
* {@value org.opengis.referencing.ReferenceIdentifier#VERSION_KEY}
* {@link String}
* {@link ReferenceIdentifier#getVersion} on the {@linkplain IdentifiedObject#getName name}
*
*
* {@value org.opengis.referencing.IdentifiedObject#IDENTIFIERS_KEY}
* {@link Identifier} or {@linkplain Identifier}[]
* {@link IdentifiedObject#getIdentifiers}
*
*
* {@value org.opengis.referencing.IdentifiedObject#REMARKS_KEY}
* {@link String} or {@link InternationalString}
* {@link IdentifiedObject#getRemarks}
*
*
*
* The {@code "name"} property is mandatory. All others are optional. All localizable attributes
* like {@code "remarks"} can have a language and country code suffix. For example the {@code
* "remarks_fr"} property stands for remarks in {@linkplain Locale#FRENCH French} and the {@code
* "remarks_fr_CA"} property stands for remarks in {@linkplain Locale#CANADA_FRENCH French
* Canadian}.
*
* @version Implementation specification 1.0
* @author Martin Desruisseaux (IRD)
* @since GeoAPI 2.0
*/
@Extension
public interface ObjectFactory extends Factory {}