GeoAPI 1.0
Build 2004-05-18

org.opengis.referencing
Interface AuthorityFactory

All Known Subinterfaces:
CoordinateOperationAuthorityFactory, CRSAuthorityFactory, CSAuthorityFactory, DatumAuthorityFactory

public interface AuthorityFactory

Base interface for all authority factories. An authority is an organization that maintains definitions of authority codes. An authority code is a compact string defined by an authority to reference a particular spatial reference object. For example the European Petroleum Survey Group (EPSG) maintains a database of coordinate systems, and other spatial referencing objects, where each object has a code number ID. For example, the EPSG code for a WGS84 Lat/Lon coordinate system is '4326'.

This specification uses two character strings for spatial referencing objects identity. The first string identifies the "authority" or "nameSpace" that specifies multiple standard reference systems, e.g. "EPSG". The second string specifies the "authority code" or "name" of a particular reference system specified by that authority. In the case of "EPSG", the authority code will be a string representation of an integer.

This specification does not currently support editions or versions of reference systems. That is, no explicit way is provided to represent the edition of a reference system "authority" or "authority code". If multiple editions exist for a reference system, the interfaces assume that the latest edition is intended.

Version:
Implementation specification 1.0
Author:
OpenGIS® consortium

Method Summary
 Object createObject(String code)
          Returns an arbitrary object from a code.
 Citation getAuthority()
          Returns the organization or party responsible for definition and maintenance of the database.
 Set<String> getAuthorityCodes(Class type)
          Returns the set of authority codes of the given type.
 String getDescriptionText(String code, Locale locale)
          Gets a description of the object corresponding to a code.
 Factory getFactory()
          Returns the low-level factory used for object creation.
 

Method Detail

getFactory

Factory getFactory()
Returns the low-level factory used for object creation. For example an authority factory backed by an EPSG database will fetch informations from the database and use this low-level factory for creating objects from those informations.


getAuthority

Citation getAuthority()
Returns the organization or party responsible for definition and maintenance of the database.

UML identifier (mandatory attribute): CS_CoordinateSystemAuthorityFactory.authority  in 1.0 specification.

getAuthorityCodes

Set<String> getAuthorityCodes(Class type)
                              throws FactoryException
Returns the set of authority codes of the given type. The type argument specify the base class. For example if this factory is an instance of CRSAuthorityFactory, then:

Parameters:
type - The spatial reference objects type (may be Object.class).
Returns:
The set of authority codes for spatial reference objects of the given type. If this factory doesn't contains any object of the given type, then this method returns an empty set.
Throws:
FactoryException - if access to the underlying database failed.

getDescriptionText

String getDescriptionText(String code,
                          Locale locale)
                          throws FactoryException
Gets a description of the object corresponding to a code.

Parameters:
code - Value allocated by authority.
locale - The desired locale for the description to be returned, or null for a description in some default locale (may or may not be the system default).
Returns:
A description of the object, or null if the object corresponding to the specified code has no description.
Throws:
NoSuchAuthorityCodeException - if the specified code was not found.
FactoryException - if the query failed for some other reason.
UML identifier (operation): CS_CoordinateSystemAuthorityFactory.descriptionText  in 1.0 specification.

createObject

Object createObject(String code)
                    throws FactoryException
Returns an arbitrary object from a code. The returned object will typically be an instance of Datum, CoordinateSystem, ReferenceSystem or CoordinateOperation. If the type of the object is know at compile time, it is recommended to invoke the most precise method instead of this one (for example  createCoordinateReferenceSystem(code)  instead of  createObject(code)  if the caller know he is asking for a coordinate reference system).

Parameters:
code - Value allocated by authority.
Throws:
NoSuchAuthorityCodeException - if the specified code was not found.
FactoryException - if the object creation failed for some other reason.
See Also:
DatumAuthorityFactory.createDatum(java.lang.String), CRSAuthorityFactory.createCoordinateReferenceSystem(java.lang.String)

GeoAPI 1.0
Build 2004-05-18

Symbols, terms and definitions
Copyright OpenGIS® Consortium