Source Code Cross Referenced for SeaportPGImpl.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 SeaportPG.
029:         *  @see SeaportPG
030:         *  @see NewSeaportPG
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 SeaportPGImpl extends java.beans.SimpleBeanInfo implements 
051:                NewSeaportPG, Cloneable {
052:            public SeaportPGImpl() {
053:            }
054:
055:            // Slots
056:
057:            private long theNumberOfROROBerths;
058:
059:            public long getNumberOfROROBerths() {
060:                return theNumberOfROROBerths;
061:            }
062:
063:            public void setNumberOfROROBerths(long number_of_RORO_berths) {
064:                theNumberOfROROBerths = number_of_RORO_berths;
065:            }
066:
067:            private long theNumberOfContainerBerths;
068:
069:            public long getNumberOfContainerBerths() {
070:                return theNumberOfContainerBerths;
071:            }
072:
073:            public void setNumberOfContainerBerths(
074:                    long number_of_container_berths) {
075:                theNumberOfContainerBerths = number_of_container_berths;
076:            }
077:
078:            private Distance thePierLength;
079:
080:            public Distance getPierLength() {
081:                return thePierLength;
082:            }
083:
084:            public void setPierLength(Distance pier_length) {
085:                thePierLength = pier_length;
086:            }
087:
088:            private Distance thePierWidth;
089:
090:            public Distance getPierWidth() {
091:                return thePierWidth;
092:            }
093:
094:            public void setPierWidth(Distance pier_width) {
095:                thePierWidth = pier_width;
096:            }
097:
098:            private Distance thePierDepth;
099:
100:            public Distance getPierDepth() {
101:                return thePierDepth;
102:            }
103:
104:            public void setPierDepth(Distance pier_depth) {
105:                thePierDepth = pier_depth;
106:            }
107:
108:            private Distance theSupportedTurningRadius;
109:
110:            public Distance getSupportedTurningRadius() {
111:                return theSupportedTurningRadius;
112:            }
113:
114:            public void setSupportedTurningRadius(
115:                    Distance supported_turning_radius) {
116:                theSupportedTurningRadius = supported_turning_radius;
117:            }
118:
119:            private Distance theHighTideDraft;
120:
121:            public Distance getHighTideDraft() {
122:                return theHighTideDraft;
123:            }
124:
125:            public void setHighTideDraft(Distance high_tide_draft) {
126:                theHighTideDraft = high_tide_draft;
127:            }
128:
129:            private Distance theLowTideDraft;
130:
131:            public Distance getLowTideDraft() {
132:                return theLowTideDraft;
133:            }
134:
135:            public void setLowTideDraft(Distance low_tide_draft) {
136:                theLowTideDraft = low_tide_draft;
137:            }
138:
139:            private long theNumberOfContainerCranes;
140:
141:            public long getNumberOfContainerCranes() {
142:                return theNumberOfContainerCranes;
143:            }
144:
145:            public void setNumberOfContainerCranes(
146:                    long number_of_container_cranes) {
147:                theNumberOfContainerCranes = number_of_container_cranes;
148:            }
149:
150:            public SeaportPGImpl(SeaportPG original) {
151:                theNumberOfROROBerths = original.getNumberOfROROBerths();
152:                theNumberOfContainerBerths = original
153:                        .getNumberOfContainerBerths();
154:                thePierLength = original.getPierLength();
155:                thePierWidth = original.getPierWidth();
156:                thePierDepth = original.getPierDepth();
157:                theSupportedTurningRadius = original
158:                        .getSupportedTurningRadius();
159:                theHighTideDraft = original.getHighTideDraft();
160:                theLowTideDraft = original.getLowTideDraft();
161:                theNumberOfContainerCranes = original
162:                        .getNumberOfContainerCranes();
163:            }
164:
165:            public boolean equals(Object other) {
166:
167:                if (!(other instanceof  SeaportPG)) {
168:                    return false;
169:                }
170:
171:                SeaportPG otherSeaportPG = (SeaportPG) other;
172:
173:                if (!(getNumberOfROROBerths() == otherSeaportPG
174:                        .getNumberOfROROBerths())) {
175:                    return false;
176:                }
177:
178:                if (!(getNumberOfContainerBerths() == otherSeaportPG
179:                        .getNumberOfContainerBerths())) {
180:                    return false;
181:                }
182:
183:                if (getPierLength() == null) {
184:                    if (otherSeaportPG.getPierLength() != null) {
185:                        return false;
186:                    }
187:                } else if (!(getPierLength().equals(otherSeaportPG
188:                        .getPierLength()))) {
189:                    return false;
190:                }
191:
192:                if (getPierWidth() == null) {
193:                    if (otherSeaportPG.getPierWidth() != null) {
194:                        return false;
195:                    }
196:                } else if (!(getPierWidth().equals(otherSeaportPG
197:                        .getPierWidth()))) {
198:                    return false;
199:                }
200:
201:                if (getPierDepth() == null) {
202:                    if (otherSeaportPG.getPierDepth() != null) {
203:                        return false;
204:                    }
205:                } else if (!(getPierDepth().equals(otherSeaportPG
206:                        .getPierDepth()))) {
207:                    return false;
208:                }
209:
210:                if (getSupportedTurningRadius() == null) {
211:                    if (otherSeaportPG.getSupportedTurningRadius() != null) {
212:                        return false;
213:                    }
214:                } else if (!(getSupportedTurningRadius().equals(otherSeaportPG
215:                        .getSupportedTurningRadius()))) {
216:                    return false;
217:                }
218:
219:                if (getHighTideDraft() == null) {
220:                    if (otherSeaportPG.getHighTideDraft() != null) {
221:                        return false;
222:                    }
223:                } else if (!(getHighTideDraft().equals(otherSeaportPG
224:                        .getHighTideDraft()))) {
225:                    return false;
226:                }
227:
228:                if (getLowTideDraft() == null) {
229:                    if (otherSeaportPG.getLowTideDraft() != null) {
230:                        return false;
231:                    }
232:                } else if (!(getLowTideDraft().equals(otherSeaportPG
233:                        .getLowTideDraft()))) {
234:                    return false;
235:                }
236:
237:                if (!(getNumberOfContainerCranes() == otherSeaportPG
238:                        .getNumberOfContainerCranes())) {
239:                    return false;
240:                }
241:
242:                return true;
243:            }
244:
245:            public boolean hasDataQuality() {
246:                return false;
247:            }
248:
249:            public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
250:                return null;
251:            }
252:
253:            // static inner extension class for real DataQuality Support
254:            public final static class DQ extends SeaportPGImpl implements 
255:                    org.cougaar.planning.ldm.dq.NewHasDataQuality {
256:                public DQ() {
257:                    super ();
258:                }
259:
260:                public DQ(SeaportPG original) {
261:                    super (original);
262:                }
263:
264:                public Object clone() {
265:                    return new DQ(this );
266:                }
267:
268:                private transient org.cougaar.planning.ldm.dq.DataQuality _dq = null;
269:
270:                public boolean hasDataQuality() {
271:                    return (_dq != null);
272:                }
273:
274:                public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
275:                    return _dq;
276:                }
277:
278:                public void setDataQuality(
279:                        org.cougaar.planning.ldm.dq.DataQuality dq) {
280:                    _dq = dq;
281:                }
282:
283:                private void writeObject(ObjectOutputStream out)
284:                        throws IOException {
285:                    out.defaultWriteObject();
286:                    if (out instanceof  org.cougaar.core.persist.PersistenceOutputStream)
287:                        out.writeObject(_dq);
288:                }
289:
290:                private void readObject(ObjectInputStream in)
291:                        throws ClassNotFoundException, IOException {
292:                    in.defaultReadObject();
293:                    if (in instanceof  org.cougaar.core.persist.PersistenceInputStream)
294:                        _dq = (org.cougaar.planning.ldm.dq.DataQuality) in
295:                                .readObject();
296:                }
297:
298:                private final static PropertyDescriptor properties[] = new PropertyDescriptor[1];
299:                static {
300:                    try {
301:                        properties[0] = new PropertyDescriptor("dataQuality",
302:                                DQ.class, "getDataQuality", null);
303:                    } catch (Exception e) {
304:                        e.printStackTrace();
305:                    }
306:                }
307:
308:                public PropertyDescriptor[] getPropertyDescriptors() {
309:                    PropertyDescriptor[] pds = super .properties;
310:                    PropertyDescriptor[] ps = new PropertyDescriptor[pds.length
311:                            + properties.length];
312:                    System.arraycopy(pds, 0, ps, 0, pds.length);
313:                    System.arraycopy(properties, 0, ps, pds.length,
314:                            properties.length);
315:                    return ps;
316:                }
317:            }
318:
319:            private transient SeaportPG _locked = null;
320:
321:            public PropertyGroup lock(Object key) {
322:                if (_locked == null)
323:                    _locked = new _Locked(key);
324:                return _locked;
325:            }
326:
327:            public PropertyGroup lock() {
328:                return lock(null);
329:            }
330:
331:            public NewPropertyGroup unlock(Object key) {
332:                return this ;
333:            }
334:
335:            public Object clone() throws CloneNotSupportedException {
336:                return new SeaportPGImpl(SeaportPGImpl.this );
337:            }
338:
339:            public PropertyGroup copy() {
340:                try {
341:                    return (PropertyGroup) clone();
342:                } catch (CloneNotSupportedException cnse) {
343:                    return null;
344:                }
345:            }
346:
347:            public Class getPrimaryClass() {
348:                return primaryClass;
349:            }
350:
351:            public String getAssetGetMethod() {
352:                return assetGetter;
353:            }
354:
355:            public String getAssetSetMethod() {
356:                return assetSetter;
357:            }
358:
359:            private final static PropertyDescriptor properties[] = new PropertyDescriptor[9];
360:            static {
361:                try {
362:                    properties[0] = new PropertyDescriptor(
363:                            "number_of_RORO_berths", SeaportPG.class,
364:                            "getNumberOfROROBerths", null);
365:                    properties[1] = new PropertyDescriptor(
366:                            "number_of_container_berths", SeaportPG.class,
367:                            "getNumberOfContainerBerths", null);
368:                    properties[2] = new PropertyDescriptor("pier_length",
369:                            SeaportPG.class, "getPierLength", null);
370:                    properties[3] = new PropertyDescriptor("pier_width",
371:                            SeaportPG.class, "getPierWidth", null);
372:                    properties[4] = new PropertyDescriptor("pier_depth",
373:                            SeaportPG.class, "getPierDepth", null);
374:                    properties[5] = new PropertyDescriptor(
375:                            "supported_turning_radius", SeaportPG.class,
376:                            "getSupportedTurningRadius", null);
377:                    properties[6] = new PropertyDescriptor("high_tide_draft",
378:                            SeaportPG.class, "getHighTideDraft", null);
379:                    properties[7] = new PropertyDescriptor("low_tide_draft",
380:                            SeaportPG.class, "getLowTideDraft", null);
381:                    properties[8] = new PropertyDescriptor(
382:                            "number_of_container_cranes", SeaportPG.class,
383:                            "getNumberOfContainerCranes", null);
384:                } catch (Exception e) {
385:                    org.cougaar.util.log.Logging.getLogger(SeaportPG.class)
386:                            .error("Caught exception", e);
387:                }
388:            }
389:
390:            public PropertyDescriptor[] getPropertyDescriptors() {
391:                return properties;
392:            }
393:
394:            private final class _Locked extends java.beans.SimpleBeanInfo
395:                    implements  SeaportPG, Cloneable, LockedPG {
396:                private transient Object theKey = null;
397:
398:                _Locked(Object key) {
399:                    if (this .theKey == null)
400:                        this .theKey = key;
401:                }
402:
403:                public _Locked() {
404:                }
405:
406:                public PropertyGroup lock() {
407:                    return this ;
408:                }
409:
410:                public PropertyGroup lock(Object o) {
411:                    return this ;
412:                }
413:
414:                public NewPropertyGroup unlock(Object key)
415:                        throws IllegalAccessException {
416:                    if (theKey.equals(key)) {
417:                        return SeaportPGImpl.this ;
418:                    } else {
419:                        throw new IllegalAccessException(
420:                                "unlock: mismatched internal and provided keys!");
421:                    }
422:                }
423:
424:                public PropertyGroup copy() {
425:                    try {
426:                        return (PropertyGroup) clone();
427:                    } catch (CloneNotSupportedException cnse) {
428:                        return null;
429:                    }
430:                }
431:
432:                public Object clone() throws CloneNotSupportedException {
433:                    return new SeaportPGImpl(SeaportPGImpl.this );
434:                }
435:
436:                public boolean equals(Object object) {
437:                    return SeaportPGImpl.this .equals(object);
438:                }
439:
440:                public long getNumberOfROROBerths() {
441:                    return SeaportPGImpl.this .getNumberOfROROBerths();
442:                }
443:
444:                public long getNumberOfContainerBerths() {
445:                    return SeaportPGImpl.this .getNumberOfContainerBerths();
446:                }
447:
448:                public Distance getPierLength() {
449:                    return SeaportPGImpl.this .getPierLength();
450:                }
451:
452:                public Distance getPierWidth() {
453:                    return SeaportPGImpl.this .getPierWidth();
454:                }
455:
456:                public Distance getPierDepth() {
457:                    return SeaportPGImpl.this .getPierDepth();
458:                }
459:
460:                public Distance getSupportedTurningRadius() {
461:                    return SeaportPGImpl.this .getSupportedTurningRadius();
462:                }
463:
464:                public Distance getHighTideDraft() {
465:                    return SeaportPGImpl.this .getHighTideDraft();
466:                }
467:
468:                public Distance getLowTideDraft() {
469:                    return SeaportPGImpl.this .getLowTideDraft();
470:                }
471:
472:                public long getNumberOfContainerCranes() {
473:                    return SeaportPGImpl.this .getNumberOfContainerCranes();
474:                }
475:
476:                public final boolean hasDataQuality() {
477:                    return SeaportPGImpl.this .hasDataQuality();
478:                }
479:
480:                public final org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
481:                    return SeaportPGImpl.this .getDataQuality();
482:                }
483:
484:                public Class getPrimaryClass() {
485:                    return primaryClass;
486:                }
487:
488:                public String getAssetGetMethod() {
489:                    return assetGetter;
490:                }
491:
492:                public String getAssetSetMethod() {
493:                    return assetSetter;
494:                }
495:
496:                public PropertyDescriptor[] getPropertyDescriptors() {
497:                    return properties;
498:                }
499:
500:                public Class getIntrospectionClass() {
501:                    return SeaportPGImpl.class;
502:                }
503:
504:            }
505:
506:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.