org.vfny.geoserver.responses
Class CapabilitiesResponse

java.lang.Object
  extended byorg.xml.sax.helpers.XMLFilterImpl
      extended byorg.vfny.geoserver.responses.CapabilitiesResponse
All Implemented Interfaces:
org.xml.sax.ContentHandler, org.xml.sax.DTDHandler, org.xml.sax.EntityResolver, org.xml.sax.ErrorHandler, Response, org.xml.sax.XMLFilter, org.xml.sax.XMLReader
Direct Known Subclasses:
Capabilities, WFSCapabilitiesResponse, WMSCapabilitiesResponse

public abstract class CapabilitiesResponse
extends org.xml.sax.helpers.XMLFilterImpl
implements Response, org.xml.sax.XMLReader

DOCUMENT ME!


Field Summary
protected  org.xml.sax.ContentHandler contentHandler
          handler to do the processing
protected  CapabilitiesRequest request
          Request provided passed to execute method
 
Constructor Summary
CapabilitiesResponse()
           
 
Method Summary
 void abort(GeoServer gs)
          Free up used resources used by execute method.
 void execute(Request request)
          Writes to a void output stream to throw any exception that can occur in writeTo too.
 java.lang.String getContentType(GeoServer gs)
          Mime type for the Capabilities document.
protected abstract  Service getGlobalService()
          DOCUMENT ME!
protected abstract  ResponseHandler getResponseHandler(org.xml.sax.ContentHandler contentHandler)
          DOCUMENT ME!
 void parse(org.xml.sax.InputSource input)
          walks the given collection.
 void parse(java.lang.String systemId)
          walks the given collection.
 void setContentHandler(org.xml.sax.ContentHandler handler)
          sets the content handler.
protected  void walk()
          DOCUMENT ME!
 void writeTo(java.io.OutputStream out)
          Writes the GetCapabilities document to out.
 
Methods inherited from class org.xml.sax.helpers.XMLFilterImpl
characters, endDocument, endElement, endPrefixMapping, error, fatalError, getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getParent, getProperty, ignorableWhitespace, notationDecl, processingInstruction, resolveEntity, setDocumentLocator, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setParent, setProperty, skippedEntity, startDocument, startElement, startPrefixMapping, unparsedEntityDecl, warning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xml.sax.XMLReader
getContentHandler, getDTDHandler, getEntityResolver, getErrorHandler, getFeature, getProperty, setDTDHandler, setEntityResolver, setErrorHandler, setFeature, setProperty
 

Field Detail

request

protected CapabilitiesRequest request
Request provided passed to execute method


contentHandler

protected org.xml.sax.ContentHandler contentHandler
handler to do the processing

Constructor Detail

CapabilitiesResponse

public CapabilitiesResponse()
Method Detail

execute

public void execute(Request request)
             throws ServiceException
Writes to a void output stream to throw any exception that can occur in writeTo too.

Specified by:
execute in interface Response
Parameters:
request - Request to be processed
Throws:
ServiceException - If anything goes wrong

abort

public void abort(GeoServer gs)
Free up used resources used by execute method.

Specified by:
abort in interface Response
Parameters:
gs - DOCUMENT ME!

getContentType

public java.lang.String getContentType(GeoServer gs)
Mime type for the Capabilities document.

Specified by:
getContentType in interface Response
Parameters:
gs - DOCUMENT ME!
Returns:
Mime type provided from GeoServer.getMimeType()
Throws:
java.lang.IllegalStateException - DOCUMENT ME!

writeTo

public void writeTo(java.io.OutputStream out)
             throws ServiceException
Writes the GetCapabilities document to out.

By the time this has been called the Framework has:

  1. Called execute( Request )
  2. Called getContentType()

If anything goes wrong the Framework will call abort() to allow for clean up of held resources.

Specified by:
writeTo in interface Response
Parameters:
out - OutputStream being returned to the user.
Throws:
ServiceException - DOCUMENT ME!
java.lang.IllegalStateException - DOCUMENT ME!
WfsException - DOCUMENT ME!

setContentHandler

public void setContentHandler(org.xml.sax.ContentHandler handler)
sets the content handler.

Specified by:
setContentHandler in interface org.xml.sax.XMLReader
Parameters:
handler - DOCUMENT ME!

parse

public void parse(java.lang.String systemId)
           throws java.io.IOException,
                  org.xml.sax.SAXException
walks the given collection.

Specified by:
parse in interface org.xml.sax.XMLReader
Parameters:
systemId - DOCUMENT ME!
Throws:
java.io.IOException - DOCUMENT ME!
org.xml.sax.SAXException - DOCUMENT ME!

parse

public void parse(org.xml.sax.InputSource input)
           throws java.io.IOException,
                  org.xml.sax.SAXException
walks the given collection.

Specified by:
parse in interface org.xml.sax.XMLReader
Parameters:
input - DOCUMENT ME!
Throws:
java.io.IOException - DOCUMENT ME!
org.xml.sax.SAXException - DOCUMENT ME!

walk

protected void walk()
             throws org.xml.sax.SAXException
DOCUMENT ME!

Throws:
org.xml.sax.SAXException - DOCUMENT ME!

getGlobalService

protected abstract Service getGlobalService()
DOCUMENT ME!

Returns:
DOCUMENT ME!

getResponseHandler

protected abstract ResponseHandler getResponseHandler(org.xml.sax.ContentHandler contentHandler)
DOCUMENT ME!

Returns:
DOCUMENT ME!