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: /** Abstract Asset Skeleton implementation
029: * Implements default property getters, and additional property
030: * lists.
031: * Intended to be extended by org.cougaar.planning.ldm.asset.Asset
032: **/package org.cougaar.planning.ldm.asset;
033:
034: import org.cougaar.planning.ldm.measure.*;
035: import org.cougaar.planning.ldm.asset.*;
036: import org.cougaar.planning.ldm.plan.*;
037: import java.util.*;
038:
039: import java.io.Serializable;
040: import java.beans.PropertyDescriptor;
041: import java.beans.IndexedPropertyDescriptor;
042:
043: public abstract class AssetSkeleton extends
044: org.cougaar.planning.ldm.asset.AssetSkeletonBase {
045:
046: protected AssetSkeleton() {
047: }
048:
049: protected AssetSkeleton(AssetSkeleton prototype) {
050: super (prototype);
051: }
052:
053: /** Default PG accessors **/
054:
055: /** Search additional properties for a TypeIdentificationPG instance.
056: * @return instance of TypeIdentificationPG or null.
057: **/
058: public TypeIdentificationPG getTypeIdentificationPG() {
059: TypeIdentificationPG _tmp = (TypeIdentificationPG) resolvePG(TypeIdentificationPG.class);
060: return (_tmp == TypeIdentificationPG.nullPG) ? null : _tmp;
061: }
062:
063: /** Test for existence of a TypeIdentificationPG
064: **/
065: public boolean hasTypeIdentificationPG() {
066: return (getTypeIdentificationPG() != null);
067: }
068:
069: /** Set the TypeIdentificationPG property.
070: * The default implementation will create a new TypeIdentificationPG
071: * property and add it to the otherPropertyGroup list.
072: * Many subclasses override with local slots.
073: **/
074: public void setTypeIdentificationPG(
075: PropertyGroup aTypeIdentificationPG) {
076: if (aTypeIdentificationPG == null) {
077: removeOtherPropertyGroup(TypeIdentificationPG.class);
078: } else {
079: addOtherPropertyGroup(aTypeIdentificationPG);
080: }
081: }
082:
083: /** Search additional properties for a ClusterPG instance.
084: * @return instance of ClusterPG or null.
085: **/
086: public ClusterPG getClusterPG() {
087: ClusterPG _tmp = (ClusterPG) resolvePG(ClusterPG.class);
088: return (_tmp == ClusterPG.nullPG) ? null : _tmp;
089: }
090:
091: /** Test for existence of a ClusterPG
092: **/
093: public boolean hasClusterPG() {
094: return (getClusterPG() != null);
095: }
096:
097: /** Set the ClusterPG property.
098: * The default implementation will create a new ClusterPG
099: * property and add it to the otherPropertyGroup list.
100: * Many subclasses override with local slots.
101: **/
102: public void setClusterPG(PropertyGroup aClusterPG) {
103: if (aClusterPG == null) {
104: removeOtherPropertyGroup(ClusterPG.class);
105: } else {
106: addOtherPropertyGroup(aClusterPG);
107: }
108: }
109:
110: /** Search additional properties for a EntityPG instance.
111: * @return instance of EntityPG or null.
112: **/
113: public EntityPG getEntityPG() {
114: EntityPG _tmp = (EntityPG) resolvePG(EntityPG.class);
115: return (_tmp == EntityPG.nullPG) ? null : _tmp;
116: }
117:
118: /** Test for existence of a EntityPG
119: **/
120: public boolean hasEntityPG() {
121: return (getEntityPG() != null);
122: }
123:
124: /** Set the EntityPG property.
125: * The default implementation will create a new EntityPG
126: * property and add it to the otherPropertyGroup list.
127: * Many subclasses override with local slots.
128: **/
129: public void setEntityPG(PropertyGroup aEntityPG) {
130: if (aEntityPG == null) {
131: removeOtherPropertyGroup(EntityPG.class);
132: } else {
133: addOtherPropertyGroup(aEntityPG);
134: }
135: }
136:
137: /** Search additional properties for a RelationshipPG instance.
138: * @return instance of RelationshipPG or null.
139: **/
140: public RelationshipPG getRelationshipPG() {
141: RelationshipPG _tmp = (RelationshipPG) resolvePG(RelationshipPG.class);
142: return (_tmp == RelationshipPG.nullPG) ? null : _tmp;
143: }
144:
145: /** Test for existence of a RelationshipPG
146: **/
147: public boolean hasRelationshipPG() {
148: return (getRelationshipPG() != null);
149: }
150:
151: /** Set the RelationshipPG property.
152: * The default implementation will create a new RelationshipPG
153: * property and add it to the otherPropertyGroup list.
154: * Many subclasses override with local slots.
155: **/
156: public void setRelationshipPG(PropertyGroup aRelationshipPG) {
157: if (aRelationshipPG == null) {
158: removeOtherPropertyGroup(RelationshipPG.class);
159: } else {
160: addOtherPropertyGroup(aRelationshipPG);
161: }
162: }
163:
164: /** Search additional properties for a ItemIdentificationPG instance.
165: * @return instance of ItemIdentificationPG or null.
166: **/
167: public ItemIdentificationPG getItemIdentificationPG() {
168: ItemIdentificationPG _tmp = (ItemIdentificationPG) resolvePG(ItemIdentificationPG.class);
169: return (_tmp == ItemIdentificationPG.nullPG) ? null : _tmp;
170: }
171:
172: /** Test for existence of a ItemIdentificationPG
173: **/
174: public boolean hasItemIdentificationPG() {
175: return (getItemIdentificationPG() != null);
176: }
177:
178: /** Set the ItemIdentificationPG property.
179: * The default implementation will create a new ItemIdentificationPG
180: * property and add it to the otherPropertyGroup list.
181: * Many subclasses override with local slots.
182: **/
183: public void setItemIdentificationPG(
184: PropertyGroup aItemIdentificationPG) {
185: if (aItemIdentificationPG == null) {
186: removeOtherPropertyGroup(ItemIdentificationPG.class);
187: } else {
188: addOtherPropertyGroup(aItemIdentificationPG);
189: }
190: }
191:
192: /** Search additional properties for a LocationSchedulePG instance.
193: * @return instance of LocationSchedulePG or null.
194: **/
195: public LocationSchedulePG getLocationSchedulePG() {
196: LocationSchedulePG _tmp = (LocationSchedulePG) resolvePG(LocationSchedulePG.class);
197: return (_tmp == LocationSchedulePG.nullPG) ? null : _tmp;
198: }
199:
200: /** Test for existence of a LocationSchedulePG
201: **/
202: public boolean hasLocationSchedulePG() {
203: return (getLocationSchedulePG() != null);
204: }
205:
206: /** Set the LocationSchedulePG property.
207: * The default implementation will create a new LocationSchedulePG
208: * property and add it to the otherPropertyGroup list.
209: * Many subclasses override with local slots.
210: **/
211: public void setLocationSchedulePG(PropertyGroup aLocationSchedulePG) {
212: if (aLocationSchedulePG == null) {
213: removeOtherPropertyGroup(LocationSchedulePG.class);
214: } else {
215: addOtherPropertyGroup(aLocationSchedulePG);
216: }
217: }
218:
219: /** Search additional properties for a CommunityPG instance.
220: * @return instance of CommunityPG or null.
221: **/
222: public CommunityPG getCommunityPG(long time) {
223: CommunityPG _tmp = (CommunityPG) resolvePG(CommunityPG.class,
224: time);
225: return (_tmp == CommunityPG.nullPG) ? null : _tmp;
226: }
227:
228: public CommunityPG getCommunityPG() {
229: PropertyGroupSchedule pgSchedule = getCommunityPGSchedule();
230: if (pgSchedule != null) {
231: return (CommunityPG) pgSchedule.getDefault();
232: } else {
233: return null;
234: }
235: }
236:
237: /** Test for existence of a default CommunityPG
238: **/
239: public boolean hasCommunityPG() {
240: return (getCommunityPG() != null);
241: }
242:
243: /** Test for existence of a CommunityPG at a specific time
244: **/
245: public boolean hasCommunityPG(long time) {
246: return (getCommunityPG(time) != null);
247: }
248:
249: /** Set the CommunityPG property.
250: * The default implementation will create a new CommunityPG
251: * property and add it to the otherPropertyGroup list.
252: * Many subclasses override with local slots.
253: **/
254: public void setCommunityPG(PropertyGroup aCommunityPG) {
255: if (aCommunityPG == null) {
256: removeOtherPropertyGroup(CommunityPG.class);
257: } else {
258: addOtherPropertyGroup(aCommunityPG);
259: }
260: }
261:
262: public PropertyGroupSchedule getCommunityPGSchedule() {
263: return searchForPropertyGroupSchedule(CommunityPG.class);
264: }
265:
266: public void setCommunityPGSchedule(PropertyGroupSchedule schedule) {
267: removeOtherPropertyGroup(CommunityPG.class);
268: if (schedule != null) {
269: addOtherPropertyGroupSchedule(schedule);
270: }
271: }
272:
273: }
|