01: package org.mandarax.zkb.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: * ZKB driver. It uses a simpler DTD than the 1_0 driver and therefore facilitates writing
23: * kbs directly in xml. On the other hand, it is less similar to RuleML.
24: * We keep a version name in the class name since we will maintain
25: * drivers in order to migrate data between drivers.
26: * @author <A href="http://www-ist.massey.ac.nz/JBDietrich" target="_top">Jens Dietrich</A>
27: * @version 3.4 <7 March 05>
28: * @since 2.3
29: */
30: public final class ZKBDriver_1_1 extends GenericDriver {
31:
32: /**
33: * Constructor.
34: */
35: public ZKBDriver_1_1() {
36: super ();
37: initialize();
38: }
39:
40: /**
41: * Initialize the object.
42: */
43: private void initialize() {
44: install(new Adapter4KnowledgeBases_1_1());
45: install(new Adapter4Comparators());
46: install(new Adapter4Rules_1_1());
47: install(new Adapter4Queries_1_1());
48: install(new Adapter4Facts_1_1());
49: install(new Adapter4SQLClauseSets());
50: install(new Adapter4CustomClauseSets());
51: install(new Adapter4Prerequisites_1_1());
52: install(new Adapter4Predicates());
53: install(new Adapter4ComplexTerms());
54: install(new Adapter4ConstantTerms());
55: install(new Adapter4VariableTerms());
56: install(new Adapter4Functions());
57: // new in 3.2 support for derivation event listeners
58: install(new Adapter4DerivationEventListeners());
59:
60: }
61:
62: /**
63: * Indicates whether the driver (and the underlying xml format (=dtd))
64: * supports queries.
65: * @return a boolean
66: */
67: public boolean supportsQueries() {
68: return true;
69: }
70:
71: /**
72: * Get the location (URL) of the associated DTD.
73: * @return an url
74: */
75: public String getURL4DTD() {
76: return "http://www.mandarax.org/dtd/zkb_1_1.dtd";
77: }
78:
79: /**
80: * Get the name of the driver.
81: * @return a text
82: */
83: public String getName() {
84: return "ZKBDriver_1_1";
85: }
86:
87: /**
88: * Get the root element type.
89: * @return the name of the root element
90: */
91: public String getRootElementType() {
92: return KNOWLEDGE_BASE;
93: }
94: }
|