Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.deegree.portal.owswatch.validator
Class AbstractValidator

    java.lang.Object
      org.deegree.portal.owswatch.validator.AbstractValidator

All Implemented Interfaces:
  Validator

Direct Known Subclasses:
  CSWGetCapabilitiesValidator, CSWGetRecordsValidator, SOSDescribeSensorValidator, SOSGetCapabilitiesValidator, WCSGetCapabilitiesValidator, WCSGetCoverageValidator, WFSGetCapabilitiesValidator, WFSGetFeatureValidator, WMSGetCapabilitiesValidator, WMSGetMapValidator

    public abstract class AbstractValidator

extends Object
implements Validator

Abstract class implementing the method validate.

Version:
  $Revision: 20271 $, $Date: 2009-10-21 13:07:15 +0200 (Mi, 21. Okt 2009) $
Author:
  Moataz Elmasry, last edited by: $Author: jmays $

Constructor Summary
`AbstractValidator()`

Method Summary
`protected boolean` | `closeStream(InputStream stream)`
`protected InputStream` | `copyStream(InputStream stream)` Creates a new copy of the given InputStream
`protected DocumentBuilder` | `instantiateParser()` Creates a new instance of DocumentBuilder
`protected boolean` | `isValidHttpResponse(int statusCode)` Makes sure that the HttpResponse is not a critical error
`protected String` | `parseStream(InputStream stream)` Parses a given InputStream to a String
`ValidatorResponse` | `validateAnswer(org.apache.commons.httpclient.HttpMethodBase method, int statusCode)` Recieves an instance of HttpMethodBase, extracts the needed data from it and builds a ValidatorResponse instance
`protected ValidatorResponse` | `validateErrorHttpResponse(int statusCode)`
`protected ValidatorResponse` | `validateXml(org.apache.commons.httpclient.HttpMethodBase method)` Validates the HttpMethodBase and checks if the execution was successful or not
`protected ValidatorResponse` | `validateXmlServiceException(org.apache.commons.httpclient.HttpMethodBase method)` This method is called To read the ServiceExceptionReport from the xml file

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### AbstractValidator

    public AbstractValidator()

Method Detail

### validateAnswer

    public ValidatorResponse validateAnswer(org.apache.commons.httpclient.HttpMethodBase method,
                                            int statusCode)

  Description copied from interface: `Validator`
  Recieves an instance of HttpMethodBase, extracts the needed data from it and builds a ValidatorResponse instance

  Specified by:
    `validateAnswer` in interface `Validator`
  Returns:
    instance of ValidatorResponse extracted from HttpMethodBase

### validateXml

    protected ValidatorResponse validateXml(org.apache.commons.httpclient.HttpMethodBase method)

  Validates the HttpMethodBase and checks if the execution was successful or not

  Parameters:
    `method` - the httpmethod after executing it
  Returns:
    an instance of ValidatorResponse with the necessary information after validation

### validateXmlServiceException

    protected ValidatorResponse validateXmlServiceException(org.apache.commons.httpclient.HttpMethodBase method)

  This method is called To read the ServiceExceptionReport from the xml file

  Parameters:
    `method` - the httpmethod after executing it
  Returns:
    an instance of ValidatorResponse with the necessary information after validation

### isValidHttpResponse

    protected boolean isValidHttpResponse(int statusCode)

  Makes sure that the HttpResponse is not a critical error

  Parameters:
    `statusCode` -

### validateErrorHttpResponse

    protected ValidatorResponse validateErrorHttpResponse(int statusCode)

  Parameters:
    `statusCode` -
  Returns:
    instance of the validatorresponse with the error

### parseStream

    protected String parseStream(InputStream stream)
                          throws IOException

  Parses a given InputStream to a String

  Parameters:
    `stream` -
  Returns:
    String
  Throws:
    `IOException`

### instantiateParser

    protected DocumentBuilder instantiateParser()
                                         throws IOException

  Creates a new instance of DocumentBuilder

  Returns:
    DocumentBuilder
  Throws:
    `IOException`

### closeStream

    protected boolean closeStream(InputStream stream)

### copyStream

    protected InputStream copyStream(InputStream stream)
                              throws IOException

  Creates a new copy of the given InputStream

  Parameters:
    `stream` -
  Returns:
    InputStream
  Throws:
    `IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| deegree 2.4 (2010/11/11 10:47 build-27-official)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

an open source project founded by lat/lon, Bonn, Germany.
For more information visit: http://www.deegree.org