diff options
Diffstat (limited to 'petascope/src/petascope/wcs/server/exceptions')
24 files changed, 1091 insertions, 0 deletions
diff --git a/petascope/src/petascope/wcs/server/exceptions/ActionNotSupportedException.java b/petascope/src/petascope/wcs/server/exceptions/ActionNotSupportedException.java new file mode 100644 index 0000000..70cb368 --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/ActionNotSupportedException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class ActionNotSupportedException extends WCSException +{ + private final static String error = "ActionNotSupported"; + + public ActionNotSupportedException(String message) + { + super(error, message); + } + + public ActionNotSupportedException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/BadResponseHandlerException.java b/petascope/src/petascope/wcs/server/exceptions/BadResponseHandlerException.java new file mode 100644 index 0000000..118eda1 --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/BadResponseHandlerException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class BadResponseHandlerException extends WCSException +{ + private static final String error = "BadResponseHandler"; + + public BadResponseHandlerException(String message) + { + super(error, message); + } + + public BadResponseHandlerException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/InputOutputException.java b/petascope/src/petascope/wcs/server/exceptions/InputOutputException.java new file mode 100644 index 0000000..610f1d6 --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/InputOutputException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class InputOutputException extends WCSException +{ + private static final String error = "InputOutputError"; + + public InputOutputException(String message) + { + super(error, message); + } + + public InputOutputException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/InternalComponentException.java b/petascope/src/petascope/wcs/server/exceptions/InternalComponentException.java new file mode 100644 index 0000000..3680dae --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/InternalComponentException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class InternalComponentException extends WCSException +{ + private static final String error = "InternalComponentError"; + + public InternalComponentException(String message) + { + super(error, message); + } + + public InternalComponentException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/InternalSqlException.java b/petascope/src/petascope/wcs/server/exceptions/InternalSqlException.java new file mode 100644 index 0000000..1ae95ce --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/InternalSqlException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class InternalSqlException extends WCSException +{ + private static final String error = "InternalSQLError"; + + public InternalSqlException(String message) + { + super(error, message); + } + + public InternalSqlException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/InvalidParameterValueException.java b/petascope/src/petascope/wcs/server/exceptions/InvalidParameterValueException.java new file mode 100644 index 0000000..ae863c2 --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/InvalidParameterValueException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class InvalidParameterValueException extends WCSException +{ + private static final String error = "InvalidParameterValue"; + + public InvalidParameterValueException(String message) + { + super(error, message); + } + + public InvalidParameterValueException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/InvalidPropertyValueException.java b/petascope/src/petascope/wcs/server/exceptions/InvalidPropertyValueException.java new file mode 100644 index 0000000..a324837 --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/InvalidPropertyValueException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class InvalidPropertyValueException extends WCSException +{ + private static final String error = "InvalidParameterValue"; + + public InvalidPropertyValueException(String message) + { + super(error, message); + } + + public InvalidPropertyValueException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/InvalidRequestException.java b/petascope/src/petascope/wcs/server/exceptions/InvalidRequestException.java new file mode 100644 index 0000000..9c17239 --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/InvalidRequestException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class InvalidRequestException extends WCSException +{ + private static final String error = "InvalidRequest"; + + public InvalidRequestException(String message) + { + super(error, message); + } + + public InvalidRequestException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/InvalidServiceConfigurationException.java b/petascope/src/petascope/wcs/server/exceptions/InvalidServiceConfigurationException.java new file mode 100644 index 0000000..41b2241 --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/InvalidServiceConfigurationException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class InvalidServiceConfigurationException extends WCSException +{ + private final static String error = "ActionNotSupported"; + + public InvalidServiceConfigurationException(String message) + { + super(error, message); + } + + public InvalidServiceConfigurationException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/InvalidTemporalMetadataException.java b/petascope/src/petascope/wcs/server/exceptions/InvalidTemporalMetadataException.java new file mode 100644 index 0000000..d075084 --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/InvalidTemporalMetadataException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class InvalidTemporalMetadataException extends WCSException +{ + private static final String error = "InvalidParameterValue"; + + public InvalidTemporalMetadataException(String message) + { + super(error, message); + } + + public InvalidTemporalMetadataException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/MaliciousQueryException.java b/petascope/src/petascope/wcs/server/exceptions/MaliciousQueryException.java new file mode 100644 index 0000000..22f7897 --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/MaliciousQueryException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class MaliciousQueryException extends WCSException +{ + private static final String error = "InvalidParameterValue"; + + public MaliciousQueryException(String message) + { + super(error, message); + } + + public MaliciousQueryException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/MissingParameterValueException.java b/petascope/src/petascope/wcs/server/exceptions/MissingParameterValueException.java new file mode 100644 index 0000000..7ff6aa4 --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/MissingParameterValueException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class MissingParameterValueException extends WCSException +{ + private static final String error = "InvalidParameterValue"; + + public MissingParameterValueException(String message) + { + super(error, message); + } + + public MissingParameterValueException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/MultiBandImagesNotSupportedException.java b/petascope/src/petascope/wcs/server/exceptions/MultiBandImagesNotSupportedException.java new file mode 100644 index 0000000..e0cff7a --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/MultiBandImagesNotSupportedException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class MultiBandImagesNotSupportedException extends WCSException +{ + private static final String error = "InvalidParameterValue"; + + public MultiBandImagesNotSupportedException(String message) + { + super(error, message); + } + + public MultiBandImagesNotSupportedException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/NoApplicableCodeException.java b/petascope/src/petascope/wcs/server/exceptions/NoApplicableCodeException.java new file mode 100644 index 0000000..0e23528 --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/NoApplicableCodeException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class NoApplicableCodeException extends WCSException +{ + private static final String error = "InvalidParameterValue"; + + public NoApplicableCodeException(String message) + { + super(error, message); + } + + public NoApplicableCodeException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/NodeParsingNotImplementedException.java b/petascope/src/petascope/wcs/server/exceptions/NodeParsingNotImplementedException.java new file mode 100644 index 0000000..5cec9ce --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/NodeParsingNotImplementedException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class NodeParsingNotImplementedException extends WCSException +{ + private static final String error = "NodeParsingNotImplemented"; + + public NodeParsingNotImplementedException(String message) + { + super(error, message); + } + + public NodeParsingNotImplementedException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/NotEnoughStorageException.java b/petascope/src/petascope/wcs/server/exceptions/NotEnoughStorageException.java new file mode 100644 index 0000000..c3f8d25 --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/NotEnoughStorageException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class NotEnoughStorageException extends WCSException +{ + private static final String error = "InvalidParameterValue"; + + public NotEnoughStorageException(String message) + { + super(error, message); + } + + public NotEnoughStorageException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/RasdamanRequestFailedException.java b/petascope/src/petascope/wcs/server/exceptions/RasdamanRequestFailedException.java new file mode 100644 index 0000000..9f42df1 --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/RasdamanRequestFailedException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class RasdamanRequestFailedException extends WCSException +{ + private final static String error = "InvalidParameterValue"; + + public RasdamanRequestFailedException(String message) + { + super(error, message); + } + + public RasdamanRequestFailedException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/RasdamanUnavailableException.java b/petascope/src/petascope/wcs/server/exceptions/RasdamanUnavailableException.java new file mode 100644 index 0000000..6bbb3e3 --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/RasdamanUnavailableException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class RasdamanUnavailableException extends WCSException +{ + private final static String error = "InvalidParameterValue"; + + public RasdamanUnavailableException(String message) + { + super(error, message); + } + + public RasdamanUnavailableException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/ServletConnectionException.java b/petascope/src/petascope/wcs/server/exceptions/ServletConnectionException.java new file mode 100644 index 0000000..05ec45b --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/ServletConnectionException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class ServletConnectionException extends WCSException +{ + private static final String error = "InvalidParameterValue"; + + public ServletConnectionException(String message) + { + super(error, message); + } + + public ServletConnectionException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/UnsupportedCombinationException.java b/petascope/src/petascope/wcs/server/exceptions/UnsupportedCombinationException.java new file mode 100644 index 0000000..934fb47 --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/UnsupportedCombinationException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class UnsupportedCombinationException extends WCSException +{ + private final static String error = "UnsupportedCombination"; + + public UnsupportedCombinationException(String message) + { + super(error, message); + } + + public UnsupportedCombinationException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/WCSException.java b/petascope/src/petascope/wcs/server/exceptions/WCSException.java new file mode 100644 index 0000000..556cf03 --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/WCSException.java @@ -0,0 +1,148 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ + + +package petascope.wcs.server.exceptions; + +//~--- non-JDK imports -------------------------------------------------------- + +import net.opengis.ows.v_1_0_0.ExceptionReport; +import net.opengis.ows.v_1_0_0.ExceptionType; + +//~--- JDK imports ------------------------------------------------------------ + +import java.util.Arrays; +import petascope.ConfigManager; + +/** + * Private Exception superclass for the WCS server. + * This class can return an error report, than can be marshalled into a + * WCS-standard compliant XML structure describing the error that has happened. + * + * @author Andrei Aiordachioaie + */ +public class WCSException extends Exception +{ +// private static Logger LOG = LoggerFactory.getLogger(WCSException.class); + + /* + private String[] errorCodes = + { + "MissingParameterValue", "InvalidParameterValue", "NoApplicableCode", + "UnsupportedCombination", "NotEnoughStorage", + "MaliciousQuery", "ActionNotSupported", "XmlStructuresError", + "BadResponseHandler", "MultiBandImagesNotSupported", "RasdamanUnavailable", + "ServletConnectionError", "XmlInputNotValid", "InvalidPropertyValue", + "InternalWcpsError", "InternalSqlError", "RasdamanRequestFailed", + "NodeParsingNotImplemented", "IOConnectionError", "InvalidTemporalMetadata", + "InvalidRequestString" + }; + */ + private ExceptionType item; + private ExceptionReport report; + private String errorCode; + private String errorDetail = ""; + + /** + * Default (minimal) constructor + * @param error Error Code + * @param detail Detailed message about the error + */ + protected WCSException(String error, String detail) + { + super(); + errorCode = error; + errorDetail = detail; + + createReport(); + } + + /** + * Convenience Constructor + * @param error Error Code + * @param detail Detailed message about the error + * @param e The cause of the current exception. + */ + protected WCSException(String error, String detail, Exception e) + { + super(e); + errorCode = error; + errorDetail = detail; + createReport(); + } + + private void createReport() + { + report = new ExceptionReport(); + report.setLanguage(ConfigManager.WCST_LANGUAGE); + report.setVersion(ConfigManager.WCST_VERSION); + + item = new ExceptionType(); + item.setExceptionCode(errorCode); + item.setLocator(errorDetail); + report.getException().add(item); + } + + /** Return the error code. + * + * @return + */ + public String getErrorCode() + { + return errorCode; + } + + /** Return the detailed error message. + * + * @return + */ + public String getErrorDetail() + { + return errorDetail; + } + + /** + * Retrieves a data structure that can be later marshalled into a XML + * "ExceptionReport" document. + * @return ExceptionReport object + */ + public ExceptionReport getReport() + { + return report; + } + + /** + * Adds text to this exception's detail message. + * @param msg + */ + public void appendErrorDetail(String msg) + { + this.errorDetail += msg; + createReport(); + } + + @Override + public String getMessage() + { + return this.errorDetail; + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/WcsRuntimeException.java b/petascope/src/petascope/wcs/server/exceptions/WcsRuntimeException.java new file mode 100644 index 0000000..f1dcde8 --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/WcsRuntimeException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class WcsRuntimeException extends WCSException +{ + private static final String error = "RuntimeException"; + + public WcsRuntimeException(String message) + { + super(error, message); + } + + public WcsRuntimeException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/XmlNotValidException.java b/petascope/src/petascope/wcs/server/exceptions/XmlNotValidException.java new file mode 100644 index 0000000..e9ea6ea --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/XmlNotValidException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class XmlNotValidException extends WCSException +{ + private static final String error = "XmlDocumentNotValid"; + + public XmlNotValidException(String message) + { + super(error, message); + } + + public XmlNotValidException(String message, Exception e) + { + super(error, message, e); + } +} diff --git a/petascope/src/petascope/wcs/server/exceptions/XmlStructuresException.java b/petascope/src/petascope/wcs/server/exceptions/XmlStructuresException.java new file mode 100644 index 0000000..66c244b --- /dev/null +++ b/petascope/src/petascope/wcs/server/exceptions/XmlStructuresException.java @@ -0,0 +1,41 @@ +/* + * This file is part of PetaScope. + * + * PetaScope is free software: you can redistribute it and/or modify + * it under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation, either version 3 of + * the License, or (at your option) any later version. + * + * PetaScope is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with PetaScope. If not, see <http://www.gnu.org/licenses/>. + * + * For more information please see <http://www.PetaScope.org> + * or contact Peter Baumann via <baumann@rasdaman.com>. + * + * Copyright 2009 Jacobs University Bremen, Peter Baumann. + */ +package petascope.wcs.server.exceptions; + +/** + * + * @author Andrei Aiordachioaie + */ +public class XmlStructuresException extends WCSException +{ + private static final String error = "XmlStructuresError"; + + public XmlStructuresException(String message) + { + super(error, message); + } + + public XmlStructuresException(String message, Exception e) + { + super(error, message, e); + } +} |