Source Code Cross Referenced for KBFragement_getBasePremium.java in  » Rule-Engine » take » example » nz » org » take » compiler » userv » generated » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Rule Engine » take » example.nz.org.take.compiler.userv.generated 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


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:        class KBFragement_getBasePremium {
011:            /**
012:             * Method generated for query /basePremium[in,out]
013:             * @param car input parameter generated from slot 0
014:             * @return an iterator for instances of BasePremium
015:             */
016:            public static ResultSet<BasePremium> getBasePremium(
017:                    final example.nz.org.take.compiler.userv.domainmodel.Car car) {
018:                DerivationController _derivation = new DefaultDerivationController();
019:                ResultSet<BasePremium> _result = new ResultSet(
020:                        KBFragement_getBasePremium.getBasePremium(car,
021:                                _derivation), _derivation);
022:
023:                return _result;
024:            }
025:
026:            /**
027:             * Method generated for query /basePremium[in,out]
028:             * @param car input parameter generated from slot 0
029:             * @return an iterator for instances of BasePremium
030:             */
031:            static ResourceIterator<BasePremium> getBasePremium(
032:                    final example.nz.org.take.compiler.userv.domainmodel.Car car,
033:                    final DerivationController _derivation) {
034:                final int _derivationlevel = _derivation.getDepth();
035:                ResourceIterator<BasePremium> result = new IteratorChain<BasePremium>(
036:                        3) {
037:                    public Object getIteratorOrObject(int pos) {
038:                        switch (pos) {
039:                        // AP_01  IF isCompact(<car>) THEN /basePremium(<car>,250)
040:                        case 0:
041:                            return getBasePremium_0(car, _derivation
042:                                    .reset(_derivationlevel));
043:
044:                            // AP_02  IF isSedan(<car>) THEN /basePremium(<car>,400)
045:                        case 1:
046:                            return getBasePremium_1(car, _derivation
047:                                    .reset(_derivationlevel));
048:
049:                            // AP_03  IF isLuxury(<car>) THEN /basePremium(<car>,500)
050:                        case 2:
051:                            return getBasePremium_2(car, _derivation
052:                                    .reset(_derivationlevel));
053:
054:                        default:
055:                            return EmptyIterator.DEFAULT;
056:                        } // switch(pos)
057:                    } // getIterator()
058:
059:                    public String getRuleRef(int pos) {
060:                        switch (pos) {
061:                        // AP_01  IF isCompact(<car>) THEN /basePremium(<car>,250)
062:                        case 0:
063:                            return "AP_01";
064:
065:                            // AP_02  IF isSedan(<car>) THEN /basePremium(<car>,400)
066:                        case 1:
067:                            return "AP_02";
068:
069:                            // AP_03  IF isLuxury(<car>) THEN /basePremium(<car>,500)
070:                        case 2:
071:                            return "AP_03";
072:
073:                        default:
074:                            return "";
075:                        } // switch(pos)
076:                    } // getRuleRef()
077:                };
078:
079:                return result;
080:            }
081:
082:            /**
083:             * Method generated for query /basePremium[in,out]
084:             * @param car input parameter generated from slot 0
085:             * @return an iterator for instances of BasePremium
086:             */
087:            private static ResourceIterator<BasePremium> getBasePremium_0(
088:                    final example.nz.org.take.compiler.userv.domainmodel.Car car,
089:                    final DerivationController _derivation) {
090:                _derivation.log("AP_01", DerivationController.RULE, car,
091:                        DerivationController.NIL);
092:
093:                // Variable bindings in rule:  IF isCompact(<car>) THEN /basePremium(<car>,250)
094:                class bindingsInRule39 {
095:                    // Property generated for term  "<car>"
096:                    example.nz.org.take.compiler.userv.domainmodel.Car p1;
097:
098:                    // Property generated for term  "250"
099:                    long p2;
100:                }
101:                ;
102:
103:                final bindingsInRule39 bindings = new bindingsInRule39();
104:                bindings.p1 = car;
105:                bindings.p2 = 250;
106:
107:                // code for prereq isCompact(<car>)
108:                final ResourceIterator<isCompact> iterator1 = KBFragement_isCompact_1
109:                        .isCompact_1(car, _derivation.increaseDepth());
110:
111:                // code for prereq /basePremium(<car>,250)
112:                final ResourceIterator<BasePremium> iterator2 = new NestedIterator<isCompact, BasePremium>(
113:                        iterator1) {
114:                    public ResourceIterator<BasePremium> getNextIterator(
115:                            isCompact object) {
116:                        bindings.p1 = object.slot1;
117:
118:                        return new SingletonIterator(new BasePremium(
119:                                bindings.p1, bindings.p2));
120:                    }
121:                };
122:
123:                return iterator2;
124:            }
125:
126:            /**
127:             * Method generated for query /basePremium[in,out]
128:             * @param car input parameter generated from slot 0
129:             * @return an iterator for instances of BasePremium
130:             */
131:            private static ResourceIterator<BasePremium> getBasePremium_1(
132:                    final example.nz.org.take.compiler.userv.domainmodel.Car car,
133:                    final DerivationController _derivation) {
134:                _derivation.log("AP_02", DerivationController.RULE, car,
135:                        DerivationController.NIL);
136:
137:                // Variable bindings in rule:  IF isSedan(<car>) THEN /basePremium(<car>,400)
138:                class bindingsInRule40 {
139:                    // Property generated for term  "400"
140:                    long p1;
141:
142:                    // Property generated for term  "<car>"
143:                    example.nz.org.take.compiler.userv.domainmodel.Car p2;
144:                }
145:                ;
146:
147:                final bindingsInRule40 bindings = new bindingsInRule40();
148:                bindings.p1 = 400;
149:                bindings.p2 = car;
150:
151:                // code for prereq isSedan(<car>)
152:                final ResourceIterator<isSedan> iterator1 = KBFragement_isSedan_1
153:                        .isSedan_1(car, _derivation.increaseDepth());
154:
155:                // code for prereq /basePremium(<car>,400)
156:                final ResourceIterator<BasePremium> iterator2 = new NestedIterator<isSedan, BasePremium>(
157:                        iterator1) {
158:                    public ResourceIterator<BasePremium> getNextIterator(
159:                            isSedan object) {
160:                        bindings.p2 = object.slot1;
161:
162:                        return new SingletonIterator(new BasePremium(
163:                                bindings.p2, bindings.p1));
164:                    }
165:                };
166:
167:                return iterator2;
168:            }
169:
170:            /**
171:             * Method generated for query /basePremium[in,out]
172:             * @param car input parameter generated from slot 0
173:             * @return an iterator for instances of BasePremium
174:             */
175:            private static ResourceIterator<BasePremium> getBasePremium_2(
176:                    final example.nz.org.take.compiler.userv.domainmodel.Car car,
177:                    final DerivationController _derivation) {
178:                _derivation.log("AP_03", DerivationController.RULE, car,
179:                        DerivationController.NIL);
180:
181:                // Variable bindings in rule:  IF isLuxury(<car>) THEN /basePremium(<car>,500)
182:                class bindingsInRule41 {
183:                    // Property generated for term  "<car>"
184:                    example.nz.org.take.compiler.userv.domainmodel.Car p1;
185:
186:                    // Property generated for term  "500"
187:                    long p2;
188:                }
189:                ;
190:
191:                final bindingsInRule41 bindings = new bindingsInRule41();
192:                bindings.p1 = car;
193:                bindings.p2 = 500;
194:
195:                // code for prereq isLuxury(<car>)
196:                final ResourceIterator<isLuxury> iterator1 = KBFragement_isLuxury_1
197:                        .isLuxury_1(car, _derivation.increaseDepth());
198:
199:                // code for prereq /basePremium(<car>,500)
200:                final ResourceIterator<BasePremium> iterator2 = new NestedIterator<isLuxury, BasePremium>(
201:                        iterator1) {
202:                    public ResourceIterator<BasePremium> getNextIterator(
203:                            isLuxury object) {
204:                        bindings.p1 = object.slot1;
205:
206:                        return new SingletonIterator(new BasePremium(
207:                                bindings.p1, bindings.p2));
208:                    }
209:                };
210:
211:                return iterator2;
212:            }
213:        }
w_w___w_._j___a__v__a___2s_._com__ | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.