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