001: /******************************************************************
002: * File: ReasonerVocabulary.java
003: * Created by: Dave Reynolds
004: * Created on: 04-Jun-2003
005: *
006: * (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
007: * [See end of file]
008: * $Id: ReasonerVocabulary.java,v 1.28 2008/01/22 15:59:10 chris-dollin Exp $
009: *****************************************************************/package com.hp.hpl.jena.vocabulary;
010:
011: import com.hp.hpl.jena.rdf.model.*;
012: import com.hp.hpl.jena.reasoner.ReasonerRegistry;
013: import com.hp.hpl.jena.reasoner.rulesys.RDFSRuleReasoner;
014:
015: /**
016: * A collection of RDF terms used in driving or configuring some of the
017: * builtin reasoners.
018: *
019: * @author <a href="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
020: * @version $Revision: 1.28 $ on $Date: 2008/01/22 15:59:10 $
021: */
022: public class ReasonerVocabulary {
023:
024: /** The namespace used for system level descriptive properties of any reasoner */
025: public static final String JenaReasonerNS = "http://jena.hpl.hp.com/2003/JenaReasoner#";
026:
027: /** The RDF class to which all Reasoners belong */
028: public static final Resource ReasonerClass = ResourceFactory
029: .createResource(JenaReasonerNS + "ReasonerClass");
030:
031: /** Reasoner description property: name of the reasoner */
032: public static final Property nameP = jenaReasonerProperty("name");
033:
034: /** Reasoner description property: text description of the reasoner */
035: public static final Property descriptionP = jenaReasonerProperty("description");
036:
037: /** Reasoner description property: version of the reasoner */
038: public static final Property versionP = jenaReasonerProperty("version");
039:
040: /** Reasoner description property: a schema property supported by the reasoner */
041: public static final Property supportsP = jenaReasonerProperty("supports");
042:
043: /** Reasoner description property: a configuration property supported by the reasoner */
044: public static final Property configurationP = jenaReasonerProperty("configurationProperty");
045:
046: /** A faux property used in reasoner capabilty models to denote reasoners that infer that individuals have rdf:type owl:Thing (or daml:Thing) */
047: public static final Property individualAsThingP = jenaReasonerProperty("individualAsThing");
048:
049: /** The property that represents the direct/minimal version of the subClassOf relationship */
050: public static final Property directSubClassOf = makeDirect(RDFS.subClassOf);
051:
052: /** The property that represents the direct/minimal version of the subPropertyOf relationship */
053: public static final Property directSubPropertyOf = makeDirect(RDFS.subPropertyOf);
054:
055: /** The property that represents the direct/minimal version of the rdf:type relationship */
056: public static final Property directRDFType = makeDirect(RDF.type);
057:
058: /** Base URI used for configuration properties for rule reasoners */
059: public static final String PropURI = "http://jena.hpl.hp.com/2003/RuleReasoner";
060:
061: /** Property used to configure the derivation logging behaviour of a reasoner.
062: * Set to "true" to enable logging of derivations. */
063: public static final Property PROPderivationLogging = ruleReasonerProperty("derivationLogging");
064:
065: /** Property used to configure the tracing behaviour of a reasoner.
066: * Set to "true" to enable internal trace message to be sent to Logger.info . */
067: public static final Property PROPtraceOn = ruleReasonerProperty("traceOn");
068:
069: /** Property used to set the mode of a generic rule reasoner.
070: * Valid values are the strings "forward", "backward" or "hybrid" */
071: public static final Property PROPruleMode = ruleReasonerProperty("ruleMode");
072:
073: /** Property used to attach a file a rules to a generic rule reasoner.
074: * Value should a URI giving the rule set to use. */
075: public static final Property PROPruleSet = ruleReasonerProperty("ruleSet");
076:
077: /** Property used to switch on/off OWL schema translation on a generic rule reasoner.
078: * Value should be "true" to enable OWL translation */
079: public static final Property PROPenableOWLTranslation = ruleReasonerProperty("enableOWLTranslation");
080:
081: /** Property used to switch on/off use of the dedicated subclass/subproperty
082: * caching in a generic rule reasoner. Set to "true" to enable caching. */
083: public static final Property PROPenableTGCCaching = ruleReasonerProperty("enableTGCCaching");
084:
085: /** Property used to switch on/off scanning of data for container membership
086: * properties in RDFS preprocessing. */
087: public static final Property PROPenableCMPScan = ruleReasonerProperty("enableCMPScan");
088:
089: /** Property used to switch to different RDFS processing levles. The
090: * legal levels are "default", "simple", and "full". */
091: public static final Property PROPsetRDFSLevel = ruleReasonerProperty("setRDFSLevel");
092:
093: /** Property used to switch on/off filtering of functors from returned results
094: * in the generic rule engine. Default is filtering on. */
095: public static final Property PROPenableFunctorFiltering = ruleReasonerProperty("enableFunctorFiltering");
096:
097: /** Constant for PROPsetRDFSLevel - default behaviour */
098: public static final String RDFS_DEFAULT = RDFSRuleReasoner.DEFAULT_RULES;
099:
100: /** Constant for PROPsetRDFSLevel - fullest implementation supported. */
101: public static final String RDFS_FULL = RDFSRuleReasoner.FULL_RULES;
102:
103: /** Constant for PROPsetRDFSLevel - simplified, higher performance rules. */
104: public static final String RDFS_SIMPLE = RDFSRuleReasoner.SIMPLE_RULES;
105:
106: /** A namespace used for Rubrik specific properties */
107: public static final String 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
111: .createProperty(RBNamespace, "validation");
112:
113: /** Property used for validation reports in owl ruleset */
114: public static final Property RB_VALIDATION_REPORT = ResourceFactory
115: .createProperty(RBNamespace, "violation");
116:
117: /** Property to denote the URL of an external reasoner. Default is http://localhost:8081 */
118: public static final Property EXT_REASONER_URL = ResourceFactory
119: .createProperty(JenaReasonerNS, "extReasonerURL");
120:
121: /** Property to denote the ontology language (OWL, DAML, RDFS) an external reasoner will process.
122: * Values are URI's, see {@link com.hp.hpl.jena.ontology.ProfileRegistry}. Default is OWL. */
123: public static final Property EXT_REASONER_ONT_LANG = ResourceFactory
124: .createProperty(JenaReasonerNS, "extReasonerOntologyLang");
125:
126: /** Property to denote the axioms file that the reasoner will use for background knowledge.
127: * Values are URL's. Default is no axioms. */
128: public static final Property EXT_REASONER_AXIOMS = ResourceFactory
129: .createProperty(JenaReasonerNS, "extReasonerAxioms");
130:
131: /**
132: Property of a GRR config with object a node with rule set properties.
133: */
134: public static final Property ruleSet = jenaReasonerProperty("ruleSet");
135:
136: /**
137: Property of a GRR config with object a resource who's URI is the URL
138: of a Jena rules text.
139: */
140: public static final Property ruleSetURL = jenaReasonerProperty("ruleSetURL");
141:
142: /**
143: Property of a GRR rule-set config that specifies a rule as a string in the
144: Jena rules language.
145: */
146: public static final Property hasRule = jenaReasonerProperty("hasRule");
147:
148: /**
149: Property of a reasoner that specifies the URL of a schema to load.
150: */
151: public static final Property schemaURL = jenaReasonerProperty("schemaURL");
152:
153: protected static final Property jenaReasonerProperty(
154: String localName) {
155: return ResourceFactory
156: .createProperty(JenaReasonerNS, localName);
157: }
158:
159: protected static final Property ruleReasonerProperty(
160: String localName) {
161: return ResourceFactory
162: .createProperty(PropURI + "#" + localName);
163: }
164:
165: /**
166: compact call to ReasonerRegistry.makeDirect
167: */
168: private static final Property makeDirect(Property type) {
169: return ResourceFactory.createProperty(ReasonerRegistry
170: .makeDirect(type.asNode().getURI()));
171: }
172:
173: // --------------------------------------------------------------------
174: // Method versions of key namespaces which are more initializer friendly
175:
176: /** Return namespace used for Rubric specific properties */
177: public static final String getRBNamespace() {
178: return RBNamespace;
179: }
180:
181: /** Return namespace used for system level descriptive properties of any reasoner */
182: public static final String getJenaReasonerNS() {
183: return JenaReasonerNS;
184: }
185: }
186:
187: /*
188: (c) Copyright 2003, 2004, 2005, 2006, 2007, 2008 Hewlett-Packard Development Company, LP
189: All rights reserved.
190:
191: Redistribution and use in source and binary forms, with or without
192: modification, are permitted provided that the following conditions
193: are met:
194:
195: 1. Redistributions of source code must retain the above copyright
196: notice, this list of conditions and the following disclaimer.
197:
198: 2. Redistributions in binary form must reproduce the above copyright
199: notice, this list of conditions and the following disclaimer in the
200: documentation and/or other materials provided with the distribution.
201:
202: 3. The name of the author may not be used to endorse or promote products
203: derived from this software without specific prior written permission.
204:
205: THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
206: IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
207: OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
208: IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
209: INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
210: NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
211: DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
212: THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
213: (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
214: THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
215: */
|