Source Code Cross Referenced for Level2.java in  » Science » Cougaar12_4 » org » cougaar » core » qos » frame » scale » 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 » Science » Cougaar12_4 » org.cougaar.core.qos.frame.scale 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Generated by Cougaar QoS FrameGen
003:         *   from /Volumes/Data/Projects/cougaar/HEAD/qos/src/org/cougaar/core/qos/frame/scale/test-scale-protos.xml
004:         *   at Aug 3, 2006 10:09:21 AM
005:         *
006:         * Copyright BBN Technologies 2006
007:         *
008:         */
009:        package org.cougaar.core.qos.frame.scale;
010:
011:        import org.cougaar.core.qos.frame.DataFrame;
012:        import org.cougaar.core.qos.frame.FrameSet;
013:        import org.cougaar.core.qos.frame.SlotDescription;
014:        import org.cougaar.core.util.UID;
015:
016:        public class Level2 extends Thing {
017:            static {
018:                org.cougaar.core.qos.frame.FrameMaker __fm = new org.cougaar.core.qos.frame.FrameMaker() {
019:                    public DataFrame makeFrame(FrameSet frameSet, UID uid) {
020:                        return new Level2(frameSet, uid);
021:                    }
022:                };
023:                DataFrame.registerFrameMaker(
024:                        "org.cougaar.core.qos.frame.scale", "level2", __fm);
025:            }
026:            private String level2SlotString;
027:            private float level2SlotFloat;
028:
029:            public Level2(UID uid) {
030:                this (null, uid);
031:            }
032:
033:            public Level2(FrameSet frameSet, UID uid) {
034:                super (frameSet, uid);
035:                initializeLevel2SlotString("Two");
036:                initializeLevel2SlotFloat(2.0f);
037:            }
038:
039:            public String getKind() {
040:                return "level2";
041:            }
042:
043:            protected void collectSlotValues(java.util.Properties __props) {
044:                super .collectSlotValues(__props);
045:                Object __value;
046:                __value = getLevel2SlotString__AsObject();
047:                __props
048:                        .put("level2SlotString", __value != null ? __value
049:                                : NIL);
050:                __value = getLevel2SlotFloat__AsObject();
051:                __props.put("level2SlotFloat", __value != null ? __value : NIL);
052:            }
053:
054:            protected void collectContainerSlotValues(
055:                    java.util.Properties __props) {
056:                super .collectContainerSlotValues(__props);
057:                Object __value;
058:                __value = getLevel1SlotString__AsObject();
059:                __props
060:                        .put("level1SlotString", __value != null ? __value
061:                                : NIL);
062:                __value = getRootSlotFloat__AsObject();
063:                __props.put("rootSlotFloat", __value != null ? __value : NIL);
064:                __value = getLevel1SlotFloat__AsObject();
065:                __props.put("level1SlotFloat", __value != null ? __value : NIL);
066:                __value = getRootSlotString__AsObject();
067:                __props.put("rootSlotString", __value != null ? __value : NIL);
068:            }
069:
070:            public String getLevel2SlotString() {
071:                return level2SlotString;
072:            }
073:
074:            String getLevel2SlotString__NoWarn() {
075:                return level2SlotString;
076:            }
077:
078:            Object getLevel2SlotString__AsObject() {
079:                return level2SlotString;
080:            }
081:
082:            public void setLevel2SlotString(String __new_value) {
083:                String __old_value = level2SlotString;
084:                this .level2SlotString = __new_value;
085:                slotModified("level2SlotString", __old_value, __new_value,
086:                        true, true);
087:            }
088:
089:            public void setLevel2SlotString__AsObject(Object __new_value) {
090:                Object __old_value = getLevel2SlotString__AsObject();
091:                this .level2SlotString = force_String(__new_value);
092:                slotModified("level2SlotString", __old_value, __new_value,
093:                        true, true);
094:            }
095:
096:            protected void initializeLevel2SlotString(String new_value) {
097:                this .level2SlotString = new_value;
098:                slotInitialized("level2SlotString", new_value);
099:            }
100:
101:            void initializeLevel2SlotString__AsObject(Object new_value) {
102:                this .level2SlotString = force_String(new_value);
103:                slotInitialized("level2SlotString", new_value);
104:            }
105:
106:            public float getLevel2SlotFloat() {
107:                return level2SlotFloat;
108:            }
109:
110:            float getLevel2SlotFloat__NoWarn() {
111:                return level2SlotFloat;
112:            }
113:
114:            Object getLevel2SlotFloat__AsObject() {
115:                return new Float(level2SlotFloat);
116:            }
117:
118:            public void setLevel2SlotFloat(float __new_value) {
119:                float __old_value = level2SlotFloat;
120:                this .level2SlotFloat = __new_value;
121:                slotModified("level2SlotFloat", new Float(__old_value),
122:                        new Float(__new_value), true, true);
123:            }
124:
125:            public void setLevel2SlotFloat__AsObject(Object __new_value) {
126:                Object __old_value = getLevel2SlotFloat__AsObject();
127:                this .level2SlotFloat = force_float(__new_value);
128:                slotModified("level2SlotFloat", __old_value, __new_value, true,
129:                        true);
130:            }
131:
132:            protected void initializeLevel2SlotFloat(float new_value) {
133:                this .level2SlotFloat = new_value;
134:                slotInitialized("level2SlotFloat", new Float(new_value));
135:            }
136:
137:            void initializeLevel2SlotFloat__AsObject(Object new_value) {
138:                this .level2SlotFloat = force_float(new_value);
139:                slotInitialized("level2SlotFloat", new_value);
140:            }
141:
142:            public String getLevel1SlotString() {
143:                Object __raw_container = containerFrame();
144:                if (__raw_container == null)
145:                    return "One";
146:                if (!(__raw_container instanceof  Level1))
147:                    throw new RuntimeException("Bogus container!");
148:                Level1 __container = (Level1) __raw_container;
149:                return __container.getLevel1SlotString();
150:            }
151:
152:            Object getLevel1SlotString__AsObject() {
153:                Object __raw_container = containerFrame();
154:                if (__raw_container == null)
155:                    return "One";
156:                if (!(__raw_container instanceof  Level1)) {
157:                    getLogger().warn(
158:                            "Container of " + this  + " is not a Level1: "
159:                                    + __raw_container);
160:                    return null;
161:                }
162:                Level1 __container = (Level1) __raw_container;
163:                return __container.getLevel1SlotString__AsObject();
164:            }
165:
166:            public float getRootSlotFloat() {
167:                Object __raw_container = containerFrame();
168:                if (__raw_container == null)
169:                    return 0.0f;
170:                if (!(__raw_container instanceof  Level1))
171:                    throw new RuntimeException("Bogus container!");
172:                Level1 __container = (Level1) __raw_container;
173:                return __container.getRootSlotFloat();
174:            }
175:
176:            Object getRootSlotFloat__AsObject() {
177:                Object __raw_container = containerFrame();
178:                if (__raw_container == null)
179:                    return 0.0f;
180:                if (!(__raw_container instanceof  Level1)) {
181:                    getLogger().warn(
182:                            "Container of " + this  + " is not a Level1: "
183:                                    + __raw_container);
184:                    return null;
185:                }
186:                Level1 __container = (Level1) __raw_container;
187:                return __container.getRootSlotFloat__AsObject();
188:            }
189:
190:            public float getLevel1SlotFloat() {
191:                Object __raw_container = containerFrame();
192:                if (__raw_container == null)
193:                    return 1.0f;
194:                if (!(__raw_container instanceof  Level1))
195:                    throw new RuntimeException("Bogus container!");
196:                Level1 __container = (Level1) __raw_container;
197:                return __container.getLevel1SlotFloat();
198:            }
199:
200:            Object getLevel1SlotFloat__AsObject() {
201:                Object __raw_container = containerFrame();
202:                if (__raw_container == null)
203:                    return 1.0f;
204:                if (!(__raw_container instanceof  Level1)) {
205:                    getLogger().warn(
206:                            "Container of " + this  + " is not a Level1: "
207:                                    + __raw_container);
208:                    return null;
209:                }
210:                Level1 __container = (Level1) __raw_container;
211:                return __container.getLevel1SlotFloat__AsObject();
212:            }
213:
214:            public String getRootSlotString() {
215:                Object __raw_container = containerFrame();
216:                if (__raw_container == null)
217:                    return "Zero";
218:                if (!(__raw_container instanceof  Level1))
219:                    throw new RuntimeException("Bogus container!");
220:                Level1 __container = (Level1) __raw_container;
221:                return __container.getRootSlotString();
222:            }
223:
224:            Object getRootSlotString__AsObject() {
225:                Object __raw_container = containerFrame();
226:                if (__raw_container == null)
227:                    return "Zero";
228:                if (!(__raw_container instanceof  Level1)) {
229:                    getLogger().warn(
230:                            "Container of " + this  + " is not a Level1: "
231:                                    + __raw_container);
232:                    return null;
233:                }
234:                Level1 __container = (Level1) __raw_container;
235:                return __container.getRootSlotString__AsObject();
236:            }
237:
238:            protected void fireContainerChanges(DataFrame __raw_old,
239:                    DataFrame __raw_new) {
240:                if (!(__raw_old instanceof  Level1)) {
241:                    getLogger().warn(
242:                            "Container of " + this  + " is not a Level1: "
243:                                    + __raw_old);
244:                    return;
245:                }
246:                if (!(__raw_new instanceof  Level1)) {
247:                    getLogger().warn(
248:                            "Container of " + this  + " is not a Level1: "
249:                                    + __raw_new);
250:                    return;
251:                }
252:                Level1 __old_frame = (Level1) __raw_old;
253:                Level1 __new_frame = (Level1) __raw_new;
254:                Object __old;
255:                Object __new;
256:                __old = __old_frame.getLevel1SlotString__AsObject();
257:                __new = __new_frame.getLevel1SlotString__AsObject();
258:                if (__new != null) {
259:                    if (__old == null || !__old.equals(__new)) {
260:                        fireChange("level1SlotString", __old, __new);
261:                    }
262:                }
263:                __old = __old_frame.getRootSlotFloat__AsObject();
264:                __new = __new_frame.getRootSlotFloat__AsObject();
265:                if (__new != null) {
266:                    if (__old == null || !__old.equals(__new)) {
267:                        fireChange("rootSlotFloat", __old, __new);
268:                    }
269:                }
270:                __old = __old_frame.getLevel1SlotFloat__AsObject();
271:                __new = __new_frame.getLevel1SlotFloat__AsObject();
272:                if (__new != null) {
273:                    if (__old == null || !__old.equals(__new)) {
274:                        fireChange("level1SlotFloat", __old, __new);
275:                    }
276:                }
277:                __old = __old_frame.getRootSlotString__AsObject();
278:                __new = __new_frame.getRootSlotString__AsObject();
279:                if (__new != null) {
280:                    if (__old == null || !__old.equals(__new)) {
281:                        fireChange("rootSlotString", __old, __new);
282:                    }
283:                }
284:            }
285:
286:            protected void fireContainerChanges(DataFrame __raw) {
287:                if (!(__raw instanceof  Level1)) {
288:                    getLogger().warn(
289:                            "Container of " + this  + " is not a Level1: "
290:                                    + __raw);
291:                    return;
292:                }
293:                Level1 __new_frame = (Level1) __raw;
294:                Object __new;
295:                __new = __new_frame.getLevel1SlotString__AsObject();
296:                if (__new != null) {
297:                    fireChange("level1SlotString", null, __new);
298:                }
299:                __new = __new_frame.getRootSlotFloat__AsObject();
300:                if (__new != null) {
301:                    fireChange("rootSlotFloat", null, __new);
302:                }
303:                __new = __new_frame.getLevel1SlotFloat__AsObject();
304:                if (__new != null) {
305:                    fireChange("level1SlotFloat", null, __new);
306:                }
307:                __new = __new_frame.getRootSlotString__AsObject();
308:                if (__new != null) {
309:                    fireChange("rootSlotString", null, __new);
310:                }
311:            }
312:
313:            protected Object getLocalValue(String __slot) {
314:                String __key = __slot.intern();
315:                if ("rootSlotFloat" == __key)
316:                    return getRootSlotFloat__AsObject();
317:                else if ("level1SlotString" == __key)
318:                    return getLevel1SlotString__AsObject();
319:                else if ("level2SlotString" == __key)
320:                    return getLevel2SlotString__AsObject();
321:                else if ("level2SlotFloat" == __key)
322:                    return getLevel2SlotFloat__AsObject();
323:                else if ("name" == __key)
324:                    return getName__AsObject();
325:                else if ("level1SlotFloat" == __key)
326:                    return getLevel1SlotFloat__AsObject();
327:                else if ("rootSlotString" == __key)
328:                    return getRootSlotString__AsObject();
329:                else
330:                    return super .getLocalValue(__slot);
331:            }
332:
333:            protected void setLocalValue(String __slot, Object __value) {
334:                String __key = __slot.intern();
335:                if ("level2SlotString" == __key)
336:                    setLevel2SlotString__AsObject(__value);
337:                else if ("level2SlotFloat" == __key)
338:                    setLevel2SlotFloat__AsObject(__value);
339:                else
340:                    super .setLocalValue(__slot, __value);
341:            }
342:
343:            protected void initializeLocalValue(String __slot, Object __value) {
344:                String __key = __slot.intern();
345:                if ("level2SlotString" == __key)
346:                    initializeLevel2SlotString__AsObject(__value);
347:                else if ("level2SlotFloat" == __key)
348:                    initializeLevel2SlotFloat__AsObject(__value);
349:                else
350:                    super .initializeLocalValue(__slot, __value);
351:            }
352:
353:            protected void collectSlotNames(java.util.Set<String> slots) {
354:                super .collectSlotNames(slots);
355:                slots.add("level2SlotString");
356:                slots.add("level2SlotFloat");
357:                slots.add("level1SlotString");
358:                slots.add("rootSlotFloat");
359:                slots.add("level1SlotFloat");
360:                slots.add("rootSlotString");
361:            }
362:
363:            public SlotDescription slotMetaData__Level2SlotString() {
364:                SlotDescription __desc = new SlotDescription();
365:                __desc.name = "level2SlotString";
366:                __desc.prototype = "level2";
367:                __desc.is_writable = true;
368:                Object __value;
369:                __value = level2SlotString;
370:                if (__value != null) {
371:                    __desc.is_overridden = true;
372:                    __desc.value = __value;
373:                } else {
374:                    __desc.is_overridden = false;
375:                    __desc.value = "Two";
376:                }
377:                return __desc;
378:            }
379:
380:            public SlotDescription slotMetaData__Level2SlotFloat() {
381:                SlotDescription __desc = new SlotDescription();
382:                __desc.name = "level2SlotFloat";
383:                __desc.prototype = "level2";
384:                __desc.is_writable = true;
385:                Object __value;
386:                __value = new Float(level2SlotFloat);
387:                if (__value != null) {
388:                    __desc.is_overridden = true;
389:                    __desc.value = __value;
390:                } else {
391:                    __desc.is_overridden = false;
392:                    __desc.value = new Float(2.0f);
393:                }
394:                return __desc;
395:            }
396:
397:            public SlotDescription slotMetaData__Level1SlotString() {
398:                SlotDescription __desc = new SlotDescription();
399:                __desc.name = "level1SlotString";
400:                __desc.prototype = "level1";
401:                __desc.value = getLevel1SlotString__AsObject();
402:                __desc.is_overridden = false;
403:                __desc.is_writable = false;
404:                return __desc;
405:            }
406:
407:            public SlotDescription slotMetaData__RootSlotFloat() {
408:                SlotDescription __desc = new SlotDescription();
409:                __desc.name = "rootSlotFloat";
410:                __desc.prototype = "root";
411:                __desc.value = getRootSlotFloat__AsObject();
412:                __desc.is_overridden = false;
413:                __desc.is_writable = false;
414:                return __desc;
415:            }
416:
417:            public SlotDescription slotMetaData__Level1SlotFloat() {
418:                SlotDescription __desc = new SlotDescription();
419:                __desc.name = "level1SlotFloat";
420:                __desc.prototype = "level1";
421:                __desc.value = getLevel1SlotFloat__AsObject();
422:                __desc.is_overridden = false;
423:                __desc.is_writable = false;
424:                return __desc;
425:            }
426:
427:            public SlotDescription slotMetaData__RootSlotString() {
428:                SlotDescription __desc = new SlotDescription();
429:                __desc.name = "rootSlotString";
430:                __desc.prototype = "root";
431:                __desc.value = getRootSlotString__AsObject();
432:                __desc.is_overridden = false;
433:                __desc.is_writable = false;
434:                return __desc;
435:            }
436:
437:            protected void collectSlotDescriptions(
438:                    java.util.Map<String, SlotDescription> map) {
439:                super .collectSlotDescriptions(map);
440:                map.put("level2SlotString", slotMetaData__Level2SlotString());
441:                map.put("level2SlotFloat", slotMetaData__Level2SlotFloat());
442:                map.put("level1SlotString", slotMetaData__Level1SlotString());
443:                map.put("rootSlotFloat", slotMetaData__RootSlotFloat());
444:                map.put("level1SlotFloat", slotMetaData__Level1SlotFloat());
445:                map.put("rootSlotString", slotMetaData__RootSlotString());
446:            }
447:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.