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