KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > hp > hpl > jena > reasoner > rulesys > impl > StateFlag


1 /******************************************************************
2  * File: StateFlag.java
3  * Created by: Dave Reynolds
4  * Created on: 03-May-2003
5  *
6  * (c) Copyright 2003, 2004, 2005 Hewlett-Packard Development Company, LP
7  * [See end of file]
8  * $Id: StateFlag.java,v 1.6 2005/02/21 12:18:00 andy_seaborne Exp $
9  *****************************************************************/

10 package com.hp.hpl.jena.reasoner.rulesys.impl;
11
12 /**
13  * A set of constants used to record state information in the
14  * backchaining rule interepreter.
15  *
16  * @author <a HREF="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
17  * @version $Revision: 1.6 $ on $Date: 2005/02/21 12:18:00 $
18  */

19 public class StateFlag {
20     
21     /** Label for printing */
22     private String JavaDoc label;
23
24     /** Indicates a goal has failed and return no more answers at this time */
25     public static final StateFlag FAIL = new StateFlag("FAIL");
26     
27     /** Indicates that all currently available results have been returned and
28      * the goal should be suspended into new subgoal results have been generated */

29     public static final StateFlag SUSPEND = new StateFlag("SUSPEND");
30     
31     /** Indicates that the goal remains active */
32     public static final StateFlag ACTIVE = new StateFlag("ACTIVE");
33     
34     /** Indicates a fully satisfied goal */
35     public static final StateFlag SATISFIED = new StateFlag("SATISFIED");
36     
37     /** Constructor */
38     private StateFlag(String JavaDoc label) {
39         this.label = label;
40     }
41     
42     /** Print string */
43     public String JavaDoc toString() {
44         return label;
45     }
46 }
47
48
49
50 /*
51     (c) Copyright 2003, 2004, 2005 Hewlett-Packard Development Company, LP
52     All rights reserved.
53
54     Redistribution and use in source and binary forms, with or without
55     modification, are permitted provided that the following conditions
56     are met:
57
58     1. Redistributions of source code must retain the above copyright
59        notice, this list of conditions and the following disclaimer.
60
61     2. Redistributions in binary form must reproduce the above copyright
62        notice, this list of conditions and the following disclaimer in the
63        documentation and/or other materials provided with the distribution.
64
65     3. The name of the author may not be used to endorse or promote products
66        derived from this software without specific prior written permission.
67
68     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
69     IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
70     OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
71     IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
72     INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
73     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
74     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
75     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
76     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
77     THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
78 */
Popular Tags