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