001 //$HeadURL: svn+ssh://rbezema@svn.wald.intevation.org/deegree/base/tags/2.1/src/org/deegree/model/csct/cs/CoordinateSystemAuthorityFactory.java $
002 /*
003 * SEAGIS - An OpenSource implementation of OpenGIS specification
004 * (C) 2001, Institut de Recherche pour le D�veloppement
005 *
006 * This library is free software; you can redistribute it and/or
007 * modify it under the terms of the GNU Lesser General Public
008 * License as published by the Free Software Foundation; either
009 * version 2.1 of the License, or (at your option) any later version.
010 *
011 * This library is distributed in the hope that it will be useful,
012 * but WITHOUT ANY WARRANTY; without even the implied warranty of
013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
014 * Lesser General Public License for more details.
015 *
016 * You should have received a copy of the GNU Lesser General Public
017 * License along with this library; if not, write to the Free Software
018 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
019 *
020 *
021 * Contacts:
022 * FRANCE: Surveillance de l'Environnement Assist�e par Satellite
023 * Institut de Recherche pour le D�veloppement / US-Espace
024 * mailto:seasnet@teledetection.fr
025 *
026 * CANADA: Observatoire du Saint-Laurent
027 * Institut Maurice-Lamontagne
028 * mailto:osl@osl.gc.ca
029 *
030 * This package contains documentation from OpenGIS specifications.
031 * OpenGIS consortium's work is fully acknowledged here.
032 */
033 package org.deegree.model.csct.cs;
034
035 // Properties
036 import java.util.NoSuchElementException;
037
038 import org.deegree.model.csct.units.Unit;
039
040
041 /**
042 * Creates spatial reference objects using codes. The codes are maintained by an external authority.
043 * A commonly used authority is EPSG, which is also used in the GeoTIFF standard.
044 *
045 * @version 1.00
046 * @author OpenGIS (www.opengis.org)
047 * @author Martin Desruisseaux
048 *
049 * @author last edited by: $Author: apoth $
050 *
051 * @version $Revision: 7055 $, $Date: 2007-05-10 09:26:53 +0200 (Do, 10 Mai 2007) $
052 *
053 * @see "org.opengis.cs.CS_CoordinateSystemAuthorityFactory"
054 */
055 public abstract class CoordinateSystemAuthorityFactory {
056 /**
057 * The underlying factory used for objects creation.
058 */
059 protected final CoordinateSystemFactory factory;
060
061 /**
062 * Construct an authority factory using the specified coordinate system factory.
063 *
064 * @param factory
065 * The underlying factory used for objects creation.
066 */
067 public CoordinateSystemAuthorityFactory( final CoordinateSystemFactory factory ) {
068 Info.ensureNonNull( "factory", factory );
069 this.factory = factory;
070 }
071
072 /**
073 * Returns the authority name.
074 *
075 * @return the authority name.
076 */
077 public abstract String getAuthority();
078
079 /**
080 * Returns an {@link Ellipsoid} object from a code.
081 *
082 * @param code
083 * Value allocated by authority.
084 * @return The ellipsoid object.
085 * @throws NoSuchElementException
086 * if this method can't find the requested code.
087 *
088 */
089 public Ellipsoid createEllipsoid( final String code )
090 throws NoSuchElementException {
091 throw new NoSuchElementException( code );
092 }
093
094 /**
095 * Returns a {@link Unit} object from a code.
096 *
097 * @param code
098 * Value allocated by authority.
099 * @return The unit object.
100 * @throws NoSuchElementException
101 * if this method can't find the requested code.
102 *
103 */
104 public Unit createUnit( final String code )
105 throws NoSuchElementException {
106 throw new NoSuchElementException( code );
107 }
108
109
110 }