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