Esri Geoportal Server
1.0

com.esri.gpt.server.csw.provider.local
Class ProviderFactory

java.lang.Object
  extended by com.esri.gpt.server.csw.provider.local.ProviderFactory
All Implemented Interfaces:
IProviderFactory

public class ProviderFactory
extends Object
implements IProviderFactory

Instantiates components associated with the execution of a requested CSW operation against the local catalog.


Constructor Summary
ProviderFactory()
          Default constructor
 
Method Summary
static void main(String[] args)
          Main unit test method.
 ICqlParser makeCqlParser(OperationContext context, String version)
          Makes an adapter for a csw:CqlText expression.
 IFilterParser makeFilterParser(OperationContext context, String version)
          Makes an adapter for an ogc:Filter.
 IOperationProvider makeOperationProvider(OperationContext context, String operationName)
          Makes an operation provider for a given operation name.
 IOriginalXmlProvider makeOriginalXmlProvider(OperationContext context)
          Makes a provider for documents in their original XML schema.
 IQueryEvaluator makeQueryEvaluator(OperationContext context)
          Makes an evaluator for a CSW query.
 RequestHandler makeRequestHandler(HttpServletRequest request, RequestContext requestContext, String cswSubContextPath, String resourceFilePrefix)
          Makes a CSW request handler.
 IResponseGenerator makeResponseGenerator(OperationContext context)
          Makes an appropriate CSW operation response generator.
 ISortByParser makeSortByParser(OperationContext context)
          Makes an adapter for an ogc:SortyBy clause.
static IProviderFactory newFactory(RequestContext requestContext)
          Instantiates a CSW provider factory for the local catalog.
static RequestHandler newHandler(RequestContext requestContext)
          Instantiates a CSW request handler the local catalog.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProviderFactory

public ProviderFactory()
Default constructor

Method Detail

main

public static void main(String[] args)
Main unit test method.

Parameters:
args - startup arguments

makeCqlParser

public ICqlParser makeCqlParser(OperationContext context,
                                String version)
                         throws OwsException
Makes an adapter for a csw:CqlText expression.

Specified by:
makeCqlParser in interface IProviderFactory
Parameters:
context - the operation context
version - the CSW constraint version
Returns:
the CQL adapter
Throws:
OwsException - if the method is unsupported

makeFilterParser

public IFilterParser makeFilterParser(OperationContext context,
                                      String version)
                               throws OwsException
Makes an adapter for an ogc:Filter.

Specified by:
makeFilterParser in interface IProviderFactory
Parameters:
context - the operation context
version - the CSW constraint version
Returns:
the filter adapter
Throws:
OwsException - if the method is unsupported

makeOperationProvider

public IOperationProvider makeOperationProvider(OperationContext context,
                                                String operationName)
                                         throws OwsException
Makes an operation provider for a given operation name.

Specified by:
makeOperationProvider in interface IProviderFactory
Parameters:
context - the operation context
operationName - the operation name
Returns:
the operation provider
Throws:
OwsException - if the method is unsupported

makeOriginalXmlProvider

public IOriginalXmlProvider makeOriginalXmlProvider(OperationContext context)
                                             throws OwsException
Makes a provider for documents in their original XML schema.

Specified by:
makeOriginalXmlProvider in interface IProviderFactory
Parameters:
context - the operation context
Returns:
the original XML provider
Throws:
OwsException - if the method is unsupported

makeQueryEvaluator

public IQueryEvaluator makeQueryEvaluator(OperationContext context)
                                   throws OwsException
Makes an evaluator for a CSW query.

Specified by:
makeQueryEvaluator in interface IProviderFactory
Parameters:
context - the operation context
Returns:
the query evaluator
Throws:
OwsException - if the method is unsupported

makeRequestHandler

public RequestHandler makeRequestHandler(HttpServletRequest request,
                                         RequestContext requestContext,
                                         String cswSubContextPath,
                                         String resourceFilePrefix)
Makes a CSW request handler.

Specified by:
makeRequestHandler in interface IProviderFactory
Parameters:
request - the HTTP servlet request
requestContext - the active request context
cswSubContextPath - the HTTP sub-context path associated with the CSW service
resourceFilePrefix - the path prefix for XML/XSLT resource files
Returns:
the request handler

makeResponseGenerator

public IResponseGenerator makeResponseGenerator(OperationContext context)
                                         throws OwsException
Makes an appropriate CSW operation response generator.

Specified by:
makeResponseGenerator in interface IProviderFactory
Parameters:
context - the operation context
Returns:
the response generator
Throws:
OwsException - if the method is unsupported

makeSortByParser

public ISortByParser makeSortByParser(OperationContext context)
                               throws OwsException
Makes an adapter for an ogc:SortyBy clause.

Specified by:
makeSortByParser in interface IProviderFactory
Parameters:
context - the operation context
Returns:
the sortBy adapter
Throws:
OwsException - if the method is unsupported

newHandler

public static RequestHandler newHandler(RequestContext requestContext)
Instantiates a CSW request handler the local catalog.

Parameters:
requestContext - the active request context
Returns:
the request handler

newFactory

public static IProviderFactory newFactory(RequestContext requestContext)
Instantiates a CSW provider factory for the local catalog.

By default, a new instance of com.esri.gpt.server.csw.provider.local.ProviderFactory is returned.

This can be overridden by the configuration parameter: /gptConfig/catalog/parameter@key="csw.provider.local.IProviderFactory"

Parameters:
requestContext - the active request context
Returns:
the provider factory

Esri Geoportal Server
1.0

Copyright 2011 Environmental Systems Research Institute. All rights reserved. Use is subject to license terms.