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 DeckPG.
029: * @see DeckPG
030: * @see NewDeckPG
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 DeckPGImpl extends java.beans.SimpleBeanInfo implements
051: NewDeckPG, Cloneable {
052: public DeckPGImpl() {
053: }
054:
055: // Slots
056:
057: private int theLevel;
058:
059: public int getLevel() {
060: return theLevel;
061: }
062:
063: public void setLevel(int level) {
064: theLevel = level;
065: }
066:
067: private String theShipId;
068:
069: public String getShipId() {
070: return theShipId;
071: }
072:
073: public void setShipId(String ship_id) {
074: theShipId = ship_id;
075: }
076:
077: private Distance theMaximumLength;
078:
079: public Distance getMaximumLength() {
080: return theMaximumLength;
081: }
082:
083: public void setMaximumLength(Distance maximum_length) {
084: theMaximumLength = maximum_length;
085: }
086:
087: private Distance theMaximumWidth;
088:
089: public Distance getMaximumWidth() {
090: return theMaximumWidth;
091: }
092:
093: public void setMaximumWidth(Distance maximum_width) {
094: theMaximumWidth = maximum_width;
095: }
096:
097: private Distance theMaximumHeight;
098:
099: public Distance getMaximumHeight() {
100: return theMaximumHeight;
101: }
102:
103: public void setMaximumHeight(Distance maximum_height) {
104: theMaximumHeight = maximum_height;
105: }
106:
107: private Volume theMaximumVolume;
108:
109: public Volume getMaximumVolume() {
110: return theMaximumVolume;
111: }
112:
113: public void setMaximumVolume(Volume maximum_volume) {
114: theMaximumVolume = maximum_volume;
115: }
116:
117: private Area theMaximumFootprintArea;
118:
119: public Area getMaximumFootprintArea() {
120: return theMaximumFootprintArea;
121: }
122:
123: public void setMaximumFootprintArea(Area maximum_footprint_area) {
124: theMaximumFootprintArea = maximum_footprint_area;
125: }
126:
127: private Mass theMaximumWeight;
128:
129: public Mass getMaximumWeight() {
130: return theMaximumWeight;
131: }
132:
133: public void setMaximumWeight(Mass maximum_weight) {
134: theMaximumWeight = maximum_weight;
135: }
136:
137: private long theMaximumPassengers;
138:
139: public long getMaximumPassengers() {
140: return theMaximumPassengers;
141: }
142:
143: public void setMaximumPassengers(long maximum_passengers) {
144: theMaximumPassengers = maximum_passengers;
145: }
146:
147: private boolean theRefrigeration;
148:
149: public boolean getRefrigeration() {
150: return theRefrigeration;
151: }
152:
153: public void setRefrigeration(boolean refrigeration) {
154: theRefrigeration = refrigeration;
155: }
156:
157: private Duration theTimeToLoad;
158:
159: public Duration getTimeToLoad() {
160: return theTimeToLoad;
161: }
162:
163: public void setTimeToLoad(Duration time_to_load) {
164: theTimeToLoad = time_to_load;
165: }
166:
167: private Duration theTimeToUnload;
168:
169: public Duration getTimeToUnload() {
170: return theTimeToUnload;
171: }
172:
173: public void setTimeToUnload(Duration time_to_unload) {
174: theTimeToUnload = time_to_unload;
175: }
176:
177: private Duration theTimeToRefuel;
178:
179: public Duration getTimeToRefuel() {
180: return theTimeToRefuel;
181: }
182:
183: public void setTimeToRefuel(Duration time_to_refuel) {
184: theTimeToRefuel = time_to_refuel;
185: }
186:
187: private long theMaximumContainers;
188:
189: public long getMaximumContainers() {
190: return theMaximumContainers;
191: }
192:
193: public void setMaximumContainers(long maximum_containers) {
194: theMaximumContainers = maximum_containers;
195: }
196:
197: private boolean theIsPrepositioned;
198:
199: public boolean getIsPrepositioned() {
200: return theIsPrepositioned;
201: }
202:
203: public void setIsPrepositioned(boolean is_prepositioned) {
204: theIsPrepositioned = is_prepositioned;
205: }
206:
207: private String theCargoRestrictions;
208:
209: public String getCargoRestrictions() {
210: return theCargoRestrictions;
211: }
212:
213: public void setCargoRestrictions(String cargo_restrictions) {
214: theCargoRestrictions = cargo_restrictions;
215: }
216:
217: private String thePermittedCargoCategoryCodes;
218:
219: public String getPermittedCargoCategoryCodes() {
220: return thePermittedCargoCategoryCodes;
221: }
222:
223: public void setPermittedCargoCategoryCodes(
224: String permitted_cargo_category_codes) {
225: thePermittedCargoCategoryCodes = permitted_cargo_category_codes;
226: }
227:
228: public DeckPGImpl(DeckPG original) {
229: theLevel = original.getLevel();
230: theShipId = original.getShipId();
231: theMaximumLength = original.getMaximumLength();
232: theMaximumWidth = original.getMaximumWidth();
233: theMaximumHeight = original.getMaximumHeight();
234: theMaximumVolume = original.getMaximumVolume();
235: theMaximumFootprintArea = original.getMaximumFootprintArea();
236: theMaximumWeight = original.getMaximumWeight();
237: theMaximumPassengers = original.getMaximumPassengers();
238: theRefrigeration = original.getRefrigeration();
239: theTimeToLoad = original.getTimeToLoad();
240: theTimeToUnload = original.getTimeToUnload();
241: theTimeToRefuel = original.getTimeToRefuel();
242: theMaximumContainers = original.getMaximumContainers();
243: theIsPrepositioned = original.getIsPrepositioned();
244: theCargoRestrictions = original.getCargoRestrictions();
245: thePermittedCargoCategoryCodes = original
246: .getPermittedCargoCategoryCodes();
247: }
248:
249: public boolean equals(Object other) {
250:
251: if (!(other instanceof DeckPG)) {
252: return false;
253: }
254:
255: DeckPG otherDeckPG = (DeckPG) other;
256:
257: if (!(getLevel() == otherDeckPG.getLevel())) {
258: return false;
259: }
260:
261: if (getShipId() == null) {
262: if (otherDeckPG.getShipId() != null) {
263: return false;
264: }
265: } else if (!(getShipId().equals(otherDeckPG.getShipId()))) {
266: return false;
267: }
268:
269: if (getMaximumLength() == null) {
270: if (otherDeckPG.getMaximumLength() != null) {
271: return false;
272: }
273: } else if (!(getMaximumLength().equals(otherDeckPG
274: .getMaximumLength()))) {
275: return false;
276: }
277:
278: if (getMaximumWidth() == null) {
279: if (otherDeckPG.getMaximumWidth() != null) {
280: return false;
281: }
282: } else if (!(getMaximumWidth().equals(otherDeckPG
283: .getMaximumWidth()))) {
284: return false;
285: }
286:
287: if (getMaximumHeight() == null) {
288: if (otherDeckPG.getMaximumHeight() != null) {
289: return false;
290: }
291: } else if (!(getMaximumHeight().equals(otherDeckPG
292: .getMaximumHeight()))) {
293: return false;
294: }
295:
296: if (getMaximumVolume() == null) {
297: if (otherDeckPG.getMaximumVolume() != null) {
298: return false;
299: }
300: } else if (!(getMaximumVolume().equals(otherDeckPG
301: .getMaximumVolume()))) {
302: return false;
303: }
304:
305: if (getMaximumFootprintArea() == null) {
306: if (otherDeckPG.getMaximumFootprintArea() != null) {
307: return false;
308: }
309: } else if (!(getMaximumFootprintArea().equals(otherDeckPG
310: .getMaximumFootprintArea()))) {
311: return false;
312: }
313:
314: if (getMaximumWeight() == null) {
315: if (otherDeckPG.getMaximumWeight() != null) {
316: return false;
317: }
318: } else if (!(getMaximumWeight().equals(otherDeckPG
319: .getMaximumWeight()))) {
320: return false;
321: }
322:
323: if (!(getMaximumPassengers() == otherDeckPG
324: .getMaximumPassengers())) {
325: return false;
326: }
327:
328: if (!(getRefrigeration() == otherDeckPG.getRefrigeration())) {
329: return false;
330: }
331:
332: if (getTimeToLoad() == null) {
333: if (otherDeckPG.getTimeToLoad() != null) {
334: return false;
335: }
336: } else if (!(getTimeToLoad()
337: .equals(otherDeckPG.getTimeToLoad()))) {
338: return false;
339: }
340:
341: if (getTimeToUnload() == null) {
342: if (otherDeckPG.getTimeToUnload() != null) {
343: return false;
344: }
345: } else if (!(getTimeToUnload().equals(otherDeckPG
346: .getTimeToUnload()))) {
347: return false;
348: }
349:
350: if (getTimeToRefuel() == null) {
351: if (otherDeckPG.getTimeToRefuel() != null) {
352: return false;
353: }
354: } else if (!(getTimeToRefuel().equals(otherDeckPG
355: .getTimeToRefuel()))) {
356: return false;
357: }
358:
359: if (!(getMaximumContainers() == otherDeckPG
360: .getMaximumContainers())) {
361: return false;
362: }
363:
364: if (!(getIsPrepositioned() == otherDeckPG.getIsPrepositioned())) {
365: return false;
366: }
367:
368: if (getCargoRestrictions() == null) {
369: if (otherDeckPG.getCargoRestrictions() != null) {
370: return false;
371: }
372: } else if (!(getCargoRestrictions().equals(otherDeckPG
373: .getCargoRestrictions()))) {
374: return false;
375: }
376:
377: if (getPermittedCargoCategoryCodes() == null) {
378: if (otherDeckPG.getPermittedCargoCategoryCodes() != null) {
379: return false;
380: }
381: } else if (!(getPermittedCargoCategoryCodes()
382: .equals(otherDeckPG.getPermittedCargoCategoryCodes()))) {
383: return false;
384: }
385:
386: return true;
387: }
388:
389: public boolean hasDataQuality() {
390: return false;
391: }
392:
393: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
394: return null;
395: }
396:
397: // static inner extension class for real DataQuality Support
398: public final static class DQ extends DeckPGImpl implements
399: org.cougaar.planning.ldm.dq.NewHasDataQuality {
400: public DQ() {
401: super ();
402: }
403:
404: public DQ(DeckPG original) {
405: super (original);
406: }
407:
408: public Object clone() {
409: return new DQ(this );
410: }
411:
412: private transient org.cougaar.planning.ldm.dq.DataQuality _dq = null;
413:
414: public boolean hasDataQuality() {
415: return (_dq != null);
416: }
417:
418: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
419: return _dq;
420: }
421:
422: public void setDataQuality(
423: org.cougaar.planning.ldm.dq.DataQuality dq) {
424: _dq = dq;
425: }
426:
427: private void writeObject(ObjectOutputStream out)
428: throws IOException {
429: out.defaultWriteObject();
430: if (out instanceof org.cougaar.core.persist.PersistenceOutputStream)
431: out.writeObject(_dq);
432: }
433:
434: private void readObject(ObjectInputStream in)
435: throws ClassNotFoundException, IOException {
436: in.defaultReadObject();
437: if (in instanceof org.cougaar.core.persist.PersistenceInputStream)
438: _dq = (org.cougaar.planning.ldm.dq.DataQuality) in
439: .readObject();
440: }
441:
442: private final static PropertyDescriptor properties[] = new PropertyDescriptor[1];
443: static {
444: try {
445: properties[0] = new PropertyDescriptor("dataQuality",
446: DQ.class, "getDataQuality", null);
447: } catch (Exception e) {
448: e.printStackTrace();
449: }
450: }
451:
452: public PropertyDescriptor[] getPropertyDescriptors() {
453: PropertyDescriptor[] pds = super .properties;
454: PropertyDescriptor[] ps = new PropertyDescriptor[pds.length
455: + properties.length];
456: System.arraycopy(pds, 0, ps, 0, pds.length);
457: System.arraycopy(properties, 0, ps, pds.length,
458: properties.length);
459: return ps;
460: }
461: }
462:
463: private transient DeckPG _locked = null;
464:
465: public PropertyGroup lock(Object key) {
466: if (_locked == null)
467: _locked = new _Locked(key);
468: return _locked;
469: }
470:
471: public PropertyGroup lock() {
472: return lock(null);
473: }
474:
475: public NewPropertyGroup unlock(Object key) {
476: return this ;
477: }
478:
479: public Object clone() throws CloneNotSupportedException {
480: return new DeckPGImpl(DeckPGImpl.this );
481: }
482:
483: public PropertyGroup copy() {
484: try {
485: return (PropertyGroup) clone();
486: } catch (CloneNotSupportedException cnse) {
487: return null;
488: }
489: }
490:
491: public Class getPrimaryClass() {
492: return primaryClass;
493: }
494:
495: public String getAssetGetMethod() {
496: return assetGetter;
497: }
498:
499: public String getAssetSetMethod() {
500: return assetSetter;
501: }
502:
503: private final static PropertyDescriptor properties[] = new PropertyDescriptor[17];
504: static {
505: try {
506: properties[0] = new PropertyDescriptor("level",
507: DeckPG.class, "getLevel", null);
508: properties[1] = new PropertyDescriptor("ship_id",
509: DeckPG.class, "getShipId", null);
510: properties[2] = new PropertyDescriptor("maximum_length",
511: DeckPG.class, "getMaximumLength", null);
512: properties[3] = new PropertyDescriptor("maximum_width",
513: DeckPG.class, "getMaximumWidth", null);
514: properties[4] = new PropertyDescriptor("maximum_height",
515: DeckPG.class, "getMaximumHeight", null);
516: properties[5] = new PropertyDescriptor("maximum_volume",
517: DeckPG.class, "getMaximumVolume", null);
518: properties[6] = new PropertyDescriptor(
519: "maximum_footprint_area", DeckPG.class,
520: "getMaximumFootprintArea", null);
521: properties[7] = new PropertyDescriptor("maximum_weight",
522: DeckPG.class, "getMaximumWeight", null);
523: properties[8] = new PropertyDescriptor(
524: "maximum_passengers", DeckPG.class,
525: "getMaximumPassengers", null);
526: properties[9] = new PropertyDescriptor("refrigeration",
527: DeckPG.class, "getRefrigeration", null);
528: properties[10] = new PropertyDescriptor("time_to_load",
529: DeckPG.class, "getTimeToLoad", null);
530: properties[11] = new PropertyDescriptor("time_to_unload",
531: DeckPG.class, "getTimeToUnload", null);
532: properties[12] = new PropertyDescriptor("time_to_refuel",
533: DeckPG.class, "getTimeToRefuel", null);
534: properties[13] = new PropertyDescriptor(
535: "maximum_containers", DeckPG.class,
536: "getMaximumContainers", null);
537: properties[14] = new PropertyDescriptor("is_prepositioned",
538: DeckPG.class, "getIsPrepositioned", null);
539: properties[15] = new PropertyDescriptor(
540: "cargo_restrictions", DeckPG.class,
541: "getCargoRestrictions", null);
542: properties[16] = new PropertyDescriptor(
543: "permitted_cargo_category_codes", DeckPG.class,
544: "getPermittedCargoCategoryCodes", null);
545: } catch (Exception e) {
546: org.cougaar.util.log.Logging.getLogger(DeckPG.class).error(
547: "Caught exception", e);
548: }
549: }
550:
551: public PropertyDescriptor[] getPropertyDescriptors() {
552: return properties;
553: }
554:
555: private final class _Locked extends java.beans.SimpleBeanInfo
556: implements DeckPG, Cloneable, LockedPG {
557: private transient Object theKey = null;
558:
559: _Locked(Object key) {
560: if (this .theKey == null)
561: this .theKey = key;
562: }
563:
564: public _Locked() {
565: }
566:
567: public PropertyGroup lock() {
568: return this ;
569: }
570:
571: public PropertyGroup lock(Object o) {
572: return this ;
573: }
574:
575: public NewPropertyGroup unlock(Object key)
576: throws IllegalAccessException {
577: if (theKey.equals(key)) {
578: return DeckPGImpl.this ;
579: } else {
580: throw new IllegalAccessException(
581: "unlock: mismatched internal and provided keys!");
582: }
583: }
584:
585: public PropertyGroup copy() {
586: try {
587: return (PropertyGroup) clone();
588: } catch (CloneNotSupportedException cnse) {
589: return null;
590: }
591: }
592:
593: public Object clone() throws CloneNotSupportedException {
594: return new DeckPGImpl(DeckPGImpl.this );
595: }
596:
597: public boolean equals(Object object) {
598: return DeckPGImpl.this .equals(object);
599: }
600:
601: public int getLevel() {
602: return DeckPGImpl.this .getLevel();
603: }
604:
605: public String getShipId() {
606: return DeckPGImpl.this .getShipId();
607: }
608:
609: public Distance getMaximumLength() {
610: return DeckPGImpl.this .getMaximumLength();
611: }
612:
613: public Distance getMaximumWidth() {
614: return DeckPGImpl.this .getMaximumWidth();
615: }
616:
617: public Distance getMaximumHeight() {
618: return DeckPGImpl.this .getMaximumHeight();
619: }
620:
621: public Volume getMaximumVolume() {
622: return DeckPGImpl.this .getMaximumVolume();
623: }
624:
625: public Area getMaximumFootprintArea() {
626: return DeckPGImpl.this .getMaximumFootprintArea();
627: }
628:
629: public Mass getMaximumWeight() {
630: return DeckPGImpl.this .getMaximumWeight();
631: }
632:
633: public long getMaximumPassengers() {
634: return DeckPGImpl.this .getMaximumPassengers();
635: }
636:
637: public boolean getRefrigeration() {
638: return DeckPGImpl.this .getRefrigeration();
639: }
640:
641: public Duration getTimeToLoad() {
642: return DeckPGImpl.this .getTimeToLoad();
643: }
644:
645: public Duration getTimeToUnload() {
646: return DeckPGImpl.this .getTimeToUnload();
647: }
648:
649: public Duration getTimeToRefuel() {
650: return DeckPGImpl.this .getTimeToRefuel();
651: }
652:
653: public long getMaximumContainers() {
654: return DeckPGImpl.this .getMaximumContainers();
655: }
656:
657: public boolean getIsPrepositioned() {
658: return DeckPGImpl.this .getIsPrepositioned();
659: }
660:
661: public String getCargoRestrictions() {
662: return DeckPGImpl.this .getCargoRestrictions();
663: }
664:
665: public String getPermittedCargoCategoryCodes() {
666: return DeckPGImpl.this .getPermittedCargoCategoryCodes();
667: }
668:
669: public final boolean hasDataQuality() {
670: return DeckPGImpl.this .hasDataQuality();
671: }
672:
673: public final org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
674: return DeckPGImpl.this .getDataQuality();
675: }
676:
677: public Class getPrimaryClass() {
678: return primaryClass;
679: }
680:
681: public String getAssetGetMethod() {
682: return assetGetter;
683: }
684:
685: public String getAssetSetMethod() {
686: return assetSetter;
687: }
688:
689: public PropertyDescriptor[] getPropertyDescriptors() {
690: return properties;
691: }
692:
693: public Class getIntrospectionClass() {
694: return DeckPGImpl.class;
695: }
696:
697: }
698:
699: }
|