01: /**
02: * Copyright 2007 Jens Dietrich Licensed under the Apache License, Version 2.0 (the "License");
03: * you may not use this file except in compliance with the License.
04: * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
05: * Unless required by applicable law or agreed to in writing, software distributed under the
06: * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
07: * either express or implied. See the License for the specific language governing permissions
08: * and limitations under the License.
09: */package nz.org.take.verification;
10:
11: import nz.org.take.*;
12:
13: /**
14: * Check whether for predicates in queries there is at least one knowledge element supporting
15: * this predicate. This tool will run all checks available in this package.
16: * @author <a href="http://www-ist.massey.ac.nz/JBDietrich/">Jens Dietrich</a>
17: */
18:
19: public class DefaultVerificationTool extends VerificationTool {
20:
21: private VerificationTool[] parts = {
22: new CheckPredicatesInQueries(),
23: new CheckVariablesInQueries() };
24:
25: public String getName() {
26: return "default verification tool";
27: }
28:
29: public boolean verify(KnowledgeBase kb) {
30: boolean result = true;
31: for (VerificationTool part : parts) {
32: result = result && part.verify(kb);
33: }
34: return result;
35: }
36:
37: }
|