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