01: package example.nz.org.take.compiler.userv.generated;
02:
03: import nz.org.take.rt.*;
04:
05: /**
06: * Class generated by the take compiler.
07: * @version Mon Feb 11 13:49:17 NZDT 2008
08: */
09: @SuppressWarnings("unchecked")
10: class KBFragement_not_isNew_1 {
11: /**
12: * Method generated for query /isNew[in]
13: * @param slot1 input parameter generated from slot 0
14: * @return an iterator for instances of not_isNew
15: */
16: public static ResultSet<not_isNew> not_isNew_1(
17: final example.nz.org.take.compiler.userv.domainmodel.Car slot1) {
18: DerivationController _derivation = new DefaultDerivationController();
19: ResultSet<not_isNew> _result = new ResultSet(
20: KBFragement_not_isNew_1.not_isNew_1(slot1, _derivation),
21: _derivation);
22:
23: return _result;
24: }
25:
26: /**
27: * Method generated for negated simple predicates.
28: * Negation is interpreted as negation as failure (NAF).
29: * Code generated using velocity template NAFNegatedSimplePredicate.vm
30: */
31: static ResourceIterator<not_isNew> not_isNew_1(
32: example.nz.org.take.compiler.userv.domainmodel.Car slot1,
33: DerivationController _derivation) {
34: _derivation.log("negated prerequisite",
35: DerivationController.NAF, slot1);
36:
37: boolean _exist = false;
38: boolean _hasNoResult = true;
39: nz.org.take.rt.ResultSet<isNew> _result = KBFragement_isNew_1
40: .isNew_1(slot1);
41:
42: if (_result.hasNext()) {
43: _hasNoResult = false;
44: }
45:
46: _result.close();
47:
48: if (_hasNoResult) {
49: not_isNew _record = new not_isNew();
50: _record.slot1 = slot1;
51:
52: return new nz.org.take.rt.SingletonIterator<not_isNew>(
53: _record);
54: } else {
55: return nz.org.take.rt.EmptyIterator.DEFAULT;
56: }
57: }
58: }
|