org.n52.oxf.owsCommon
Class OwsExceptionReport

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.n52.oxf.owsCommon.OwsExceptionReport
All Implemented Interfaces:
Serializable

public class OwsExceptionReport
extends Exception

Implementation of the ows service exception. The exception codes are defined according the ows common spec. version 1.0

Version:
0.1
Author:
Alexander C. Walkowski
See Also:
Serialized Form

Nested Class Summary
static class OwsExceptionReport.ExceptionCode
          ExceptionCodes as defined in the OWS Common Implementation Specification 0.3.0
static class OwsExceptionReport.ExceptionLevel
          Exception levels
 
Constructor Summary
OwsExceptionReport()
          standard constructor without parameters, sets the ExceptionLevel on PlainExceptions
OwsExceptionReport(OwsExceptionReport.ExceptionLevel excLevelIn)
          ´constructor with exceptionLevel as parameter
OwsExceptionReport(String message, Throwable cause)
          constructor with message and cause as parameters
OwsExceptionReport(Throwable cause)
          constructor with cause as parameter
 
Method Summary
 void addCodedException(OwsExceptionReport.ExceptionCode code, String locator, Exception e)
          adds a coded Exception to this service exception with code, locator and the exception itself as parameters
 void addCodedException(OwsExceptionReport.ExceptionCode code, String locator, String message)
          adds a coded Exception with ExceptionCode,locator and a single String message to this exception
 void addCodedException(OwsExceptionReport.ExceptionCode code, String locator, String[] messages)
          adds a coded exception to this exception with code, locator and messages as parameters
 void addServiceException(OwsExceptionReport seIn)
          adds a ServiceException to this exception
 boolean containsCode(OwsExceptionReport.ExceptionCode ec)
          checks whether the ExceptionCode parameter is contain in this exception
 boolean containsExceptions()
          checks whether this service exception contains another exception
 net.opengis.ows.x11.ExceptionReportDocument getDocument()
           
 ArrayList<net.opengis.ows.x11.ExceptionType> getExceptions()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

OwsExceptionReport

public OwsExceptionReport()
standard constructor without parameters, sets the ExceptionLevel on PlainExceptions


OwsExceptionReport

public OwsExceptionReport(String message,
                          Throwable cause)
constructor with message and cause as parameters

Parameters:
message - String containing the message of this exception
cause - Throwable cause of this exception

OwsExceptionReport

public OwsExceptionReport(Throwable cause)
constructor with cause as parameter

Parameters:
cause - Throwable cause of this exception

OwsExceptionReport

public OwsExceptionReport(OwsExceptionReport.ExceptionLevel excLevelIn)
´constructor with exceptionLevel as parameter

Parameters:
excLevelIn -
Method Detail

getExceptions

public ArrayList<net.opengis.ows.x11.ExceptionType> getExceptions()
Returns:
Returns the ExceptionTypes of this exception

addCodedException

public void addCodedException(OwsExceptionReport.ExceptionCode code,
                              String locator,
                              String[] messages)
adds a coded exception to this exception with code, locator and messages as parameters

Parameters:
code - ExceptionCode of the added exception
locator - String locator of this exception
messages - String[] messages of this exception

addServiceException

public void addServiceException(OwsExceptionReport seIn)
adds a ServiceException to this exception

Parameters:
seIn - ServiceException which should be added

containsCode

public boolean containsCode(OwsExceptionReport.ExceptionCode ec)
checks whether the ExceptionCode parameter is contain in this exception

Parameters:
ec - ExceptionCode which should be checked
Returns:
Returns boolean true if ExceptionCode is contained, otherwise false

addCodedException

public void addCodedException(OwsExceptionReport.ExceptionCode code,
                              String locator,
                              Exception e)
adds a coded Exception to this service exception with code, locator and the exception itself as parameters

Parameters:
code - ExceptionCode of the added exception
locator - String locator of the added exception
e - Exception which should be added

getDocument

public net.opengis.ows.x11.ExceptionReportDocument getDocument()
Returns:
Returns the ExceptionReportDocument XmlBean created from this service exception

containsExceptions

public boolean containsExceptions()
checks whether this service exception contains another exception

Returns:
Returns true if this service exception contains another exception

addCodedException

public void addCodedException(OwsExceptionReport.ExceptionCode code,
                              String locator,
                              String message)
adds a coded Exception with ExceptionCode,locator and a single String message to this exception

Parameters:
code - Exception code of the exception to add
locator - String locator of the exception to add
message - String message of the exception to add


Copyright © 2005 - 2010 52°North Initiative for Geospatial Open Source Software GmbH. All rights reserved.