Source Code Cross Referenced for RailTransportationPGImpl.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 RailTransportationPG.
029:         *  @see RailTransportationPG
030:         *  @see NewRailTransportationPG
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 RailTransportationPGImpl extends java.beans.SimpleBeanInfo
051:                implements  NewRailTransportationPG, Cloneable {
052:            public RailTransportationPGImpl() {
053:            }
054:
055:            // Slots
056:
057:            private long theContainerCount;
058:
059:            public long getContainerCount() {
060:                return theContainerCount;
061:            }
062:
063:            public void setContainerCount(long container_count) {
064:                theContainerCount = container_count;
065:            }
066:
067:            private Volume theNonContainerCapacity;
068:
069:            public Volume getNonContainerCapacity() {
070:                return theNonContainerCapacity;
071:            }
072:
073:            public void setNonContainerCapacity(Volume non_container_capacity) {
074:                theNonContainerCapacity = non_container_capacity;
075:            }
076:
077:            private Volume theWaterCapacity;
078:
079:            public Volume getWaterCapacity() {
080:                return theWaterCapacity;
081:            }
082:
083:            public void setWaterCapacity(Volume water_capacity) {
084:                theWaterCapacity = water_capacity;
085:            }
086:
087:            private Volume thePetroleumCapacity;
088:
089:            public Volume getPetroleumCapacity() {
090:                return thePetroleumCapacity;
091:            }
092:
093:            public void setPetroleumCapacity(Volume petroleum_capacity) {
094:                thePetroleumCapacity = petroleum_capacity;
095:            }
096:
097:            private Mass theAmmunitionCapacity;
098:
099:            public Mass getAmmunitionCapacity() {
100:                return theAmmunitionCapacity;
101:            }
102:
103:            public void setAmmunitionCapacity(Mass ammunition_capacity) {
104:                theAmmunitionCapacity = ammunition_capacity;
105:            }
106:
107:            private long thePassengerCapacity;
108:
109:            public long getPassengerCapacity() {
110:                return thePassengerCapacity;
111:            }
112:
113:            public void setPassengerCapacity(long passenger_capacity) {
114:                thePassengerCapacity = passenger_capacity;
115:            }
116:
117:            public RailTransportationPGImpl(RailTransportationPG original) {
118:                theContainerCount = original.getContainerCount();
119:                theNonContainerCapacity = original.getNonContainerCapacity();
120:                theWaterCapacity = original.getWaterCapacity();
121:                thePetroleumCapacity = original.getPetroleumCapacity();
122:                theAmmunitionCapacity = original.getAmmunitionCapacity();
123:                thePassengerCapacity = original.getPassengerCapacity();
124:            }
125:
126:            public boolean equals(Object other) {
127:
128:                if (!(other instanceof  RailTransportationPG)) {
129:                    return false;
130:                }
131:
132:                RailTransportationPG otherRailTransportationPG = (RailTransportationPG) other;
133:
134:                if (!(getContainerCount() == otherRailTransportationPG
135:                        .getContainerCount())) {
136:                    return false;
137:                }
138:
139:                if (getNonContainerCapacity() == null) {
140:                    if (otherRailTransportationPG.getNonContainerCapacity() != null) {
141:                        return false;
142:                    }
143:                } else if (!(getNonContainerCapacity()
144:                        .equals(otherRailTransportationPG
145:                                .getNonContainerCapacity()))) {
146:                    return false;
147:                }
148:
149:                if (getWaterCapacity() == null) {
150:                    if (otherRailTransportationPG.getWaterCapacity() != null) {
151:                        return false;
152:                    }
153:                } else if (!(getWaterCapacity()
154:                        .equals(otherRailTransportationPG.getWaterCapacity()))) {
155:                    return false;
156:                }
157:
158:                if (getPetroleumCapacity() == null) {
159:                    if (otherRailTransportationPG.getPetroleumCapacity() != null) {
160:                        return false;
161:                    }
162:                } else if (!(getPetroleumCapacity()
163:                        .equals(otherRailTransportationPG
164:                                .getPetroleumCapacity()))) {
165:                    return false;
166:                }
167:
168:                if (getAmmunitionCapacity() == null) {
169:                    if (otherRailTransportationPG.getAmmunitionCapacity() != null) {
170:                        return false;
171:                    }
172:                } else if (!(getAmmunitionCapacity()
173:                        .equals(otherRailTransportationPG
174:                                .getAmmunitionCapacity()))) {
175:                    return false;
176:                }
177:
178:                if (!(getPassengerCapacity() == otherRailTransportationPG
179:                        .getPassengerCapacity())) {
180:                    return false;
181:                }
182:
183:                return true;
184:            }
185:
186:            public boolean hasDataQuality() {
187:                return false;
188:            }
189:
190:            public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
191:                return null;
192:            }
193:
194:            // static inner extension class for real DataQuality Support
195:            public final static class DQ extends RailTransportationPGImpl
196:                    implements  org.cougaar.planning.ldm.dq.NewHasDataQuality {
197:                public DQ() {
198:                    super ();
199:                }
200:
201:                public DQ(RailTransportationPG original) {
202:                    super (original);
203:                }
204:
205:                public Object clone() {
206:                    return new DQ(this );
207:                }
208:
209:                private transient org.cougaar.planning.ldm.dq.DataQuality _dq = null;
210:
211:                public boolean hasDataQuality() {
212:                    return (_dq != null);
213:                }
214:
215:                public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
216:                    return _dq;
217:                }
218:
219:                public void setDataQuality(
220:                        org.cougaar.planning.ldm.dq.DataQuality dq) {
221:                    _dq = dq;
222:                }
223:
224:                private void writeObject(ObjectOutputStream out)
225:                        throws IOException {
226:                    out.defaultWriteObject();
227:                    if (out instanceof  org.cougaar.core.persist.PersistenceOutputStream)
228:                        out.writeObject(_dq);
229:                }
230:
231:                private void readObject(ObjectInputStream in)
232:                        throws ClassNotFoundException, IOException {
233:                    in.defaultReadObject();
234:                    if (in instanceof  org.cougaar.core.persist.PersistenceInputStream)
235:                        _dq = (org.cougaar.planning.ldm.dq.DataQuality) in
236:                                .readObject();
237:                }
238:
239:                private final static PropertyDescriptor properties[] = new PropertyDescriptor[1];
240:                static {
241:                    try {
242:                        properties[0] = new PropertyDescriptor("dataQuality",
243:                                DQ.class, "getDataQuality", null);
244:                    } catch (Exception e) {
245:                        e.printStackTrace();
246:                    }
247:                }
248:
249:                public PropertyDescriptor[] getPropertyDescriptors() {
250:                    PropertyDescriptor[] pds = super .properties;
251:                    PropertyDescriptor[] ps = new PropertyDescriptor[pds.length
252:                            + properties.length];
253:                    System.arraycopy(pds, 0, ps, 0, pds.length);
254:                    System.arraycopy(properties, 0, ps, pds.length,
255:                            properties.length);
256:                    return ps;
257:                }
258:            }
259:
260:            private transient RailTransportationPG _locked = null;
261:
262:            public PropertyGroup lock(Object key) {
263:                if (_locked == null)
264:                    _locked = new _Locked(key);
265:                return _locked;
266:            }
267:
268:            public PropertyGroup lock() {
269:                return lock(null);
270:            }
271:
272:            public NewPropertyGroup unlock(Object key) {
273:                return this ;
274:            }
275:
276:            public Object clone() throws CloneNotSupportedException {
277:                return new RailTransportationPGImpl(
278:                        RailTransportationPGImpl.this );
279:            }
280:
281:            public PropertyGroup copy() {
282:                try {
283:                    return (PropertyGroup) clone();
284:                } catch (CloneNotSupportedException cnse) {
285:                    return null;
286:                }
287:            }
288:
289:            public Class getPrimaryClass() {
290:                return primaryClass;
291:            }
292:
293:            public String getAssetGetMethod() {
294:                return assetGetter;
295:            }
296:
297:            public String getAssetSetMethod() {
298:                return assetSetter;
299:            }
300:
301:            private final static PropertyDescriptor properties[] = new PropertyDescriptor[6];
302:            static {
303:                try {
304:                    properties[0] = new PropertyDescriptor("container_count",
305:                            RailTransportationPG.class, "getContainerCount",
306:                            null);
307:                    properties[1] = new PropertyDescriptor(
308:                            "non_container_capacity",
309:                            RailTransportationPG.class,
310:                            "getNonContainerCapacity", null);
311:                    properties[2] = new PropertyDescriptor("water_capacity",
312:                            RailTransportationPG.class, "getWaterCapacity",
313:                            null);
314:                    properties[3] = new PropertyDescriptor(
315:                            "petroleum_capacity", RailTransportationPG.class,
316:                            "getPetroleumCapacity", null);
317:                    properties[4] = new PropertyDescriptor(
318:                            "ammunition_capacity", RailTransportationPG.class,
319:                            "getAmmunitionCapacity", null);
320:                    properties[5] = new PropertyDescriptor(
321:                            "passenger_capacity", RailTransportationPG.class,
322:                            "getPassengerCapacity", null);
323:                } catch (Exception e) {
324:                    org.cougaar.util.log.Logging.getLogger(
325:                            RailTransportationPG.class).error(
326:                            "Caught exception", e);
327:                }
328:            }
329:
330:            public PropertyDescriptor[] getPropertyDescriptors() {
331:                return properties;
332:            }
333:
334:            private final class _Locked extends java.beans.SimpleBeanInfo
335:                    implements  RailTransportationPG, Cloneable, LockedPG {
336:                private transient Object theKey = null;
337:
338:                _Locked(Object key) {
339:                    if (this .theKey == null)
340:                        this .theKey = key;
341:                }
342:
343:                public _Locked() {
344:                }
345:
346:                public PropertyGroup lock() {
347:                    return this ;
348:                }
349:
350:                public PropertyGroup lock(Object o) {
351:                    return this ;
352:                }
353:
354:                public NewPropertyGroup unlock(Object key)
355:                        throws IllegalAccessException {
356:                    if (theKey.equals(key)) {
357:                        return RailTransportationPGImpl.this ;
358:                    } else {
359:                        throw new IllegalAccessException(
360:                                "unlock: mismatched internal and provided keys!");
361:                    }
362:                }
363:
364:                public PropertyGroup copy() {
365:                    try {
366:                        return (PropertyGroup) clone();
367:                    } catch (CloneNotSupportedException cnse) {
368:                        return null;
369:                    }
370:                }
371:
372:                public Object clone() throws CloneNotSupportedException {
373:                    return new RailTransportationPGImpl(
374:                            RailTransportationPGImpl.this );
375:                }
376:
377:                public boolean equals(Object object) {
378:                    return RailTransportationPGImpl.this .equals(object);
379:                }
380:
381:                public long getContainerCount() {
382:                    return RailTransportationPGImpl.this .getContainerCount();
383:                }
384:
385:                public Volume getNonContainerCapacity() {
386:                    return RailTransportationPGImpl.this 
387:                            .getNonContainerCapacity();
388:                }
389:
390:                public Volume getWaterCapacity() {
391:                    return RailTransportationPGImpl.this .getWaterCapacity();
392:                }
393:
394:                public Volume getPetroleumCapacity() {
395:                    return RailTransportationPGImpl.this .getPetroleumCapacity();
396:                }
397:
398:                public Mass getAmmunitionCapacity() {
399:                    return RailTransportationPGImpl.this 
400:                            .getAmmunitionCapacity();
401:                }
402:
403:                public long getPassengerCapacity() {
404:                    return RailTransportationPGImpl.this .getPassengerCapacity();
405:                }
406:
407:                public final boolean hasDataQuality() {
408:                    return RailTransportationPGImpl.this .hasDataQuality();
409:                }
410:
411:                public final org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
412:                    return RailTransportationPGImpl.this .getDataQuality();
413:                }
414:
415:                public Class getPrimaryClass() {
416:                    return primaryClass;
417:                }
418:
419:                public String getAssetGetMethod() {
420:                    return assetGetter;
421:                }
422:
423:                public String getAssetSetMethod() {
424:                    return assetSetter;
425:                }
426:
427:                public PropertyDescriptor[] getPropertyDescriptors() {
428:                    return properties;
429:                }
430:
431:                public Class getIntrospectionClass() {
432:                    return RailTransportationPGImpl.class;
433:                }
434:
435:            }
436:
437:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.