org.geotools.catalog.shapefile
Class ShapefileServiceFactory

java.lang.Object
  extended byorg.geotools.catalog.shapefile.ShapefileServiceFactory
All Implemented Interfaces:
ServiceFactory

public class ShapefileServiceFactory
extends java.lang.Object
implements ServiceFactory


Constructor Summary
ShapefileServiceFactory()
           
 
Method Summary
 boolean canProcess(java.net.URI uri)
          Determines if the ServiceExtension can process the specified uri and use it to create a set of connection paramters.
 java.util.Map createParams(java.net.URI uri)
          The primary intention is for drag 'n' drop.
 Service createService(Catalog parent, java.net.URI id, java.util.Map params)
          Creates an IService based on the params provided.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShapefileServiceFactory

public ShapefileServiceFactory()
Method Detail

createService

public Service createService(Catalog parent,
                             java.net.URI id,
                             java.util.Map params)
Description copied from interface: ServiceFactory
Creates an IService based on the params provided. This may or may not return a singleton, caching is optional. Error messages can be retrieved using the getStatus and getMessage methods. It is important to note that this method must inspect the url to determine if it can be used to create the service. If it cannot, null must be returned.

Specified by:
createService in interface ServiceFactory
Parameters:
parent - The catalog containing the service, may be null
id - The sugested service id, should be generated when null.
params - The set of connection params. These param values may either be parsed, or unparsed (String).
Returns:
the IService created, or null when a service cannot be created from these params.
See Also:
IService#getStatus(), IService#getMessage()

canProcess

public boolean canProcess(java.net.URI uri)
Description copied from interface: ServiceFactory
Determines if the ServiceExtension can process the specified uri and use it to create a set of connection paramters.

Specified by:
canProcess in interface ServiceFactory
Parameters:
uri - The uri representing the service.
Returns:
true if the uri can be processed, otherwise false.

createParams

public java.util.Map createParams(java.net.URI uri)
Description copied from interface: ServiceFactory
The primary intention is for drag 'n' drop. This generates a set of params for the given URL ... in most cases this will be passed to the createService method. It is important to note that this method must inspect the url to determine if it can be used to create the service. If it cannot, null must be returned.

Specified by:
createParams in interface ServiceFactory
Parameters:
uri - The potential source of params.
Returns:
Map of params to be used for creation, null if the URL cannot be used.


Copyright © GeoTools. All Rights Reserved.