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.SlotDescription;
014: import org.cougaar.core.util.UID;
015:
016: public class Thing extends DataFrame {
017: static {
018: org.cougaar.core.qos.frame.FrameMaker __fm = new org.cougaar.core.qos.frame.FrameMaker() {
019: public DataFrame makeFrame(FrameSet frameSet, UID uid) {
020: return new Thing(frameSet, uid);
021: }
022: };
023: DataFrame.registerFrameMaker(
024: "org.cougaar.core.qos.frame.topology", "thing", __fm);
025: }
026: private String name;
027:
028: public Thing(UID uid) {
029: this (null, uid);
030: }
031:
032: public Thing(FrameSet frameSet, UID uid) {
033: super (frameSet, uid);
034: }
035:
036: public String getKind() {
037: return "thing";
038: }
039:
040: protected void collectSlotValues(java.util.Properties __props) {
041: super .collectSlotValues(__props);
042: Object __value;
043: __value = getName__AsObject();
044: __props.put("name", __value != null ? __value : NIL);
045: }
046:
047: public String getName() {
048: return name;
049: }
050:
051: String getName__NoWarn() {
052: return name;
053: }
054:
055: Object getName__AsObject() {
056: return name;
057: }
058:
059: protected void initializeName(String new_value) {
060: this .name = new_value;
061: slotInitialized("name", new_value);
062: }
063:
064: void initializeName__AsObject(Object new_value) {
065: this .name = force_String(new_value);
066: slotInitialized("name", new_value);
067: }
068:
069: protected Object getLocalValue(String __slot) {
070: String __key = __slot.intern();
071: if ("name" == __key)
072: return getName__AsObject();
073: else
074: return null;
075: }
076:
077: protected void setLocalValue(String __slot, Object __value) {
078: }
079:
080: protected void initializeLocalValue(String __slot, Object __value) {
081: String __key = __slot.intern();
082: if ("name" == __key)
083: initializeName__AsObject(__value);
084: }
085:
086: protected void collectSlotNames(java.util.Set<String> slots) {
087: super .collectSlotNames(slots);
088: slots.add("name");
089: }
090:
091: public SlotDescription slotMetaData__Name() {
092: SlotDescription __desc = new SlotDescription();
093: __desc.name = "name";
094: __desc.prototype = "thing";
095: __desc.is_writable = false;
096: Object __value;
097: __value = name;
098: if (__value != null) {
099: __desc.is_overridden = true;
100: __desc.value = __value;
101: } else {
102: __desc.is_overridden = false;
103: }
104: return __desc;
105: }
106:
107: protected void collectSlotDescriptions(
108: java.util.Map<String, SlotDescription> map) {
109: super .collectSlotDescriptions(map);
110: map.put("name", slotMetaData__Name());
111: }
112: }
|