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: /** Primary client interface for WaterSelfPropulsionPG.
029: * @see NewWaterSelfPropulsionPG
030: * @see WaterSelfPropulsionPGImpl
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: public interface WaterSelfPropulsionPG extends PropertyGroup,
045: org.cougaar.planning.ldm.dq.HasDataQuality {
046: /** Average fuel consumption rate when engine is running **/
047: FlowRate getFuelConsumptionRate();
048:
049: String getEngineType();
050:
051: String getFuelType();
052:
053: Speed getMaximumSpeed();
054:
055: Speed getCruiseSpeed();
056:
057: Distance getFullPayloadRange();
058:
059: Distance getEmptyPayloadRange();
060:
061: // introspection and construction
062: /** the method of factoryClass that creates this type **/
063: String factoryMethod = "newWaterSelfPropulsionPG";
064: /** the (mutable) class type returned by factoryMethod **/
065: String mutableClass = "org.cougaar.glm.ldm.asset.NewWaterSelfPropulsionPG";
066: /** the factory class **/
067: Class factoryClass = org.cougaar.glm.ldm.asset.PropertyGroupFactory.class;
068: /** the (immutable) class type returned by domain factory **/
069: Class primaryClass = org.cougaar.glm.ldm.asset.WaterSelfPropulsionPG.class;
070: String assetSetter = "setWaterSelfPropulsionPG";
071: String assetGetter = "getWaterSelfPropulsionPG";
072: /** The Null instance for indicating that the PG definitely has no value **/
073: WaterSelfPropulsionPG nullPG = new Null_WaterSelfPropulsionPG();
074:
075: /** Null_PG implementation for WaterSelfPropulsionPG **/
076: final class Null_WaterSelfPropulsionPG implements
077: WaterSelfPropulsionPG, Null_PG {
078: public FlowRate getFuelConsumptionRate() {
079: throw new UndefinedValueException();
080: }
081:
082: public String getEngineType() {
083: throw new UndefinedValueException();
084: }
085:
086: public String getFuelType() {
087: throw new UndefinedValueException();
088: }
089:
090: public Speed getMaximumSpeed() {
091: throw new UndefinedValueException();
092: }
093:
094: public Speed getCruiseSpeed() {
095: throw new UndefinedValueException();
096: }
097:
098: public Distance getFullPayloadRange() {
099: throw new UndefinedValueException();
100: }
101:
102: public Distance getEmptyPayloadRange() {
103: throw new UndefinedValueException();
104: }
105:
106: public boolean equals(Object object) {
107: throw new UndefinedValueException();
108: }
109:
110: public Object clone() throws CloneNotSupportedException {
111: throw new CloneNotSupportedException();
112: }
113:
114: public NewPropertyGroup unlock(Object key) {
115: return null;
116: }
117:
118: public PropertyGroup lock(Object key) {
119: return null;
120: }
121:
122: public PropertyGroup lock() {
123: return null;
124: }
125:
126: public PropertyGroup copy() {
127: return null;
128: }
129:
130: public Class getPrimaryClass() {
131: return primaryClass;
132: }
133:
134: public String getAssetGetMethod() {
135: return assetGetter;
136: }
137:
138: public String getAssetSetMethod() {
139: return assetSetter;
140: }
141:
142: public Class getIntrospectionClass() {
143: return WaterSelfPropulsionPGImpl.class;
144: }
145:
146: public boolean hasDataQuality() {
147: return false;
148: }
149:
150: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
151: return null;
152: }
153: }
154:
155: /** Future PG implementation for WaterSelfPropulsionPG **/
156: final class Future implements WaterSelfPropulsionPG, Future_PG {
157: public FlowRate getFuelConsumptionRate() {
158: waitForFinalize();
159: return _real.getFuelConsumptionRate();
160: }
161:
162: public String getEngineType() {
163: waitForFinalize();
164: return _real.getEngineType();
165: }
166:
167: public String getFuelType() {
168: waitForFinalize();
169: return _real.getFuelType();
170: }
171:
172: public Speed getMaximumSpeed() {
173: waitForFinalize();
174: return _real.getMaximumSpeed();
175: }
176:
177: public Speed getCruiseSpeed() {
178: waitForFinalize();
179: return _real.getCruiseSpeed();
180: }
181:
182: public Distance getFullPayloadRange() {
183: waitForFinalize();
184: return _real.getFullPayloadRange();
185: }
186:
187: public Distance getEmptyPayloadRange() {
188: waitForFinalize();
189: return _real.getEmptyPayloadRange();
190: }
191:
192: public boolean equals(Object object) {
193: waitForFinalize();
194: return _real.equals(object);
195: }
196:
197: public Object clone() throws CloneNotSupportedException {
198: throw new CloneNotSupportedException();
199: }
200:
201: public NewPropertyGroup unlock(Object key) {
202: return null;
203: }
204:
205: public PropertyGroup lock(Object key) {
206: return null;
207: }
208:
209: public PropertyGroup lock() {
210: return null;
211: }
212:
213: public PropertyGroup copy() {
214: return null;
215: }
216:
217: public Class getPrimaryClass() {
218: return primaryClass;
219: }
220:
221: public String getAssetGetMethod() {
222: return assetGetter;
223: }
224:
225: public String getAssetSetMethod() {
226: return assetSetter;
227: }
228:
229: public Class getIntrospectionClass() {
230: return WaterSelfPropulsionPGImpl.class;
231: }
232:
233: public synchronized boolean hasDataQuality() {
234: return (_real != null) && _real.hasDataQuality();
235: }
236:
237: public synchronized org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
238: return (_real == null) ? null : (_real.getDataQuality());
239: }
240:
241: // Finalization support
242: private WaterSelfPropulsionPG _real = null;
243:
244: public synchronized void finalize(PropertyGroup real) {
245: if (real instanceof WaterSelfPropulsionPG) {
246: _real = (WaterSelfPropulsionPG) real;
247: notifyAll();
248: } else {
249: throw new IllegalArgumentException(
250: "Finalization with wrong class: " + real);
251: }
252: }
253:
254: private synchronized void waitForFinalize() {
255: while (_real == null) {
256: try {
257: wait();
258: } catch (InterruptedException _ie) {
259: // We should really let waitForFinalize throw InterruptedException
260: Thread.interrupted();
261: }
262: }
263: }
264: }
265: }
|