001: /*
002: * Generated by Cougaar QoS FrameGen
003: * from c:\marla\mmon\cougaar\HEAD\qos\src\org\cougaar\core\qos\frame\topology\cougaar-topology-protos.xml
004: * at Mar 14, 2007 4:18:10 PM
005: *
006: * Copyright BBN Technologies 2006
007: *
008: */
009: package org.cougaar.core.qos.frame.topology;
010:
011: import org.cougaar.core.qos.frame.DataFrame;
012: import org.cougaar.core.qos.frame.FrameSet;
013: import org.cougaar.core.qos.frame.RelationFrame;
014: import org.cougaar.core.qos.frame.SlotDescription;
015: import org.cougaar.core.util.UID;
016:
017: public class Relationship extends RelationFrame {
018: static {
019: org.cougaar.core.qos.frame.FrameMaker __fm = new org.cougaar.core.qos.frame.FrameMaker() {
020: public DataFrame makeFrame(FrameSet frameSet, UID uid) {
021: return new Relationship(frameSet, uid);
022: }
023: };
024: DataFrame.registerFrameMaker(
025: "org.cougaar.core.qos.frame.topology", "relationship",
026: __fm);
027: }
028: private String parent_value;
029: private String child_value;
030:
031: public Relationship(UID uid) {
032: this (null, uid);
033: }
034:
035: public Relationship(FrameSet frameSet, UID uid) {
036: super (frameSet, uid);
037: }
038:
039: public String getKind() {
040: return "relationship";
041: }
042:
043: protected void collectSlotValues(java.util.Properties __props) {
044: super .collectSlotValues(__props);
045: Object __value;
046: __value = getParentValue__AsObject();
047: __props.put("parent-value", __value != null ? __value : NIL);
048: __value = getChildValue__AsObject();
049: __props.put("child-value", __value != null ? __value : NIL);
050: }
051:
052: public String getParentPrototype() {
053: return "thing";
054: }
055:
056: public String getParentSlot() {
057: return "name";
058: }
059:
060: public String getChildPrototype() {
061: return "thing";
062: }
063:
064: public String getChildSlot() {
065: return "name";
066: }
067:
068: public String getParentValue() {
069: return parent_value;
070: }
071:
072: String getParentValue__NoWarn() {
073: return parent_value;
074: }
075:
076: Object getParentValue__AsObject() {
077: return parent_value;
078: }
079:
080: public synchronized void setParentValue(String __new_value) {
081: String __old_value = parent_value;
082: this .parent_value = __new_value;
083: slotModified("parent-value", __old_value, __new_value, true,
084: true);
085: }
086:
087: public synchronized void setParentValue__AsObject(Object __new_value) {
088: Object __old_value = getParentValue__AsObject();
089: this .parent_value = force_String(__new_value);
090: slotModified("parent-value", __old_value, __new_value, true,
091: true);
092: }
093:
094: protected void initializeParentValue(String new_value) {
095: this .parent_value = new_value;
096: slotInitialized("parent-value", new_value);
097: }
098:
099: void initializeParentValue__AsObject(Object new_value) {
100: this .parent_value = force_String(new_value);
101: slotInitialized("parent-value", new_value);
102: }
103:
104: public String getChildValue() {
105: return child_value;
106: }
107:
108: String getChildValue__NoWarn() {
109: return child_value;
110: }
111:
112: Object getChildValue__AsObject() {
113: return child_value;
114: }
115:
116: public synchronized void setChildValue(String __new_value) {
117: String __old_value = child_value;
118: this .child_value = __new_value;
119: slotModified("child-value", __old_value, __new_value, true,
120: true);
121: }
122:
123: public synchronized void setChildValue__AsObject(Object __new_value) {
124: Object __old_value = getChildValue__AsObject();
125: this .child_value = force_String(__new_value);
126: slotModified("child-value", __old_value, __new_value, true,
127: true);
128: }
129:
130: protected void initializeChildValue(String new_value) {
131: this .child_value = new_value;
132: slotInitialized("child-value", new_value);
133: }
134:
135: void initializeChildValue__AsObject(Object new_value) {
136: this .child_value = force_String(new_value);
137: slotInitialized("child-value", new_value);
138: }
139:
140: protected Object getLocalValue(String __slot) {
141: String __key = __slot.intern();
142: if ("parent-value" == __key)
143: return getParentValue__AsObject();
144: else if ("child-value" == __key)
145: return getChildValue__AsObject();
146: else
147: return null;
148: }
149:
150: protected void setLocalValue(String __slot, Object __value) {
151: String __key = __slot.intern();
152: if ("parent-value" == __key)
153: setParentValue__AsObject(__value);
154: else if ("child-value" == __key)
155: setChildValue__AsObject(__value);
156: }
157:
158: protected void initializeLocalValue(String __slot, Object __value) {
159: String __key = __slot.intern();
160: if ("parent-value" == __key)
161: initializeParentValue__AsObject(__value);
162: else if ("child-value" == __key)
163: initializeChildValue__AsObject(__value);
164: }
165:
166: protected void collectSlotNames(java.util.Set<String> slots) {
167: super .collectSlotNames(slots);
168: slots.add("parent-value");
169: slots.add("child-value");
170: }
171:
172: public SlotDescription slotMetaData__ParentValue() {
173: SlotDescription __desc = new SlotDescription();
174: __desc.name = "parent-value";
175: __desc.prototype = "relationship";
176: __desc.is_writable = true;
177: Object __value;
178: __value = parent_value;
179: if (__value != null) {
180: __desc.is_overridden = true;
181: __desc.value = __value;
182: } else {
183: __desc.is_overridden = false;
184: }
185: return __desc;
186: }
187:
188: public SlotDescription slotMetaData__ChildValue() {
189: SlotDescription __desc = new SlotDescription();
190: __desc.name = "child-value";
191: __desc.prototype = "relationship";
192: __desc.is_writable = true;
193: Object __value;
194: __value = child_value;
195: if (__value != null) {
196: __desc.is_overridden = true;
197: __desc.value = __value;
198: } else {
199: __desc.is_overridden = false;
200: }
201: return __desc;
202: }
203:
204: protected void collectSlotDescriptions(
205: java.util.Map<String, SlotDescription> map) {
206: super .collectSlotDescriptions(map);
207: map.put("parent-value", slotMetaData__ParentValue());
208: map.put("child-value", slotMetaData__ChildValue());
209: }
210: }
|