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