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:20:42 EDT 2007 from /u01/builds/cougaar/B12_4/B12_4/070927151721/src/planning/src/org/cougaar/planning/ldm/asset/properties.def - DO NOT HAND EDIT */
028: /** Primary client interface for RelationshipPG.
029: * @see NewRelationshipPG
030: * @see RelationshipPGImpl
031: **/package org.cougaar.planning.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.planning.ldm.plan.HasRelationships;
039: import org.cougaar.planning.ldm.plan.RelationshipSchedule;
040:
041: public interface RelationshipPG extends PropertyGroup, LocalPG {
042: /** a schedule of relationships for this asset. **/
043: org.cougaar.planning.ldm.plan.RelationshipSchedule getRelationshipSchedule();
044:
045: boolean getLocal();
046:
047: PGDelegate copy(PropertyGroup pg);
048:
049: void readObject(java.io.ObjectInputStream in);
050:
051: void writeObject(java.io.ObjectOutputStream out);
052:
053: void init(
054: NewRelationshipPG pg,
055: org.cougaar.planning.ldm.plan.HasRelationships hasRelationships);
056:
057: boolean isLocal();
058:
059: boolean isSelf();
060:
061: // introspection and construction
062: /** the method of factoryClass that creates this type **/
063: String factoryMethod = "newRelationshipPG";
064: /** the (mutable) class type returned by factoryMethod **/
065: String mutableClass = "org.cougaar.planning.ldm.asset.NewRelationshipPG";
066: /** the factory class **/
067: Class factoryClass = org.cougaar.planning.ldm.asset.PropertyGroupFactory.class;
068: /** the (immutable) class type returned by domain factory **/
069: Class primaryClass = org.cougaar.planning.ldm.asset.RelationshipPG.class;
070: String assetSetter = "setRelationshipPG";
071: String assetGetter = "getRelationshipPG";
072: /** The Null instance for indicating that the PG definitely has no value **/
073: RelationshipPG nullPG = new Null_RelationshipPG();
074:
075: /** Null_PG implementation for RelationshipPG **/
076: final class Null_RelationshipPG implements RelationshipPG, Null_PG {
077: public org.cougaar.planning.ldm.plan.RelationshipSchedule getRelationshipSchedule() {
078: throw new UndefinedValueException();
079: }
080:
081: public boolean getLocal() {
082: throw new UndefinedValueException();
083: }
084:
085: public RelationshipBG getRelationshipBG() {
086: throw new UndefinedValueException();
087: }
088:
089: public void setRelationshipBG(RelationshipBG _relationshipBG) {
090: throw new UndefinedValueException();
091: }
092:
093: public PGDelegate copy(PropertyGroup pg) {
094: throw new UndefinedValueException();
095: }
096:
097: public void readObject(java.io.ObjectInputStream in) {
098: throw new UndefinedValueException();
099: }
100:
101: public void writeObject(java.io.ObjectOutputStream out) {
102: throw new UndefinedValueException();
103: }
104:
105: public void init(
106: NewRelationshipPG pg,
107: org.cougaar.planning.ldm.plan.HasRelationships hasRelationships) {
108: throw new UndefinedValueException();
109: }
110:
111: public boolean isLocal() {
112: throw new UndefinedValueException();
113: }
114:
115: public boolean isSelf() {
116: throw new UndefinedValueException();
117: }
118:
119: public boolean equals(Object object) {
120: throw new UndefinedValueException();
121: }
122:
123: public Object clone() throws CloneNotSupportedException {
124: throw new CloneNotSupportedException();
125: }
126:
127: public NewPropertyGroup unlock(Object key) {
128: return null;
129: }
130:
131: public PropertyGroup lock(Object key) {
132: return null;
133: }
134:
135: public PropertyGroup lock() {
136: return null;
137: }
138:
139: public PropertyGroup copy() {
140: return null;
141: }
142:
143: public Class getPrimaryClass() {
144: return primaryClass;
145: }
146:
147: public String getAssetGetMethod() {
148: return assetGetter;
149: }
150:
151: public String getAssetSetMethod() {
152: return assetSetter;
153: }
154:
155: public Class getIntrospectionClass() {
156: return RelationshipPGImpl.class;
157: }
158:
159: public boolean hasDataQuality() {
160: return false;
161: }
162: }
163:
164: /** Future PG implementation for RelationshipPG **/
165: final class Future implements RelationshipPG, Future_PG {
166: public org.cougaar.planning.ldm.plan.RelationshipSchedule getRelationshipSchedule() {
167: waitForFinalize();
168: return _real.getRelationshipSchedule();
169: }
170:
171: public boolean getLocal() {
172: waitForFinalize();
173: return _real.getLocal();
174: }
175:
176: public boolean equals(Object object) {
177: waitForFinalize();
178: return _real.equals(object);
179: }
180:
181: public PGDelegate copy(PropertyGroup pg) {
182: waitForFinalize();
183: return _real.copy(pg);
184: }
185:
186: public void readObject(java.io.ObjectInputStream in) {
187: waitForFinalize();
188: _real.readObject(in);
189: }
190:
191: public void writeObject(java.io.ObjectOutputStream out) {
192: waitForFinalize();
193: _real.writeObject(out);
194: }
195:
196: public void init(
197: NewRelationshipPG pg,
198: org.cougaar.planning.ldm.plan.HasRelationships hasRelationships) {
199: waitForFinalize();
200: _real.init(pg, hasRelationships);
201: }
202:
203: public boolean isLocal() {
204: waitForFinalize();
205: return _real.isLocal();
206: }
207:
208: public boolean isSelf() {
209: waitForFinalize();
210: return _real.isSelf();
211: }
212:
213: public Object clone() throws CloneNotSupportedException {
214: throw new CloneNotSupportedException();
215: }
216:
217: public NewPropertyGroup unlock(Object key) {
218: return null;
219: }
220:
221: public PropertyGroup lock(Object key) {
222: return null;
223: }
224:
225: public PropertyGroup lock() {
226: return null;
227: }
228:
229: public PropertyGroup copy() {
230: return null;
231: }
232:
233: public Class getPrimaryClass() {
234: return primaryClass;
235: }
236:
237: public String getAssetGetMethod() {
238: return assetGetter;
239: }
240:
241: public String getAssetSetMethod() {
242: return assetSetter;
243: }
244:
245: public Class getIntrospectionClass() {
246: return RelationshipPGImpl.class;
247: }
248:
249: public synchronized boolean hasDataQuality() {
250: return (_real != null) && _real.hasDataQuality();
251: }
252:
253: // Finalization support
254: private RelationshipPG _real = null;
255:
256: public synchronized void finalize(PropertyGroup real) {
257: if (real instanceof RelationshipPG) {
258: _real = (RelationshipPG) real;
259: notifyAll();
260: } else {
261: throw new IllegalArgumentException(
262: "Finalization with wrong class: " + real);
263: }
264: }
265:
266: private synchronized void waitForFinalize() {
267: while (_real == null) {
268: try {
269: wait();
270: } catch (InterruptedException _ie) {
271: // We should really let waitForFinalize throw InterruptedException
272: Thread.interrupted();
273: }
274: }
275: }
276: }
277: }
|