01: package org.mandarax.xkb.framework;
02:
03: /**
04: * Copyright (C) 1999-2004 Jens Dietrich (mailto:mandarax@jbdietrich.com)
05: *
06: * This library is free software; you can redistribute it and/or
07: * modify it under the terms of the GNU Lesser General Public
08: * License as published by the Free Software Foundation; either
09: * version 2 of the License, or (at your option) any later version.
10: *
11: * This library is distributed in the hope that it will be useful,
12: * but WITHOUT ANY WARRANTY; without even the implied warranty of
13: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14: * Lesser General Public License for more details.
15: *
16: * You should have received a copy of the GNU Lesser General Public
17: * License along with this library; if not, write to the Free Software
18: * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19: */
20:
21: /**
22: * Default driver. We keep a version name in the class name since we will maintain
23: * drivers in order to migrate data between drivers. Support for the following features has been added:
24: * <li>
25: * <ol>negation is rule bodies (negation as failure)
26: * <ol>close connection property in SQLClauseSet and SQLFunction
27: * <ol>additional properties in clause sets and queries
28: * </li>
29: * @author <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</A>
30: * @version 3.4 <7 March 05>
31: * @since 2.0
32: * @deprecated from v 3.4 - support for new features such as validation will not be added to XKB, please use ZKB instead
33: */
34: public class XKBDriver_2_0 extends GenericDriver {
35:
36: /**
37: * Constructor.
38: */
39: public XKBDriver_2_0() {
40: super ();
41: initialize();
42: }
43:
44: /**
45: * Get the name of the driver.
46: * @return a text
47: */
48: public String getName() {
49: return "Mandarax XKB Driver 2.0";
50: }
51:
52: /**
53: * Initialize the object.
54: */
55: protected void initialize() {
56: install(new XMLAdapter4ComplexTerms());
57: install(new XMLAdapter4ConstantTerms());
58: install(new XMLAdapter4Facts2());
59: install(new XMLAdapter4KnowledgeBases());
60: install(new XMLAdapter4MandaraxLibFunctions());
61: install(new XMLAdapter4MandaraxLibPredicates());
62: install(new XMLAdapter4Methods());
63: install(new XMLAdapter4Objects());
64: install(new XMLAdapter4Rules2());
65: install(new XMLAdapter4Prerequisites());
66: install(new XMLAdapter4SimplePredicates());
67: install(new XMLAdapter4SQLClauseSets2());
68: install(new XMLAdapter4SQLPredicates());
69: install(new XMLAdapter4SQLFunctions2());
70: install(new XMLAdapter4Types());
71: install(new XMLAdapter4VariableTerms());
72: install(new XMLAdapter4DataSources());
73: install(new XMLAdapter4JFunctions());
74: install(new XMLAdapter4DynaBeanFunctions());
75: install(new XMLAdapter4JPredicates());
76: install(new XMLAdapter4Queries2());
77: }
78:
79: /**
80: * Indicates whether the driver (and the underlying xml format (=dtd))
81: * supports queries.
82: * @return a boolean
83: */
84: public boolean supportsQueries() {
85: return true;
86: }
87:
88: /**
89: * Indicates whether the driver (and the underlying xml format (=dtd))
90: * supports negation as failure.
91: * @return a boolean
92: */
93: public boolean supportsNegationAsFailure() {
94: return true;
95: }
96: }
|