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