KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > hp > hpl > jena > vocabulary > ReasonerVocabulary


1 /******************************************************************
2  * File: ReasonerVocabulary.java
3  * Created by: Dave Reynolds
4  * Created on: 04-Jun-2003
5  *
6  * (c) Copyright 2003, 2004, 2005 Hewlett-Packard Development Company, LP
7  * [See end of file]
8  * $Id: ReasonerVocabulary.java,v 1.20 2005/04/08 08:12:56 der Exp $
9  *****************************************************************/

10 package com.hp.hpl.jena.vocabulary;
11
12 import com.hp.hpl.jena.rdf.model.*;
13 import com.hp.hpl.jena.reasoner.ReasonerRegistry;
14 import com.hp.hpl.jena.reasoner.rulesys.RDFSRuleReasoner;
15
16 /**
17  * A collection of RDF terms used in driving or configuring some of the
18  * builtin reasoners.
19  *
20  * @author <a HREF="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
21  * @version $Revision: 1.20 $ on $Date: 2005/04/08 08:12:56 $
22  */

23 public class ReasonerVocabulary {
24     
25     /** The namespace used for system level descriptive properties of any reasoner */
26     public static String JavaDoc JenaReasonerNS = "http://jena.hpl.hp.com/2003/JenaReasoner#";
27     
28     /** The RDF class to which all Reasoners belong */
29     public static Resource ReasonerClass = ResourceFactory.createResource(JenaReasonerNS + "ReasonerClass");
30     
31     /** Reasoner description property: name of the reasoner */
32     public static Property nameP;
33     
34     /** Reasoner description property: text description of the reasoner */
35     public static Property descriptionP;
36     
37     /** Reasoner description property: version of the reasoner */
38     public static Property versionP;
39     
40     /** Reasoner description property: a schema property supported by the reasoner */
41     public static Property supportsP;
42     
43     /** Reasoner description property: a configuration property supported by the reasoner */
44     public static Property configurationP;
45
46     /** The property that represents the direct/minimal version of the subClassOf relationship */
47     public static Property directSubClassOf;
48
49     /** The property that represents the direct/minimal version of the subPropertyOf relationship */
50     public static Property directSubPropertyOf;
51
52     /** The property that represents the direct/minimal version of the rdf:type relationship */
53     public static Property directRDFType;
54
55     /** A faux property used in reasoner capabilty models to denote reasoners that infer that individuals have rdf:type owl:Thing (or daml:Thing) */
56     public static Property individualAsThingP;
57     
58     /** Base URI used for configuration properties for rule reasoners */
59     public static final String JavaDoc PropURI = "http://jena.hpl.hp.com/2003/RuleReasoner";
60
61     /** Property used to configure the derivation logging behaviour of a reasoner.
62      * Set to "true" to enable logging of derivations. */

63     public static Property PROPderivationLogging;
64
65     /** Property used to configure the tracing behaviour of a reasoner.
66      * Set to "true" to enable internal trace message to be sent to Logger.info . */

67     public static Property PROPtraceOn;
68
69     /** Property used to set the mode of a generic rule reasoner.
70      * Valid values are the strings "forward", "backward" or "hybrid" */

71     public static Property PROPruleMode;
72     
73     /** Property used to attach a file a rules to a generic rule reasoner.
74      * Value should a URI giving the rule set to use. */

75     public static Property PROPruleSet;
76     
77     /** Property used to switch on/off OWL schema translation on a generic rule reasoner.
78      * Value should be "true" to enable OWL translation */

79     public static Property PROPenableOWLTranslation;
80     
81     /** Property used to switch on/off use of the dedicated subclass/subproperty
82      * caching in a generic rule reasoner. Set to "true" to enable caching. */

83     public static Property PROPenableTGCCaching;
84     
85     /** Property used to switch on/off scanning of data for container membership
86      * properties in RDFS preprocessing. */

87     public static Property PROPenableCMPScan;
88     
89     /** Property used to switch to different RDFS processing levles. The
90      * legal levels are "default", "simple", and "full". */

91     public static Property PROPsetRDFSLevel;
92     
93     /** Constant for PROPsetRDFSLevel - default behaviour */
94     public static String JavaDoc RDFS_DEFAULT = RDFSRuleReasoner.DEFAULT_RULES;
95     
96     /** Constant for PROPsetRDFSLevel - fullest implementation supported. */
97     public static String JavaDoc RDFS_FULL = RDFSRuleReasoner.FULL_RULES;
98     
99     /** Constant for PROPsetRDFSLevel - simplified, higher performance rules. */
100     public static String JavaDoc RDFS_SIMPLE = RDFSRuleReasoner.SIMPLE_RULES;
101     
102     /** Property used to switch on/off filtering of functors from returned results
103      * in the generic rule engine. Default is filtering on. */

104     public static Property PROPenableFunctorFiltering;
105
106     /** A namespace used for Rubrik specific properties */
107     public static final String JavaDoc RBNamespace = "urn:x-hp-jena:rubrik/";
108
109     /** Property used to switch on validation in owl ruleset */
110     public static final Property RB_VALIDATION = ResourceFactory.createProperty(RBNamespace, "validation");
111
112     /** Property used for validation reports in owl ruleset */
113     public static final Property RB_VALIDATION_REPORT = ResourceFactory.createProperty(RBNamespace, "violation");
114     
115                 
116     /** Property to denote the URL of an external reasoner. Default is http://localhost:8081 */
117     public static final Property EXT_REASONER_URL = ResourceFactory.createProperty( JenaReasonerNS, "extReasonerURL" );
118     
119     /** Property to denote the ontology language (OWL, DAML, RDFS) an external reasoner will process.
120      * Values are URI's, see {@link com.hp.hpl.jena.ontology.ProfileRegistry}. Default is OWL. */

121     public static final Property EXT_REASONER_ONT_LANG = ResourceFactory.createProperty( JenaReasonerNS, "extReasonerOntologyLang" );
122     
123     /** Property to denote the axioms file that the reasoner will use for background knowledge.
124      * Values are URL's. Default is no axioms. */

125     public static final Property EXT_REASONER_AXIOMS = ResourceFactory.createProperty( JenaReasonerNS, "extReasonerAxioms" );
126     
127     
128 // --------------------------------------------------------------------
129
// Method versions of key namespaces which are more initializer friendly
130

131     /** Return namespace used for Rubric specific properties */
132     public static final String JavaDoc getRBNamespace() {
133         return RBNamespace;
134     }
135     
136     /** Return namespace used for system level descriptive properties of any reasoner */
137     public static final String JavaDoc getJenaReasonerNS() {
138         return JenaReasonerNS;
139     }
140            
141 // --------------------------------------------------------------------
142
// Initializers
143

144     static {
145         try {
146             nameP = ResourceFactory.createProperty(JenaReasonerNS, "name");
147             descriptionP = ResourceFactory.createProperty(JenaReasonerNS, "description");
148             versionP = ResourceFactory.createProperty(JenaReasonerNS, "version");
149             supportsP = ResourceFactory.createProperty(JenaReasonerNS, "supports");
150             configurationP = ResourceFactory.createProperty(JenaReasonerNS, "configurationProperty");
151             directSubClassOf = ResourceFactory.createProperty(ReasonerRegistry.makeDirect(RDFS.subClassOf.getNode()).getURI());
152             directSubPropertyOf = ResourceFactory.createProperty(ReasonerRegistry.makeDirect(RDFS.subPropertyOf.getNode()).getURI());
153             directRDFType = ResourceFactory.createProperty(ReasonerRegistry.makeDirect(RDF.type.getNode()).getURI());
154             individualAsThingP = ResourceFactory.createProperty(JenaReasonerNS, "individualAsThing");
155             PROPderivationLogging = ResourceFactory.createProperty(PropURI+"#", "derivationLogging");
156             PROPtraceOn = ResourceFactory.createProperty(PropURI+"#", "traceOn");
157             PROPruleMode = ResourceFactory.createProperty(PropURI+"#", "ruleMode");
158             PROPruleSet = ResourceFactory.createProperty(PropURI+"#", "ruleSet");
159             PROPenableOWLTranslation = ResourceFactory.createProperty(PropURI+"#", "enableOWLTranslation");
160             PROPenableTGCCaching = ResourceFactory.createProperty(PropURI+"#", "enableTGCCaching");
161             PROPenableCMPScan = ResourceFactory.createProperty(PropURI+"#", "enableCMPScan");
162             PROPsetRDFSLevel = ResourceFactory.createProperty(PropURI+"#", "setRDFSLevel");
163             PROPenableFunctorFiltering= ResourceFactory.createProperty(PropURI+"#", "enableFunctorFiltering");
164         } catch (Exception JavaDoc e) {
165             System.err.println("Initialization error: " + e);
166             e.printStackTrace(System.err);
167         }
168     }
169 }
170
171
172 /*
173     (c) Copyright 2003, 2004, 2005 Hewlett-Packard Development Company, LP
174     All rights reserved.
175
176     Redistribution and use in source and binary forms, with or without
177     modification, are permitted provided that the following conditions
178     are met:
179
180     1. Redistributions of source code must retain the above copyright
181        notice, this list of conditions and the following disclaimer.
182
183     2. Redistributions in binary form must reproduce the above copyright
184        notice, this list of conditions and the following disclaimer in the
185        documentation and/or other materials provided with the distribution.
186
187     3. The name of the author may not be used to endorse or promote products
188        derived from this software without specific prior written permission.
189
190     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
191     IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
192     OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
193     IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
194     INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
195     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
196     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
197     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
198     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
199     THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
200 */
Popular Tags