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 ContentsPG.
029: * @see NewContentsPG
030: * @see ContentsPGImpl
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 ContentsPG extends PropertyGroup,
045: org.cougaar.planning.ldm.dq.HasDataQuality {
046: Collection getTypeIdentifications();
047:
048: /** test to see if an element is a member of the type_identifications Collection **/
049: boolean inTypeIdentifications(String element);
050:
051: /** array getter for beans **/
052: String[] getTypeIdentificationsAsArray();
053:
054: /** indexed getter for beans **/
055: String getIndexedTypeIdentifications(int index);
056:
057: Collection getNomenclatures();
058:
059: /** test to see if an element is a member of the nomenclatures Collection **/
060: boolean inNomenclatures(String element);
061:
062: /** array getter for beans **/
063: String[] getNomenclaturesAsArray();
064:
065: /** indexed getter for beans **/
066: String getIndexedNomenclatures(int index);
067:
068: Collection getWeights();
069:
070: /** test to see if an element is a member of the weights Collection **/
071: boolean inWeights(Mass element);
072:
073: /** array getter for beans **/
074: Mass[] getWeightsAsArray();
075:
076: /** indexed getter for beans **/
077: Mass getIndexedWeights(int index);
078:
079: Collection getReceivers();
080:
081: /** test to see if an element is a member of the receivers Collection **/
082: boolean inReceivers(String element);
083:
084: /** array getter for beans **/
085: String[] getReceiversAsArray();
086:
087: /** indexed getter for beans **/
088: String getIndexedReceivers(int index);
089:
090: // introspection and construction
091: /** the method of factoryClass that creates this type **/
092: String factoryMethod = "newContentsPG";
093: /** the (mutable) class type returned by factoryMethod **/
094: String mutableClass = "org.cougaar.glm.ldm.asset.NewContentsPG";
095: /** the factory class **/
096: Class factoryClass = org.cougaar.glm.ldm.asset.PropertyGroupFactory.class;
097: /** the (immutable) class type returned by domain factory **/
098: Class primaryClass = org.cougaar.glm.ldm.asset.ContentsPG.class;
099: String assetSetter = "setContentsPG";
100: String assetGetter = "getContentsPG";
101: /** The Null instance for indicating that the PG definitely has no value **/
102: ContentsPG nullPG = new Null_ContentsPG();
103:
104: /** Null_PG implementation for ContentsPG **/
105: final class Null_ContentsPG implements ContentsPG, Null_PG {
106: public Collection getTypeIdentifications() {
107: throw new UndefinedValueException();
108: }
109:
110: public boolean inTypeIdentifications(String element) {
111: return false;
112: }
113:
114: public String[] getTypeIdentificationsAsArray() {
115: return null;
116: }
117:
118: public String getIndexedTypeIdentifications(int index) {
119: throw new UndefinedValueException();
120: }
121:
122: public Collection getNomenclatures() {
123: throw new UndefinedValueException();
124: }
125:
126: public boolean inNomenclatures(String element) {
127: return false;
128: }
129:
130: public String[] getNomenclaturesAsArray() {
131: return null;
132: }
133:
134: public String getIndexedNomenclatures(int index) {
135: throw new UndefinedValueException();
136: }
137:
138: public Collection getWeights() {
139: throw new UndefinedValueException();
140: }
141:
142: public boolean inWeights(Mass element) {
143: return false;
144: }
145:
146: public Mass[] getWeightsAsArray() {
147: return null;
148: }
149:
150: public Mass getIndexedWeights(int index) {
151: throw new UndefinedValueException();
152: }
153:
154: public Collection getReceivers() {
155: throw new UndefinedValueException();
156: }
157:
158: public boolean inReceivers(String element) {
159: return false;
160: }
161:
162: public String[] getReceiversAsArray() {
163: return null;
164: }
165:
166: public String getIndexedReceivers(int index) {
167: throw new UndefinedValueException();
168: }
169:
170: public boolean equals(Object object) {
171: throw new UndefinedValueException();
172: }
173:
174: public Object clone() throws CloneNotSupportedException {
175: throw new CloneNotSupportedException();
176: }
177:
178: public NewPropertyGroup unlock(Object key) {
179: return null;
180: }
181:
182: public PropertyGroup lock(Object key) {
183: return null;
184: }
185:
186: public PropertyGroup lock() {
187: return null;
188: }
189:
190: public PropertyGroup copy() {
191: return null;
192: }
193:
194: public Class getPrimaryClass() {
195: return primaryClass;
196: }
197:
198: public String getAssetGetMethod() {
199: return assetGetter;
200: }
201:
202: public String getAssetSetMethod() {
203: return assetSetter;
204: }
205:
206: public Class getIntrospectionClass() {
207: return ContentsPGImpl.class;
208: }
209:
210: public boolean hasDataQuality() {
211: return false;
212: }
213:
214: public org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
215: return null;
216: }
217: }
218:
219: /** Future PG implementation for ContentsPG **/
220: final class Future implements ContentsPG, Future_PG {
221: public Collection getTypeIdentifications() {
222: waitForFinalize();
223: return _real.getTypeIdentifications();
224: }
225:
226: public boolean inTypeIdentifications(String element) {
227: waitForFinalize();
228: return _real.inTypeIdentifications(element);
229: }
230:
231: public String[] getTypeIdentificationsAsArray() {
232: waitForFinalize();
233: return _real.getTypeIdentificationsAsArray();
234: }
235:
236: public String getIndexedTypeIdentifications(int index) {
237: waitForFinalize();
238: return _real.getIndexedTypeIdentifications(index);
239: }
240:
241: public Collection getNomenclatures() {
242: waitForFinalize();
243: return _real.getNomenclatures();
244: }
245:
246: public boolean inNomenclatures(String element) {
247: waitForFinalize();
248: return _real.inNomenclatures(element);
249: }
250:
251: public String[] getNomenclaturesAsArray() {
252: waitForFinalize();
253: return _real.getNomenclaturesAsArray();
254: }
255:
256: public String getIndexedNomenclatures(int index) {
257: waitForFinalize();
258: return _real.getIndexedNomenclatures(index);
259: }
260:
261: public Collection getWeights() {
262: waitForFinalize();
263: return _real.getWeights();
264: }
265:
266: public boolean inWeights(Mass element) {
267: waitForFinalize();
268: return _real.inWeights(element);
269: }
270:
271: public Mass[] getWeightsAsArray() {
272: waitForFinalize();
273: return _real.getWeightsAsArray();
274: }
275:
276: public Mass getIndexedWeights(int index) {
277: waitForFinalize();
278: return _real.getIndexedWeights(index);
279: }
280:
281: public Collection getReceivers() {
282: waitForFinalize();
283: return _real.getReceivers();
284: }
285:
286: public boolean inReceivers(String element) {
287: waitForFinalize();
288: return _real.inReceivers(element);
289: }
290:
291: public String[] getReceiversAsArray() {
292: waitForFinalize();
293: return _real.getReceiversAsArray();
294: }
295:
296: public String getIndexedReceivers(int index) {
297: waitForFinalize();
298: return _real.getIndexedReceivers(index);
299: }
300:
301: public boolean equals(Object object) {
302: waitForFinalize();
303: return _real.equals(object);
304: }
305:
306: public Object clone() throws CloneNotSupportedException {
307: throw new CloneNotSupportedException();
308: }
309:
310: public NewPropertyGroup unlock(Object key) {
311: return null;
312: }
313:
314: public PropertyGroup lock(Object key) {
315: return null;
316: }
317:
318: public PropertyGroup lock() {
319: return null;
320: }
321:
322: public PropertyGroup copy() {
323: return null;
324: }
325:
326: public Class getPrimaryClass() {
327: return primaryClass;
328: }
329:
330: public String getAssetGetMethod() {
331: return assetGetter;
332: }
333:
334: public String getAssetSetMethod() {
335: return assetSetter;
336: }
337:
338: public Class getIntrospectionClass() {
339: return ContentsPGImpl.class;
340: }
341:
342: public synchronized boolean hasDataQuality() {
343: return (_real != null) && _real.hasDataQuality();
344: }
345:
346: public synchronized org.cougaar.planning.ldm.dq.DataQuality getDataQuality() {
347: return (_real == null) ? null : (_real.getDataQuality());
348: }
349:
350: // Finalization support
351: private ContentsPG _real = null;
352:
353: public synchronized void finalize(PropertyGroup real) {
354: if (real instanceof ContentsPG) {
355: _real = (ContentsPG) real;
356: notifyAll();
357: } else {
358: throw new IllegalArgumentException(
359: "Finalization with wrong class: " + real);
360: }
361: }
362:
363: private synchronized void waitForFinalize() {
364: while (_real == null) {
365: try {
366: wait();
367: } catch (InterruptedException _ie) {
368: // We should really let waitForFinalize throw InterruptedException
369: Thread.interrupted();
370: }
371: }
372: }
373: }
374: }
|