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 WaterVehiclePG.
029: * @see NewWaterVehiclePG
030: * @see WaterVehiclePGImpl
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 WaterVehiclePG extends PropertyGroup,
045: org.cougaar.planning.ldm.dq.HasDataQuality {
046: /** The draft when unloaded **/
047: Distance getMinimumDraft();
048:
049: /** The draft when fully loaded **/
050: Distance getMaximumDraft();
051:
052: /** The length of the SHIP **/
053: Distance getLength();
054:
055: /** The beam (width) of the SHIP **/
056: Distance getBeam();
057:
058: /** The type of berth required **/
059: String getBerthRequirements();
060:
061: /** Used for estimating repair requirements based on engine running time **/
062: Duration getMeanEngineTimeBetweenRepairs();
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 = "newWaterVehiclePG";
071: /** the (mutable) class type returned by factoryMethod **/
072: String mutableClass = "org.cougaar.glm.ldm.asset.NewWaterVehiclePG";
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.WaterVehiclePG.class;
077: String assetSetter = "setWaterVehiclePG";
078: String assetGetter = "getWaterVehiclePG";
079: /** The Null instance for indicating that the PG definitely has no value **/
080: WaterVehiclePG nullPG = new Null_WaterVehiclePG();
081:
082: /** Null_PG implementation for WaterVehiclePG **/
083: final class Null_WaterVehiclePG implements WaterVehiclePG, Null_PG {
084: public Distance getMinimumDraft() {
085: throw new UndefinedValueException();
086: }
087:
088: public Distance getMaximumDraft() {
089: throw new UndefinedValueException();
090: }
091:
092: public Distance getLength() {
093: throw new UndefinedValueException();
094: }
095:
096: public Distance getBeam() {
097: throw new UndefinedValueException();
098: }
099:
100: public String getBerthRequirements() {
101: throw new UndefinedValueException();
102: }
103:
104: public Duration getMeanEngineTimeBetweenRepairs() {
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 WaterVehiclePGImpl.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 WaterVehiclePG **/
166: final class Future implements WaterVehiclePG, Future_PG {
167: public Distance getMinimumDraft() {
168: waitForFinalize();
169: return _real.getMinimumDraft();
170: }
171:
172: public Distance getMaximumDraft() {
173: waitForFinalize();
174: return _real.getMaximumDraft();
175: }
176:
177: public Distance getLength() {
178: waitForFinalize();
179: return _real.getLength();
180: }
181:
182: public Distance getBeam() {
183: waitForFinalize();
184: return _real.getBeam();
185: }
186:
187: public String getBerthRequirements() {
188: waitForFinalize();
189: return _real.getBerthRequirements();
190: }
191:
192: public Duration getMeanEngineTimeBetweenRepairs() {
193: waitForFinalize();
194: return _real.getMeanEngineTimeBetweenRepairs();
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 WaterVehiclePGImpl.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 WaterVehiclePG _real = null;
258:
259: public synchronized void finalize(PropertyGroup real) {
260: if (real instanceof WaterVehiclePG) {
261: _real = (WaterVehiclePG) 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: }
|