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:26:44 EDT 2007 from /u01/builds/cougaar/B12_4/B12_4/070927151721/src/pizza/src/org/cougaar/pizza/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.pizza.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.Asset {
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 VeggiePG instance.
056: * @return instance of VeggiePG or null.
057: **/
058: public VeggiePG getVeggiePG() {
059: VeggiePG _tmp = (VeggiePG) resolvePG(VeggiePG.class);
060: return (_tmp == VeggiePG.nullPG) ? null : _tmp;
061: }
062:
063: /** Test for existence of a VeggiePG
064: **/
065: public boolean hasVeggiePG() {
066: return (getVeggiePG() != null);
067: }
068:
069: /** Set the VeggiePG property.
070: * The default implementation will create a new VeggiePG
071: * property and add it to the otherPropertyGroup list.
072: * Many subclasses override with local slots.
073: **/
074: public void setVeggiePG(PropertyGroup aVeggiePG) {
075: if (aVeggiePG == null) {
076: removeOtherPropertyGroup(VeggiePG.class);
077: } else {
078: addOtherPropertyGroup(aVeggiePG);
079: }
080: }
081:
082: /** Search additional properties for a MeatPG instance.
083: * @return instance of MeatPG or null.
084: **/
085: public MeatPG getMeatPG() {
086: MeatPG _tmp = (MeatPG) resolvePG(MeatPG.class);
087: return (_tmp == MeatPG.nullPG) ? null : _tmp;
088: }
089:
090: /** Test for existence of a MeatPG
091: **/
092: public boolean hasMeatPG() {
093: return (getMeatPG() != null);
094: }
095:
096: /** Set the MeatPG property.
097: * The default implementation will create a new MeatPG
098: * property and add it to the otherPropertyGroup list.
099: * Many subclasses override with local slots.
100: **/
101: public void setMeatPG(PropertyGroup aMeatPG) {
102: if (aMeatPG == null) {
103: removeOtherPropertyGroup(MeatPG.class);
104: } else {
105: addOtherPropertyGroup(aMeatPG);
106: }
107: }
108:
109: }
|