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 AirVehiclePG.
029: * @see NewAirVehiclePG
030: * @see AirVehiclePGImpl
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 AirVehiclePG extends PropertyGroup,
045: org.cougaar.planning.ldm.dq.HasDataQuality {
046: /** Minimum runway length required under standard temperature, pressure, etc. **/
047: Distance getMinimumRunwayLength();
048:
049: /** Can the aircraft be refueled in mid-air **/
050: boolean getMidAirRefuelable();
051:
052: /** Time required for quick (minimum maintenance) turnaround **/
053: Duration getQuickTurnaroundTime();
054:
055: /** Mean time required for typical failures **/
056: Duration getMeanTimeToRepair();
057:
058: /** Used for estimating repair requirements based on mission legs **/
059: long getMeanMissionLegsBetweenRepairs();
060:
061: /** Used for estimating repair requirements based on flight time **/
062: Duration getMeanFlightTimeBetweenRepairs();
063:
064: String getVehicleType();
065:
066: long getCrewRequirements();
067:
068: // introspection and construction
069: /** the method of factoryClass that creates this type **/
070: String factoryMethod = "newAirVehiclePG";
071: /** the (mutable) class type returned by factoryMethod **/
072: String mutableClass = "org.cougaar.glm.ldm.asset.NewAirVehiclePG";
073: /** the factory class **/
074: Class factoryClass = org.cougaar.glm.ldm.asset.PropertyGroupFactory.class;
075: /** the (immutable) class type returned by domain factory **/
076: Class primaryClass = org.cougaar.glm.ldm.asset.AirVehiclePG.class;
077: String assetSetter = "setAirVehiclePG";
078: String assetGetter = "getAirVehiclePG";
079: /** The Null instance for indicating that the PG definitely has no value **/
080: AirVehiclePG nullPG = new Null_AirVehiclePG();
081:
082: /** Null_PG implementation for AirVehiclePG **/
083: final class Null_AirVehiclePG implements AirVehiclePG, Null_PG {
084: public Distance getMinimumRunwayLength() {
085: throw new UndefinedValueException();
086: }
087:
088: public boolean getMidAirRefuelable() {
089: throw new UndefinedValueException();
090: }
091:
092: public Duration getQuickTurnaroundTime() {
093: throw new UndefinedValueException();
094: }
095:
096: public Duration getMeanTimeToRepair() {
097: throw new UndefinedValueException();
098: }
099:
100: public long getMeanMissionLegsBetweenRepairs() {
101: throw new UndefinedValueException();
102: }
103:
104: public Duration getMeanFlightTimeBetweenRepairs() {
105: throw new UndefinedValueException();
106: }
107:
108: public String getVehicleType() {
109: throw new UndefinedValueException();
110: }
111:
112: public long getCrewRequirements() {
113: throw new UndefinedValueException();
114: }
115:
116: public boolean equals(Object object) {
117: throw new UndefinedValueException();
118: }
119:
120: public Object clone() throws CloneNotSupportedException {
121: throw new CloneNotSupportedException();
122: }
123:
124: public NewPropertyGroup unlock(Object key) {
125: return null;
126: }
127:
128: public PropertyGroup lock(Object key) {
129: return null;
130: }
131:
132: public PropertyGroup lock() {
133: return null;
134: }
135:
136: public PropertyGroup copy() {
137: return null;
138: }
139:
140: public Class getPrimaryClass() {
141: return primaryClass;
142: }
143:
144: public String getAssetGetMethod() {
145: return assetGetter;
146: }
147:
148: public String getAssetSetMethod() {
149: return assetSetter;
150: }
151:
152: public Class getIntrospectionClass() {
153: return AirVehiclePGImpl.class;
154: }
155:
156: public boolean hasDataQuality() {
157: return false;
158: }
159:
160: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
161: return null;
162: }
163: }
164:
165: /** Future PG implementation for AirVehiclePG **/
166: final class Future implements AirVehiclePG, Future_PG {
167: public Distance getMinimumRunwayLength() {
168: waitForFinalize();
169: return _real.getMinimumRunwayLength();
170: }
171:
172: public boolean getMidAirRefuelable() {
173: waitForFinalize();
174: return _real.getMidAirRefuelable();
175: }
176:
177: public Duration getQuickTurnaroundTime() {
178: waitForFinalize();
179: return _real.getQuickTurnaroundTime();
180: }
181:
182: public Duration getMeanTimeToRepair() {
183: waitForFinalize();
184: return _real.getMeanTimeToRepair();
185: }
186:
187: public long getMeanMissionLegsBetweenRepairs() {
188: waitForFinalize();
189: return _real.getMeanMissionLegsBetweenRepairs();
190: }
191:
192: public Duration getMeanFlightTimeBetweenRepairs() {
193: waitForFinalize();
194: return _real.getMeanFlightTimeBetweenRepairs();
195: }
196:
197: public String getVehicleType() {
198: waitForFinalize();
199: return _real.getVehicleType();
200: }
201:
202: public long getCrewRequirements() {
203: waitForFinalize();
204: return _real.getCrewRequirements();
205: }
206:
207: public boolean equals(Object object) {
208: waitForFinalize();
209: return _real.equals(object);
210: }
211:
212: public Object clone() throws CloneNotSupportedException {
213: throw new CloneNotSupportedException();
214: }
215:
216: public NewPropertyGroup unlock(Object key) {
217: return null;
218: }
219:
220: public PropertyGroup lock(Object key) {
221: return null;
222: }
223:
224: public PropertyGroup lock() {
225: return null;
226: }
227:
228: public PropertyGroup copy() {
229: return null;
230: }
231:
232: public Class getPrimaryClass() {
233: return primaryClass;
234: }
235:
236: public String getAssetGetMethod() {
237: return assetGetter;
238: }
239:
240: public String getAssetSetMethod() {
241: return assetSetter;
242: }
243:
244: public Class getIntrospectionClass() {
245: return AirVehiclePGImpl.class;
246: }
247:
248: public synchronized boolean hasDataQuality() {
249: return (_real != null) && _real.hasDataQuality();
250: }
251:
252: public synchronized org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
253: return (_real == null) ? null : (_real.getDataQuality());
254: }
255:
256: // Finalization support
257: private AirVehiclePG _real = null;
258:
259: public synchronized void finalize(PropertyGroup real) {
260: if (real instanceof AirVehiclePG) {
261: _real = (AirVehiclePG) real;
262: notifyAll();
263: } else {
264: throw new IllegalArgumentException(
265: "Finalization with wrong class: " + real);
266: }
267: }
268:
269: private synchronized void waitForFinalize() {
270: while (_real == null) {
271: try {
272: wait();
273: } catch (InterruptedException _ie) {
274: // We should really let waitForFinalize throw InterruptedException
275: Thread.interrupted();
276: }
277: }
278: }
279: }
280: }
|