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