Source Code Cross Referenced for RailSelfPropulsionPGImpl.java in  » Science » Cougaar12_4 » org » cougaar » glm » ldm » asset » 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.glm.ldm.asset 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * <copyright>
003:         *  
004:         *  Copyright 1997-2004 BBNT Solutions, LLC
005:         *  under sponsorship of the Defense Advanced Research Projects
006:         *  Agency (DARPA).
007:         * 
008:         *  You can redistribute this software and/or modify it under the
009:         *  terms of the Cougaar Open Source License as published on the
010:         *  Cougaar Open Source Website (www.cougaar.org).
011:         * 
012:         *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
013:         *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
014:         *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
015:         *  A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
016:         *  OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
017:         *  SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
018:         *  LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
019:         *  DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
020:         *  THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
021:         *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
022:         *  OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
023:         *  
024:         * </copyright>
025:         */
026:
027:        /* @generated Thu Sep 27 15:21:47 EDT 2007 from /u01/builds/cougaar/B12_4/B12_4/070927151721/src/glm/src/org/cougaar/glm/ldm/asset/alpprops.def - DO NOT HAND EDIT */
028:        /** Implementation of RailSelfPropulsionPG.
029:         *  @see RailSelfPropulsionPG
030:         *  @see NewRailSelfPropulsionPG
031:         **/package org.cougaar.glm.ldm.asset;
032:
033:        import org.cougaar.planning.ldm.measure.*;
034:        import org.cougaar.planning.ldm.asset.*;
035:        import org.cougaar.planning.ldm.plan.*;
036:        import java.util.*;
037:
038:        import org.cougaar.glm.ldm.plan.*;
039:        import org.cougaar.glm.ldm.oplan.*;
040:        import org.cougaar.glm.ldm.policy.*;
041:        import org.cougaar.core.mts.MessageAddress;
042:        import org.cougaar.glm.execution.common.InventoryReport;
043:
044:        import java.io.ObjectOutputStream;
045:        import java.io.ObjectInputStream;
046:        import java.io.IOException;
047:        import java.beans.PropertyDescriptor;
048:        import java.beans.IndexedPropertyDescriptor;
049:
050:        public class RailSelfPropulsionPGImpl extends java.beans.SimpleBeanInfo
051:                implements  NewRailSelfPropulsionPG, Cloneable {
052:            public RailSelfPropulsionPGImpl() {
053:            }
054:
055:            // Slots
056:
057:            private Volume theFuelConsumptionPerMile;
058:
059:            public Volume getFuelConsumptionPerMile() {
060:                return theFuelConsumptionPerMile;
061:            }
062:
063:            public void setFuelConsumptionPerMile(
064:                    Volume fuel_consumption_per_mile) {
065:                theFuelConsumptionPerMile = fuel_consumption_per_mile;
066:            }
067:
068:            private String theEngineType;
069:
070:            public String getEngineType() {
071:                return theEngineType;
072:            }
073:
074:            public void setEngineType(String engine_type) {
075:                theEngineType = engine_type;
076:            }
077:
078:            private String theFuelType;
079:
080:            public String getFuelType() {
081:                return theFuelType;
082:            }
083:
084:            public void setFuelType(String fuel_type) {
085:                theFuelType = fuel_type;
086:            }
087:
088:            private Speed theMaximumSpeed;
089:
090:            public Speed getMaximumSpeed() {
091:                return theMaximumSpeed;
092:            }
093:
094:            public void setMaximumSpeed(Speed maximum_speed) {
095:                theMaximumSpeed = maximum_speed;
096:            }
097:
098:            private Speed theCruiseSpeed;
099:
100:            public Speed getCruiseSpeed() {
101:                return theCruiseSpeed;
102:            }
103:
104:            public void setCruiseSpeed(Speed cruise_speed) {
105:                theCruiseSpeed = cruise_speed;
106:            }
107:
108:            private Distance theFullPayloadRange;
109:
110:            public Distance getFullPayloadRange() {
111:                return theFullPayloadRange;
112:            }
113:
114:            public void setFullPayloadRange(Distance full_payload_range) {
115:                theFullPayloadRange = full_payload_range;
116:            }
117:
118:            private Distance theEmptyPayloadRange;
119:
120:            public Distance getEmptyPayloadRange() {
121:                return theEmptyPayloadRange;
122:            }
123:
124:            public void setEmptyPayloadRange(Distance empty_payload_range) {
125:                theEmptyPayloadRange = empty_payload_range;
126:            }
127:
128:            public RailSelfPropulsionPGImpl(RailSelfPropulsionPG original) {
129:                theFuelConsumptionPerMile = original
130:                        .getFuelConsumptionPerMile();
131:                theEngineType = original.getEngineType();
132:                theFuelType = original.getFuelType();
133:                theMaximumSpeed = original.getMaximumSpeed();
134:                theCruiseSpeed = original.getCruiseSpeed();
135:                theFullPayloadRange = original.getFullPayloadRange();
136:                theEmptyPayloadRange = original.getEmptyPayloadRange();
137:            }
138:
139:            public boolean equals(Object other) {
140:
141:                if (!(other instanceof  RailSelfPropulsionPG)) {
142:                    return false;
143:                }
144:
145:                RailSelfPropulsionPG otherRailSelfPropulsionPG = (RailSelfPropulsionPG) other;
146:
147:                if (getFuelConsumptionPerMile() == null) {
148:                    if (otherRailSelfPropulsionPG.getFuelConsumptionPerMile() != null) {
149:                        return false;
150:                    }
151:                } else if (!(getFuelConsumptionPerMile()
152:                        .equals(otherRailSelfPropulsionPG
153:                                .getFuelConsumptionPerMile()))) {
154:                    return false;
155:                }
156:
157:                if (getEngineType() == null) {
158:                    if (otherRailSelfPropulsionPG.getEngineType() != null) {
159:                        return false;
160:                    }
161:                } else if (!(getEngineType().equals(otherRailSelfPropulsionPG
162:                        .getEngineType()))) {
163:                    return false;
164:                }
165:
166:                if (getFuelType() == null) {
167:                    if (otherRailSelfPropulsionPG.getFuelType() != null) {
168:                        return false;
169:                    }
170:                } else if (!(getFuelType().equals(otherRailSelfPropulsionPG
171:                        .getFuelType()))) {
172:                    return false;
173:                }
174:
175:                if (getMaximumSpeed() == null) {
176:                    if (otherRailSelfPropulsionPG.getMaximumSpeed() != null) {
177:                        return false;
178:                    }
179:                } else if (!(getMaximumSpeed().equals(otherRailSelfPropulsionPG
180:                        .getMaximumSpeed()))) {
181:                    return false;
182:                }
183:
184:                if (getCruiseSpeed() == null) {
185:                    if (otherRailSelfPropulsionPG.getCruiseSpeed() != null) {
186:                        return false;
187:                    }
188:                } else if (!(getCruiseSpeed().equals(otherRailSelfPropulsionPG
189:                        .getCruiseSpeed()))) {
190:                    return false;
191:                }
192:
193:                if (getFullPayloadRange() == null) {
194:                    if (otherRailSelfPropulsionPG.getFullPayloadRange() != null) {
195:                        return false;
196:                    }
197:                } else if (!(getFullPayloadRange()
198:                        .equals(otherRailSelfPropulsionPG.getFullPayloadRange()))) {
199:                    return false;
200:                }
201:
202:                if (getEmptyPayloadRange() == null) {
203:                    if (otherRailSelfPropulsionPG.getEmptyPayloadRange() != null) {
204:                        return false;
205:                    }
206:                } else if (!(getEmptyPayloadRange()
207:                        .equals(otherRailSelfPropulsionPG
208:                                .getEmptyPayloadRange()))) {
209:                    return false;
210:                }
211:
212:                return true;
213:            }
214:
215:            public boolean hasDataQuality() {
216:                return false;
217:            }
218:
219:            public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
220:                return null;
221:            }
222:
223:            // static inner extension class for real DataQuality Support
224:            public final static class DQ extends RailSelfPropulsionPGImpl
225:                    implements  org.cougaar.planning.ldm.dq.NewHasDataQuality {
226:                public DQ() {
227:                    super ();
228:                }
229:
230:                public DQ(RailSelfPropulsionPG original) {
231:                    super (original);
232:                }
233:
234:                public Object clone() {
235:                    return new DQ(this );
236:                }
237:
238:                private transient org.cougaar.planning.ldm.dq.DataQuality _dq = null;
239:
240:                public boolean hasDataQuality() {
241:                    return (_dq != null);
242:                }
243:
244:                public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
245:                    return _dq;
246:                }
247:
248:                public void setDataQuality(
249:                        org.cougaar.planning.ldm.dq.DataQuality dq) {
250:                    _dq = dq;
251:                }
252:
253:                private void writeObject(ObjectOutputStream out)
254:                        throws IOException {
255:                    out.defaultWriteObject();
256:                    if (out instanceof  org.cougaar.core.persist.PersistenceOutputStream)
257:                        out.writeObject(_dq);
258:                }
259:
260:                private void readObject(ObjectInputStream in)
261:                        throws ClassNotFoundException, IOException {
262:                    in.defaultReadObject();
263:                    if (in instanceof  org.cougaar.core.persist.PersistenceInputStream)
264:                        _dq = (org.cougaar.planning.ldm.dq.DataQuality) in
265:                                .readObject();
266:                }
267:
268:                private final static PropertyDescriptor properties[] = new PropertyDescriptor[1];
269:                static {
270:                    try {
271:                        properties[0] = new PropertyDescriptor("dataQuality",
272:                                DQ.class, "getDataQuality", null);
273:                    } catch (Exception e) {
274:                        e.printStackTrace();
275:                    }
276:                }
277:
278:                public PropertyDescriptor[] getPropertyDescriptors() {
279:                    PropertyDescriptor[] pds = super .properties;
280:                    PropertyDescriptor[] ps = new PropertyDescriptor[pds.length
281:                            + properties.length];
282:                    System.arraycopy(pds, 0, ps, 0, pds.length);
283:                    System.arraycopy(properties, 0, ps, pds.length,
284:                            properties.length);
285:                    return ps;
286:                }
287:            }
288:
289:            private transient RailSelfPropulsionPG _locked = null;
290:
291:            public PropertyGroup lock(Object key) {
292:                if (_locked == null)
293:                    _locked = new _Locked(key);
294:                return _locked;
295:            }
296:
297:            public PropertyGroup lock() {
298:                return lock(null);
299:            }
300:
301:            public NewPropertyGroup unlock(Object key) {
302:                return this ;
303:            }
304:
305:            public Object clone() throws CloneNotSupportedException {
306:                return new RailSelfPropulsionPGImpl(
307:                        RailSelfPropulsionPGImpl.this );
308:            }
309:
310:            public PropertyGroup copy() {
311:                try {
312:                    return (PropertyGroup) clone();
313:                } catch (CloneNotSupportedException cnse) {
314:                    return null;
315:                }
316:            }
317:
318:            public Class getPrimaryClass() {
319:                return primaryClass;
320:            }
321:
322:            public String getAssetGetMethod() {
323:                return assetGetter;
324:            }
325:
326:            public String getAssetSetMethod() {
327:                return assetSetter;
328:            }
329:
330:            private final static PropertyDescriptor properties[] = new PropertyDescriptor[7];
331:            static {
332:                try {
333:                    properties[0] = new PropertyDescriptor(
334:                            "fuel_consumption_per_mile",
335:                            RailSelfPropulsionPG.class,
336:                            "getFuelConsumptionPerMile", null);
337:                    properties[1] = new PropertyDescriptor("engine_type",
338:                            RailSelfPropulsionPG.class, "getEngineType", null);
339:                    properties[2] = new PropertyDescriptor("fuel_type",
340:                            RailSelfPropulsionPG.class, "getFuelType", null);
341:                    properties[3] = new PropertyDescriptor("maximum_speed",
342:                            RailSelfPropulsionPG.class, "getMaximumSpeed", null);
343:                    properties[4] = new PropertyDescriptor("cruise_speed",
344:                            RailSelfPropulsionPG.class, "getCruiseSpeed", null);
345:                    properties[5] = new PropertyDescriptor(
346:                            "full_payload_range", RailSelfPropulsionPG.class,
347:                            "getFullPayloadRange", null);
348:                    properties[6] = new PropertyDescriptor(
349:                            "empty_payload_range", RailSelfPropulsionPG.class,
350:                            "getEmptyPayloadRange", null);
351:                } catch (Exception e) {
352:                    org.cougaar.util.log.Logging.getLogger(
353:                            RailSelfPropulsionPG.class).error(
354:                            "Caught exception", e);
355:                }
356:            }
357:
358:            public PropertyDescriptor[] getPropertyDescriptors() {
359:                return properties;
360:            }
361:
362:            private final class _Locked extends java.beans.SimpleBeanInfo
363:                    implements  RailSelfPropulsionPG, Cloneable, LockedPG {
364:                private transient Object theKey = null;
365:
366:                _Locked(Object key) {
367:                    if (this .theKey == null)
368:                        this .theKey = key;
369:                }
370:
371:                public _Locked() {
372:                }
373:
374:                public PropertyGroup lock() {
375:                    return this ;
376:                }
377:
378:                public PropertyGroup lock(Object o) {
379:                    return this ;
380:                }
381:
382:                public NewPropertyGroup unlock(Object key)
383:                        throws IllegalAccessException {
384:                    if (theKey.equals(key)) {
385:                        return RailSelfPropulsionPGImpl.this ;
386:                    } else {
387:                        throw new IllegalAccessException(
388:                                "unlock: mismatched internal and provided keys!");
389:                    }
390:                }
391:
392:                public PropertyGroup copy() {
393:                    try {
394:                        return (PropertyGroup) clone();
395:                    } catch (CloneNotSupportedException cnse) {
396:                        return null;
397:                    }
398:                }
399:
400:                public Object clone() throws CloneNotSupportedException {
401:                    return new RailSelfPropulsionPGImpl(
402:                            RailSelfPropulsionPGImpl.this );
403:                }
404:
405:                public boolean equals(Object object) {
406:                    return RailSelfPropulsionPGImpl.this .equals(object);
407:                }
408:
409:                public Volume getFuelConsumptionPerMile() {
410:                    return RailSelfPropulsionPGImpl.this 
411:                            .getFuelConsumptionPerMile();
412:                }
413:
414:                public String getEngineType() {
415:                    return RailSelfPropulsionPGImpl.this .getEngineType();
416:                }
417:
418:                public String getFuelType() {
419:                    return RailSelfPropulsionPGImpl.this .getFuelType();
420:                }
421:
422:                public Speed getMaximumSpeed() {
423:                    return RailSelfPropulsionPGImpl.this .getMaximumSpeed();
424:                }
425:
426:                public Speed getCruiseSpeed() {
427:                    return RailSelfPropulsionPGImpl.this .getCruiseSpeed();
428:                }
429:
430:                public Distance getFullPayloadRange() {
431:                    return RailSelfPropulsionPGImpl.this .getFullPayloadRange();
432:                }
433:
434:                public Distance getEmptyPayloadRange() {
435:                    return RailSelfPropulsionPGImpl.this .getEmptyPayloadRange();
436:                }
437:
438:                public final boolean hasDataQuality() {
439:                    return RailSelfPropulsionPGImpl.this .hasDataQuality();
440:                }
441:
442:                public final org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
443:                    return RailSelfPropulsionPGImpl.this .getDataQuality();
444:                }
445:
446:                public Class getPrimaryClass() {
447:                    return primaryClass;
448:                }
449:
450:                public String getAssetGetMethod() {
451:                    return assetGetter;
452:                }
453:
454:                public String getAssetSetMethod() {
455:                    return assetSetter;
456:                }
457:
458:                public PropertyDescriptor[] getPropertyDescriptors() {
459:                    return properties;
460:                }
461:
462:                public Class getIntrospectionClass() {
463:                    return RailSelfPropulsionPGImpl.class;
464:                }
465:
466:            }
467:
468:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.