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