org.geotools.factory
Class BasicFactories

java.lang.Object
  extended by org.geotools.factory.BasicFactories

public class BasicFactories
extends java.lang.Object

Defines a common abstraction for getting the different factories. This default implementation provides support for only the most basic factories (referencing, etc.). Many methods thrown an FactoryNotFoundException in all cases, for example all methods related to GO-1 canvas objects. Those methods will be implemented later in a subclass.

Since:
2.3
Version:
$Id: BasicFactories.java 32736 2009-04-04 06:51:02Z jive $
Author:
Martin Desruisseaux

Field Summary
protected  Hints hints
          The hints to be used for all factory creation.
 
Constructor Summary
BasicFactories(java.util.Map hints)
          Creates a new instance of BasicFactories with the specified set of hints.
 
Method Summary
 org.opengis.metadata.citation.CitationFactory getCitationFactory()
          Returns the citation factory singleton.
 org.opengis.referencing.operation.CoordinateOperationAuthorityFactory getCoordinateOperationAuthorityFactory()
          Returns the coordinate operation authority factory singleton.
 org.opengis.referencing.operation.CoordinateOperationFactory getCoordinateOperationFactory()
          Returns the coordinate operation factory singleton.
 org.opengis.referencing.crs.CRSAuthorityFactory getCRSAuthorityFactory()
          Returns the CRS authority factory singleton.
 org.opengis.referencing.crs.CRSFactory getCRSFactory()
          Returns the CRS factory singleton.
 org.opengis.referencing.cs.CSAuthorityFactory getCSAuthorityFactory()
          Returns the CS authority factory singleton.
 org.opengis.referencing.cs.CSFactory getCSFactory()
          Returns the CS factory singleton.
 org.opengis.referencing.datum.DatumAuthorityFactory getDatumAuthorityFactory()
          Returns the datum authority factory singleton.
 org.opengis.referencing.datum.DatumFactory getDatumFactory()
          Returns the datum factory singleton.
static BasicFactories getDefault()
          Returns a default common factory instance.
 org.opengis.feature.type.FeatureTypeFactory getFeatureTypeFactory()
          Deprecated. use getFeatureTypeFactory().
 org.opengis.filter.FilterFactory getFilterFactory()
          Returns the filter factory singleton.
 org.opengis.geometry.coordinate.GeometryFactory getGeometryFactory(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
          Returns the geometry factory equiped to build geometries using the given coordinate reference system.
 org.opengis.util.NameFactory getNameFactory()
          Returns the name factory singleton.
 org.opengis.geometry.primitive.PrimitiveFactory getPrimitiveFactory(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
          Returns the primitive factory equiped to build primitives using the given coordinate reference system.
 org.opengis.feature.type.FeatureTypeFactory getTypeFactory()
          Deprecated. use getFeatureTypeFactory().
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hints

protected final Hints hints
The hints to be used for all factory creation.

Constructor Detail

BasicFactories

public BasicFactories(java.util.Map hints)
Creates a new instance of BasicFactories with the specified set of hints. The hints map should contains only the minimum set of hints, since this constructor will keep a reference to all objects found in this map.

Parameters:
hints - The hints to be used for all factory creation, or null if none.
Method Detail

getDefault

public static BasicFactories getDefault()
Returns a default common factory instance.


getTypeFactory

public org.opengis.feature.type.FeatureTypeFactory getTypeFactory()
                                                           throws FactoryRegistryException
Deprecated. use getFeatureTypeFactory().

Returns the feature type factory singleton.

NOTE: This method is not yet supported in Geotools. The default implementation thrown an exception in all case.

Throws:
FactoryNotFoundException - if no factory was found for the requested type.
FactoryRegistryException - if the factory can't be obtained for an other reason.

getFeatureTypeFactory

public org.opengis.feature.type.FeatureTypeFactory getFeatureTypeFactory()
                                                                  throws FactoryRegistryException
Deprecated. use getFeatureTypeFactory().

Returns the feature type factory singleton.

NOTE: This method is not yet supported in Geotools. The default implementation thrown an exception in all case.

Throws:
FactoryNotFoundException - if no factory was found for the requested type.
FactoryRegistryException - if the factory can't be obtained for an other reason.
Since:
2.5

getFilterFactory

public org.opengis.filter.FilterFactory getFilterFactory()
                                                  throws FactoryRegistryException
Returns the filter factory singleton.

NOTE: This method is not yet supported in Geotools. The default implementation thrown an exception in all case.

Throws:
FactoryNotFoundException - if no factory was found for the requested type.
FactoryRegistryException - if the factory can't be obtained for an other reason.

getNameFactory

public org.opengis.util.NameFactory getNameFactory()
                                            throws FactoryRegistryException
Returns the name factory singleton.

NOTE: This method is not yet supported in Geotools. The default implementation thrown an exception in all case.

Throws:
FactoryNotFoundException - if no factory was found for the requested type.
FactoryRegistryException - if the factory can't be obtained for an other reason.

getCitationFactory

public org.opengis.metadata.citation.CitationFactory getCitationFactory()
                                                                 throws FactoryRegistryException
Returns the citation factory singleton.

NOTE: This method is not yet supported in Geotools. The default implementation thrown an exception in all case.

Throws:
FactoryNotFoundException - if no factory was found for the requested type.
FactoryRegistryException - if the factory can't be obtained for an other reason.

getCRSAuthorityFactory

public org.opengis.referencing.crs.CRSAuthorityFactory getCRSAuthorityFactory()
                                                                       throws FactoryRegistryException
Returns the CRS authority factory singleton.

Throws:
FactoryNotFoundException - if no factory was found for the requested type.
FactoryRegistryException - if the factory can't be obtained for an other reason.

getCRSFactory

public org.opengis.referencing.crs.CRSFactory getCRSFactory()
                                                     throws FactoryRegistryException
Returns the CRS factory singleton.

Throws:
FactoryNotFoundException - if no factory was found for the requested type.
FactoryRegistryException - if the factory can't be obtained for an other reason.

getCSAuthorityFactory

public org.opengis.referencing.cs.CSAuthorityFactory getCSAuthorityFactory()
                                                                    throws FactoryRegistryException
Returns the CS authority factory singleton.

Throws:
FactoryNotFoundException - if no factory was found for the requested type.
FactoryRegistryException - if the factory can't be obtained for an other reason.

getCSFactory

public org.opengis.referencing.cs.CSFactory getCSFactory()
                                                  throws FactoryRegistryException
Returns the CS factory singleton.

Throws:
FactoryNotFoundException - if no factory was found for the requested type.
FactoryRegistryException - if the factory can't be obtained for an other reason.

getDatumAuthorityFactory

public org.opengis.referencing.datum.DatumAuthorityFactory getDatumAuthorityFactory()
                                                                             throws FactoryRegistryException
Returns the datum authority factory singleton.

Throws:
FactoryNotFoundException - if no factory was found for the requested type.
FactoryRegistryException - if the factory can't be obtained for an other reason.

getDatumFactory

public org.opengis.referencing.datum.DatumFactory getDatumFactory()
                                                           throws FactoryRegistryException
Returns the datum factory singleton.

Throws:
FactoryNotFoundException - if no factory was found for the requested type.
FactoryRegistryException - if the factory can't be obtained for an other reason.

getCoordinateOperationAuthorityFactory

public org.opengis.referencing.operation.CoordinateOperationAuthorityFactory getCoordinateOperationAuthorityFactory()
                                                                                                             throws FactoryRegistryException
Returns the coordinate operation authority factory singleton.

Throws:
FactoryNotFoundException - if no factory was found for the requested type.
FactoryRegistryException - if the factory can't be obtained for an other reason.

getCoordinateOperationFactory

public org.opengis.referencing.operation.CoordinateOperationFactory getCoordinateOperationFactory()
                                                                                           throws FactoryRegistryException
Returns the coordinate operation factory singleton.

Throws:
FactoryNotFoundException - if no factory was found for the requested type.
FactoryRegistryException - if the factory can't be obtained for an other reason.

getGeometryFactory

public org.opengis.geometry.coordinate.GeometryFactory getGeometryFactory(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
                                                                   throws FactoryRegistryException
Returns the geometry factory equiped to build geometries using the given coordinate reference system.

NOTE: This method is not yet supported in Geotools. The default implementation thrown an exception in all case.

Parameters:
crs - the coordinate reference system the geometry factory should use.
Returns:
the requested geometry factory or null if the coordinate reference system is not supported.
Throws:
FactoryNotFoundException - if no factory was found for the requested type.
FactoryRegistryException - if the factory can't be obtained for an other reason.

getPrimitiveFactory

public org.opengis.geometry.primitive.PrimitiveFactory getPrimitiveFactory(org.opengis.referencing.crs.CoordinateReferenceSystem crs)
                                                                    throws FactoryRegistryException
Returns the primitive factory equiped to build primitives using the given coordinate reference system.

NOTE: This method is not yet supported in Geotools. The default implementation thrown an exception in all case.

Parameters:
crs - the coordinate reference system the primitive factory should use.
Returns:
the requested primitive factory or null if the coordinate reference system is not supported.
Throws:
FactoryNotFoundException - if no factory was found for the requested type.
FactoryRegistryException - if the factory can't be obtained for an other reason.


Copyright © 1996-2010 Geotools. All Rights Reserved.