org.geotools.factory
Class BasicFactories

Object
  extended by BasicFactories

public class BasicFactories
extends 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
Author:
Martin Desruisseaux

Field Summary
protected  Hints hints
          The hints to be used for all factory creation.
 
Constructor Summary
BasicFactories(Map hints)
          Creates a new instance of BasicFactories with the specified set of hints.
 
Method Summary
 CitationFactory getCitationFactory()
          Returns the citation factory singleton.
 CoordinateOperationAuthorityFactory getCoordinateOperationAuthorityFactory()
          Returns the coordinate operation authority factory singleton.
 CoordinateOperationFactory getCoordinateOperationFactory()
          Returns the coordinate operation factory singleton.
 CRSAuthorityFactory getCRSAuthorityFactory()
          Returns the CRS authority factory singleton.
 CRSFactory getCRSFactory()
          Returns the CRS factory singleton.
 CSAuthorityFactory getCSAuthorityFactory()
          Returns the CS authority factory singleton.
 CSFactory getCSFactory()
          Returns the CS factory singleton.
 DatumAuthorityFactory getDatumAuthorityFactory()
          Returns the datum authority factory singleton.
 DatumFactory getDatumFactory()
          Returns the datum factory singleton.
static BasicFactories getDefault()
          Returns a default common factory instance.
 FeatureTypeFactory getFeatureTypeFactory()
          Deprecated. use getFeatureTypeFactory().
 FilterFactory getFilterFactory()
          Returns the filter factory singleton.
 GeometryFactory getGeometryFactory(CoordinateReferenceSystem crs)
          Returns the geometry factory equiped to build geometries using the given coordinate reference system.
 NameFactory getNameFactory()
          Returns the name factory singleton.
 PrimitiveFactory getPrimitiveFactory(CoordinateReferenceSystem crs)
          Returns the primitive factory equiped to build primitives using the given coordinate reference system.
 FeatureTypeFactory getTypeFactory()
          Deprecated. use getFeatureTypeFactory().
 
Methods inherited from class 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(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 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 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 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 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 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 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 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 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 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 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 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 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 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 GeometryFactory getGeometryFactory(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 PrimitiveFactory getPrimitiveFactory(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-2014 Geotools. All Rights Reserved.