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