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