001: package example.nz.org.take.compiler.userv.generated;
002:
003: import nz.org.take.rt.*;
004:
005: /**
006: * Class generated by the take compiler.
007: * @version Mon Feb 11 13:49:16 NZDT 2008
008: */
009: @SuppressWarnings("unchecked")
010: public class UservRules {
011: private static java.util.Map<String, java.util.Map<String, String>> _annotations = null;
012:
013: /**
014: * Method that can be used to query annotations at runtime.
015: * @param id the id of the rule (or other knowledge element)
016: * @return a map of annotations (string-string mappings)
017: * code generated using velocity template LocalAnnotationMethod.vm
018: */
019: public java.util.Map<String, String> getAnnotations(String id) {
020: if (_annotations == null) {
021: synchronized (UservRules.class) {
022: if (_annotations == null) {
023: java.beans.XMLDecoder decoder = new java.beans.XMLDecoder(
024: new java.io.BufferedInputStream(
025: UservRules.class
026: .getResourceAsStream("/example/nz/org/take/compiler/userv/generated/annotations.xml")));
027: _annotations = (java.util.Map<String, java.util.Map<String, String>>) decoder
028: .readObject();
029: decoder.close();
030: }
031: }
032: }
033:
034: return _annotations.get(id);
035: }
036:
037: /**
038: * Method that can be used to query global annotations at runtime.
039: * Global annotations are attached to the knowledge base, not to
040: * a particular element (rule,..).
041: * @return a map of annotations (string-string mappings)
042: * code generated using velocity template GlobalAnnotationMethod.vm
043: */
044: public java.util.Map<String, String> getAnnotations() {
045: return getAnnotations("___global_annotations");
046: }
047:
048: /**
049: * Method generated for query /potentialTheftRating[in,out]
050: * @param car input parameter generated from slot 0
051: * @return an iterator for instances of PotentialTheftRating
052: */
053: public ResultSet<PotentialTheftRating> getPotenialTheftRating(
054: final example.nz.org.take.compiler.userv.domainmodel.Car car) {
055: DerivationController _derivation = new DefaultDerivationController();
056: ResultSet<PotentialTheftRating> _result = new ResultSet(
057: KBFragement_getPotenialTheftRating
058: .getPotenialTheftRating(car, _derivation),
059: _derivation);
060:
061: return _result;
062: }
063:
064: /**
065: * Method generated for query /potentialOccupantInjuryRating[in,out]
066: * @param car input parameter generated from slot 0
067: * @return an iterator for instances of PotentialOccupantInjuryRating
068: */
069: public ResultSet<PotentialOccupantInjuryRating> getPotentialOccupantInjuryRating(
070: final example.nz.org.take.compiler.userv.domainmodel.Car car) {
071: DerivationController _derivation = new DefaultDerivationController();
072: ResultSet<PotentialOccupantInjuryRating> _result = new ResultSet(
073: KBFragement_getPotentialOccupantInjuryRating
074: .getPotentialOccupantInjuryRating(car,
075: _derivation), _derivation);
076:
077: return _result;
078: }
079:
080: /**
081: * Method generated for query /autoEligibility[in,out]
082: * @param car input parameter generated from slot 0
083: * @return an iterator for instances of AutoEligibility
084: */
085: public ResultSet<AutoEligibility> getAutoEligibility(
086: final example.nz.org.take.compiler.userv.domainmodel.Car car) {
087: DerivationController _derivation = new DefaultDerivationController();
088: ResultSet<AutoEligibility> _result = new ResultSet(
089: KBFragement_getAutoEligibility.getAutoEligibility(car,
090: _derivation), _derivation);
091:
092: return _result;
093: }
094:
095: /**
096: * Method generated for query /driverCategory[in,out]
097: * @param driver input parameter generated from slot 0
098: * @return an iterator for instances of DriverCategory
099: */
100: public ResultSet<DriverCategory> getDriverCategory(
101: final example.nz.org.take.compiler.userv.domainmodel.Driver driver) {
102: DerivationController _derivation = new DefaultDerivationController();
103: ResultSet<DriverCategory> _result = new ResultSet(
104: KBFragement_getDriverCategory.getDriverCategory(driver,
105: _derivation), _derivation);
106:
107: return _result;
108: }
109:
110: /**
111: * Method generated for query /isEligible[in]
112: * @param driver input parameter generated from slot 0
113: * @return an iterator for instances of DriverEligibility
114: */
115: public ResultSet<DriverEligibility> getDriverEligibility(
116: final example.nz.org.take.compiler.userv.domainmodel.Driver driver) {
117: DerivationController _derivation = new DefaultDerivationController();
118: ResultSet<DriverEligibility> _result = new ResultSet(
119: KBFragement_getDriverEligibility.getDriverEligibility(
120: driver, _derivation), _derivation);
121:
122: return _result;
123: }
124:
125: /**
126: * Method generated for query /isHighRiskDriver[in]
127: * @param driver input parameter generated from slot 0
128: * @return an iterator for instances of HighRiskDriver
129: */
130: public ResultSet<HighRiskDriver> isHighRiskDriver(
131: final example.nz.org.take.compiler.userv.domainmodel.Driver driver) {
132: DerivationController _derivation = new DefaultDerivationController();
133: ResultSet<HighRiskDriver> _result = new ResultSet(
134: KBFragement_isHighRiskDriver.isHighRiskDriver(driver,
135: _derivation), _derivation);
136:
137: return _result;
138: }
139:
140: /**
141: * Method generated for query /hasTrainingCertification[in]
142: * @param driver input parameter generated from slot 0
143: * @return an iterator for instances of TrainedDriver
144: */
145: public ResultSet<TrainedDriver> hasTrainingCertification(
146: final example.nz.org.take.compiler.userv.domainmodel.Driver driver) {
147: DerivationController _derivation = new DefaultDerivationController();
148: ResultSet<TrainedDriver> _result = new ResultSet(
149: KBFragement_hasTrainingCertification
150: .hasTrainingCertification(driver, _derivation),
151: _derivation);
152:
153: return _result;
154: }
155:
156: /**
157: * Method generated for query /policyEligibilityScore[in,in,out]
158: * @param car input parameter generated from slot 0
159: * @param driver input parameter generated from slot 1
160: * @return an iterator for instances of PolicyEligibilityScore
161: */
162: public ResultSet<PolicyEligibilityScore> getPolicyEligibilityScore(
163: final example.nz.org.take.compiler.userv.domainmodel.Car car,
164: final example.nz.org.take.compiler.userv.domainmodel.Driver driver) {
165: DerivationController _derivation = new DefaultDerivationController();
166: ResultSet<PolicyEligibilityScore> _result = new ResultSet(
167: KBFragement_getPolicyEligibilityScore
168: .getPolicyEligibilityScore(car, driver,
169: _derivation), _derivation);
170:
171: return _result;
172: }
173:
174: /**
175: * Method generated for query /insuranceEligibility[in,in,out]
176: * @param car input parameter generated from slot 0
177: * @param driver input parameter generated from slot 1
178: * @return an iterator for instances of InsuranceEligibility
179: */
180: public ResultSet<InsuranceEligibility> getPolicyEligibility(
181: final example.nz.org.take.compiler.userv.domainmodel.Car car,
182: final example.nz.org.take.compiler.userv.domainmodel.Driver driver) {
183: DerivationController _derivation = new DefaultDerivationController();
184: ResultSet<InsuranceEligibility> _result = new ResultSet(
185: KBFragement_getPolicyEligibility.getPolicyEligibility(
186: car, driver, _derivation), _derivation);
187:
188: return _result;
189: }
190:
191: /**
192: * Method generated for query /isLongTermClient[in]
193: * @param driver input parameter generated from slot 0
194: * @return an iterator for instances of LongTermClient
195: */
196: public ResultSet<LongTermClient> isLongTermClient(
197: final example.nz.org.take.compiler.userv.domainmodel.Driver driver) {
198: DerivationController _derivation = new DefaultDerivationController();
199: ResultSet<LongTermClient> _result = new ResultSet(
200: KBFragement_isLongTermClient.isLongTermClient(driver,
201: _derivation), _derivation);
202:
203: return _result;
204: }
205:
206: /**
207: * Method generated for query /basePremium[in,out]
208: * @param car input parameter generated from slot 0
209: * @return an iterator for instances of BasePremium
210: */
211: public ResultSet<BasePremium> getBasePremium(
212: final example.nz.org.take.compiler.userv.domainmodel.Car car) {
213: DerivationController _derivation = new DefaultDerivationController();
214: ResultSet<BasePremium> _result = new ResultSet(
215: KBFragement_getBasePremium.getBasePremium(car,
216: _derivation), _derivation);
217:
218: return _result;
219: }
220:
221: /**
222: * Method generated for query /additionalPremium[in,in,out]
223: * @param policy input parameter generated from slot 0
224: * @param car input parameter generated from slot 1
225: * @return an iterator for instances of AdditionalPremium
226: */
227: public ResultSet<AdditionalPremium> getAdditionalPremium(
228: final example.nz.org.take.compiler.userv.domainmodel.Policy policy,
229: final example.nz.org.take.compiler.userv.domainmodel.Car car) {
230: DerivationController _derivation = new DefaultDerivationController();
231: ResultSet<AdditionalPremium> _result = new ResultSet(
232: KBFragement_getAdditionalPremium.getAdditionalPremium(
233: policy, car, _derivation), _derivation);
234:
235: return _result;
236: }
237:
238: /**
239: * Method generated for query /additionalDriverPremium[in,out]
240: * @param driver input parameter generated from slot 0
241: * @return an iterator for instances of AdditionalDriverPremium
242: */
243: public ResultSet<AdditionalDriverPremium> getAdditionalDriverPremium(
244: final example.nz.org.take.compiler.userv.domainmodel.Driver driver) {
245: DerivationController _derivation = new DefaultDerivationController();
246: ResultSet<AdditionalDriverPremium> _result = new ResultSet(
247: KBFragement_getAdditionalDriverPremium
248: .getAdditionalDriverPremium(driver, _derivation),
249: _derivation);
250:
251: return _result;
252: }
253:
254: /**
255: * Method generated for query /premiumDiscount[in,out]
256: * @param car input parameter generated from slot 0
257: * @return an iterator for instances of PremiumDiscount
258: */
259: public ResultSet<PremiumDiscount> getPremiumDiscount(
260: final example.nz.org.take.compiler.userv.domainmodel.Car car) {
261: DerivationController _derivation = new DefaultDerivationController();
262: ResultSet<PremiumDiscount> _result = new ResultSet(
263: KBFragement_getPremiumDiscount.getPremiumDiscount(car,
264: _derivation), _derivation);
265:
266: return _result;
267: }
268: }
|