KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > hp > hpl > jena > shared > impl > JenaParameters


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

10 package com.hp.hpl.jena.shared.impl;
11
12 /**
13  * This class holds global, static, configuration parameters that
14  * affect the behaviour of the Jena API. These should not be changed
15  * unless you are sure you know what you are doing and even then
16  * should ideally only be changed before any Models are created or processed.
17  * <p>
18  * These parameters should not be regarded as a stable part of the API. If
19  * we find them being used significantly that probably means they should be
20  * moved to being model-specific rather than global.
21  * </p>
22  * @author <a HREF="mailto:der@hplb.hpl.hp.com">Dave Reynolds</a>
23  * @version $Revision: 1.9 $ on $Date: 2005/02/21 12:18:47 $
24  */

25 public class JenaParameters {
26     
27 // =======================================================================
28
// Parameters affected handling of typed literals
29

30     /**
31      * <p> Set this flag to true to cause typed literals to be
32      * validated as they are created. </p>
33      * <p>
34      * RDF does not require ill-formed typed literals to be rejected from a graph
35      * but rather allows them to be included but marked as distinct from
36      * all legally formed typed literals. Jena2 reflects this by optionally
37      * delaying validation of literals against datatype type constraints until
38      * the first access. </p>
39      */

40      public static boolean enableEagerLiteralValidation = false;
41
42      /**
43       * Set this flag to true to allow language-free, plain literals and xsd:strings
44       * containing the same character sequence to test as sameAs.
45       * <p>
46       * RDF plain literals and typed literals of type xsd:string are distinct, not
47       * least because plain literals may have a language tag which typed literals
48       * may not. However, in the absence of a languge tag it can be convenient
49       * for applications if the java objects representing identical character
50       * strings in these two ways test as semantically "sameAs" each other.
51       * At the time of writing is unclear if such identification would be sanctioned
52       * by the RDF working group. </p>
53       */

54      public static boolean enablePlainLiteralSameAsString = true;
55      
56      /**
57       * Set this flag to true to allow unknown literal datatypes to be
58       * accepted, if false then such literals will throw an exception when
59       * first detected. Note that any datatypes unknown datatypes encountered
60       * whilst this flag is 'true' will be automatically registered (as a type
61       * whose value and lexical spaces are identical). Subsequently turning off
62       * this flag will not unregister those unknown types already encountered.
63       * <p>
64       * RDF allows any URI to be used to indicate a datatype. Jena2 allows
65       * user defined datatypes to be registered but it is sometimes convenient
66       * to be able to process models containing unknown datatypes (e.g. when the
67       * application does not need to touch the value form of the literal). However,
68       * this behaviour means that common errors, such as using the wrong URI for
69       * xsd datatypes, may go unnoticed and throw obscure errors late in processing.
70       * Hence, the default is the require unknown datatypes to be registered.
71       */

72      public static boolean enableSilentAcceptanceOfUnknownDatatypes = true;
73
74     /**
75      * Set this flag to true to switch on checking of surrounding whitespace
76      * in non-string XSD numeric types. In the false (default) setting then
77      * leading and trailing white space is silently trimmed when parsing an
78      * XSD numberic typed literal.
79      */

80     public static boolean enableWhitespaceCheckingOfTypedLiterals = false;
81     
82     /**
83      * Set this flag to true (default) to hide certain internal nodes from the output
84      * of inference graphs. Some rule sets (notably owl-fb) create blank nodes as
85      * part of their reasoning process. If these match some query they can appear
86      * in the results. Such nodes are recorded as "hidden" and if this flag is set
87      * all triples involving such hidden nodes will be removed from the output - any
88      * indirect consequences will, however, still be visible.
89      */

90     public static boolean enableFilteringOfHiddenInfNodes = true;
91     
92     /**
93      * If this flag is true (default) then attmempts to build an OWL inference
94      * graph over another OWL inference graph will log a warning message.
95      */

96     public static boolean enableOWLRuleOverOWLRuleWarnings = true;
97     
98     /**
99      * If this flag is true (default is false) then bNodes are assigned a
100      * simple count local to this JVM. This is ONLY for use in debugging
101      * systems exhibiting non-deterministic behaviour due to the
102      * time-dependence of UIDs, not for normal production use. In particular, it
103      * breaks the contract that anonIDs should be unique on the same machine: they
104      * will only be unique for this single JVM run.
105      */

106     public static boolean disableBNodeUIDGeneration = false;
107 }
108
109
110
111 /*
112     (c) Copyright 2003, 2004, 2005 Hewlett-Packard Development Company, LP
113     All rights reserved.
114
115     Redistribution and use in source and binary forms, with or without
116     modification, are permitted provided that the following conditions
117     are met:
118
119     1. Redistributions of source code must retain the above copyright
120        notice, this list of conditions and the following disclaimer.
121
122     2. Redistributions in binary form must reproduce the above copyright
123        notice, this list of conditions and the following disclaimer in the
124        documentation and/or other materials provided with the distribution.
125
126     3. The name of the author may not be used to endorse or promote products
127        derived from this software without specific prior written permission.
128
129     THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
130     IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
131     OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
132     IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
133     INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
134     NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
135     DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
136     THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
137     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
138     THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
139 */
Popular Tags