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 DeckPG.
029: * @see NewDeckPG
030: * @see DeckPGImpl
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 DeckPG extends PropertyGroup,
045: org.cougaar.planning.ldm.dq.HasDataQuality {
046: int getLevel();
047:
048: String getShipId();
049:
050: Distance getMaximumLength();
051:
052: Distance getMaximumWidth();
053:
054: Distance getMaximumHeight();
055:
056: Volume getMaximumVolume();
057:
058: Area getMaximumFootprintArea();
059:
060: Mass getMaximumWeight();
061:
062: long getMaximumPassengers();
063:
064: boolean getRefrigeration();
065:
066: Duration getTimeToLoad();
067:
068: Duration getTimeToUnload();
069:
070: Duration getTimeToRefuel();
071:
072: long getMaximumContainers();
073:
074: boolean getIsPrepositioned();
075:
076: String getCargoRestrictions();
077:
078: String getPermittedCargoCategoryCodes();
079:
080: // introspection and construction
081: /** the method of factoryClass that creates this type **/
082: String factoryMethod = "newDeckPG";
083: /** the (mutable) class type returned by factoryMethod **/
084: String mutableClass = "org.cougaar.glm.ldm.asset.NewDeckPG";
085: /** the factory class **/
086: Class factoryClass = org.cougaar.glm.ldm.asset.PropertyGroupFactory.class;
087: /** the (immutable) class type returned by domain factory **/
088: Class primaryClass = org.cougaar.glm.ldm.asset.DeckPG.class;
089: String assetSetter = "setDeckPG";
090: String assetGetter = "getDeckPG";
091: /** The Null instance for indicating that the PG definitely has no value **/
092: DeckPG nullPG = new Null_DeckPG();
093:
094: /** Null_PG implementation for DeckPG **/
095: final class Null_DeckPG implements DeckPG, Null_PG {
096: public int getLevel() {
097: throw new UndefinedValueException();
098: }
099:
100: public String getShipId() {
101: throw new UndefinedValueException();
102: }
103:
104: public Distance getMaximumLength() {
105: throw new UndefinedValueException();
106: }
107:
108: public Distance getMaximumWidth() {
109: throw new UndefinedValueException();
110: }
111:
112: public Distance getMaximumHeight() {
113: throw new UndefinedValueException();
114: }
115:
116: public Volume getMaximumVolume() {
117: throw new UndefinedValueException();
118: }
119:
120: public Area getMaximumFootprintArea() {
121: throw new UndefinedValueException();
122: }
123:
124: public Mass getMaximumWeight() {
125: throw new UndefinedValueException();
126: }
127:
128: public long getMaximumPassengers() {
129: throw new UndefinedValueException();
130: }
131:
132: public boolean getRefrigeration() {
133: throw new UndefinedValueException();
134: }
135:
136: public Duration getTimeToLoad() {
137: throw new UndefinedValueException();
138: }
139:
140: public Duration getTimeToUnload() {
141: throw new UndefinedValueException();
142: }
143:
144: public Duration getTimeToRefuel() {
145: throw new UndefinedValueException();
146: }
147:
148: public long getMaximumContainers() {
149: throw new UndefinedValueException();
150: }
151:
152: public boolean getIsPrepositioned() {
153: throw new UndefinedValueException();
154: }
155:
156: public String getCargoRestrictions() {
157: throw new UndefinedValueException();
158: }
159:
160: public String getPermittedCargoCategoryCodes() {
161: throw new UndefinedValueException();
162: }
163:
164: public boolean equals(Object object) {
165: throw new UndefinedValueException();
166: }
167:
168: public Object clone() throws CloneNotSupportedException {
169: throw new CloneNotSupportedException();
170: }
171:
172: public NewPropertyGroup unlock(Object key) {
173: return null;
174: }
175:
176: public PropertyGroup lock(Object key) {
177: return null;
178: }
179:
180: public PropertyGroup lock() {
181: return null;
182: }
183:
184: public PropertyGroup copy() {
185: return null;
186: }
187:
188: public Class getPrimaryClass() {
189: return primaryClass;
190: }
191:
192: public String getAssetGetMethod() {
193: return assetGetter;
194: }
195:
196: public String getAssetSetMethod() {
197: return assetSetter;
198: }
199:
200: public Class getIntrospectionClass() {
201: return DeckPGImpl.class;
202: }
203:
204: public boolean hasDataQuality() {
205: return false;
206: }
207:
208: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
209: return null;
210: }
211: }
212:
213: /** Future PG implementation for DeckPG **/
214: final class Future implements DeckPG, Future_PG {
215: public int getLevel() {
216: waitForFinalize();
217: return _real.getLevel();
218: }
219:
220: public String getShipId() {
221: waitForFinalize();
222: return _real.getShipId();
223: }
224:
225: public Distance getMaximumLength() {
226: waitForFinalize();
227: return _real.getMaximumLength();
228: }
229:
230: public Distance getMaximumWidth() {
231: waitForFinalize();
232: return _real.getMaximumWidth();
233: }
234:
235: public Distance getMaximumHeight() {
236: waitForFinalize();
237: return _real.getMaximumHeight();
238: }
239:
240: public Volume getMaximumVolume() {
241: waitForFinalize();
242: return _real.getMaximumVolume();
243: }
244:
245: public Area getMaximumFootprintArea() {
246: waitForFinalize();
247: return _real.getMaximumFootprintArea();
248: }
249:
250: public Mass getMaximumWeight() {
251: waitForFinalize();
252: return _real.getMaximumWeight();
253: }
254:
255: public long getMaximumPassengers() {
256: waitForFinalize();
257: return _real.getMaximumPassengers();
258: }
259:
260: public boolean getRefrigeration() {
261: waitForFinalize();
262: return _real.getRefrigeration();
263: }
264:
265: public Duration getTimeToLoad() {
266: waitForFinalize();
267: return _real.getTimeToLoad();
268: }
269:
270: public Duration getTimeToUnload() {
271: waitForFinalize();
272: return _real.getTimeToUnload();
273: }
274:
275: public Duration getTimeToRefuel() {
276: waitForFinalize();
277: return _real.getTimeToRefuel();
278: }
279:
280: public long getMaximumContainers() {
281: waitForFinalize();
282: return _real.getMaximumContainers();
283: }
284:
285: public boolean getIsPrepositioned() {
286: waitForFinalize();
287: return _real.getIsPrepositioned();
288: }
289:
290: public String getCargoRestrictions() {
291: waitForFinalize();
292: return _real.getCargoRestrictions();
293: }
294:
295: public String getPermittedCargoCategoryCodes() {
296: waitForFinalize();
297: return _real.getPermittedCargoCategoryCodes();
298: }
299:
300: public boolean equals(Object object) {
301: waitForFinalize();
302: return _real.equals(object);
303: }
304:
305: public Object clone() throws CloneNotSupportedException {
306: throw new CloneNotSupportedException();
307: }
308:
309: public NewPropertyGroup unlock(Object key) {
310: return null;
311: }
312:
313: public PropertyGroup lock(Object key) {
314: return null;
315: }
316:
317: public PropertyGroup lock() {
318: return null;
319: }
320:
321: public PropertyGroup copy() {
322: return null;
323: }
324:
325: public Class getPrimaryClass() {
326: return primaryClass;
327: }
328:
329: public String getAssetGetMethod() {
330: return assetGetter;
331: }
332:
333: public String getAssetSetMethod() {
334: return assetSetter;
335: }
336:
337: public Class getIntrospectionClass() {
338: return DeckPGImpl.class;
339: }
340:
341: public synchronized boolean hasDataQuality() {
342: return (_real != null) && _real.hasDataQuality();
343: }
344:
345: public synchronized org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
346: return (_real == null) ? null : (_real.getDataQuality());
347: }
348:
349: // Finalization support
350: private DeckPG _real = null;
351:
352: public synchronized void finalize(PropertyGroup real) {
353: if (real instanceof DeckPG) {
354: _real = (DeckPG) real;
355: notifyAll();
356: } else {
357: throw new IllegalArgumentException(
358: "Finalization with wrong class: " + real);
359: }
360: }
361:
362: private synchronized void waitForFinalize() {
363: while (_real == null) {
364: try {
365: wait();
366: } catch (InterruptedException _ie) {
367: // We should really let waitForFinalize throw InterruptedException
368: Thread.interrupted();
369: }
370: }
371: }
372: }
373: }
|