KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > joseki > server > ExecutionError


1 /*
2  * (c) Copyright 2003, 2004 Hewlett-Packard Development Company, LP
3  * [See end of file]
4  */

5
6 package org.joseki.server;
7
8 /**
9  * @version $Id: ExecutionError.java,v 1.5 2004/04/30 14:13:13 andy_seaborne Exp $
10  * @author Andy Seaborne
11  */

12
13 public class ExecutionError
14 {
15     static public final int rcOK = 0 ;
16     static public final int rcNoSuchQueryLanguage = 3 ;
17     static public final int rcInternalError = 4 ;
18     static public final int rcRDFException = 5 ;
19     static public final int rcNoSuchURI = 6 ;
20     static public final int rcSecurityError = 7 ;
21     static public final int rcOperationNotSupported = 8 ;
22     static public final int rcArgumentUnreadable = 9 ;
23     static public final int rcImmutableModel = 10 ;
24     static public final int rcConfigurationError = 11 ;
25     static public final int rcArgumentError = 12 ;
26     
27     static public final int rcQueryParseFailure = 100 ;
28     static public final int rcQueryExecutionFailure = 101 ;
29     static public final int rcQueryUnknownFormat = 102 ;
30
31
32
33     static public String JavaDoc messages[] =
34         { "OK",
35           "Query parsing failed",
36           "Query excution failed",
37           "No such query language",
38           "Internal Error",
39           "RDFException" ,
40           "No such URI" ,
41           "Access control failure",
42           "Operation not supported on URI",
43           "Argument to operation is unreadable" ,
44           "Immutable model" ,
45           "Incorrect configuration" ,
46           "Error in arguments",
47           null // Terminator
48
};
49
50     static public String JavaDoc errorString(int rc)
51     {
52         // Note: there is a terminator on the message strings list
53
if ( rc < 0 || rc >= messages.length-1 )
54             return "Unknown error" ;
55             
56         return messages[rc] ;
57     }
58 }
59
60 /*
61  * (c) Copyright 2003, 2004 Hewlett-Packard Development Company, LP
62  * All rights reserved.
63  *
64  * Redistribution and use in source and binary forms, with or without
65  * modification, are permitted provided that the following conditions
66  * are met:
67  * 1. Redistributions of source code must retain the above copyright
68  * notice, this list of conditions and the following disclaimer.
69  * 2. Redistributions in binary form must reproduce the above copyright
70  * notice, this list of conditions and the following disclaimer in the
71  * documentation and/or other materials provided with the distribution.
72  * 3. The name of the author may not be used to endorse or promote products
73  * derived from this software without specific prior written permission.
74  *
75  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
76  * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
77  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
78  * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
79  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
80  * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
81  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
82  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
83  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
84  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
85  */

86
Popular Tags