Changeset 224 for ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/model/CMDComponentElement.as
- Timestamp:
- 03/09/10 17:37:10 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/model/CMDComponentElement.as
r206 r224 17 17 //elements 18 18 public var attributeList:ArrayCollection = new ArrayCollection(); 19 public var valueSchemeComplex:XMLListCollection; 19 public var valueSchemeEnumeration:XMLListCollection; 20 public var valueSchemePattern:String; 20 21 21 22 public function CMDComponentElement() { … … 25 26 26 27 public function toXml():XML { 27 return <CMD_Element></CMD_Element>;//TODO PD implement 28 var result:XML = <CMD_Element></CMD_Element>; //TODO PD implement 29 if (name) 30 result.@name = name; 31 if (conceptLink) 32 result.@ConceptLink = conceptLink; 33 if (valueSchemeSimple) 34 result.@ValueScheme = valueSchemeSimple; 35 if (cardinalityMin) 36 result.@CardinalityMin = cardinalityMin; 37 if (cardinalityMax) 38 result.@CardinalityMax = cardinalityMax; 39 if (attributeList.length > 0) { 40 var attributeListTag:XML = <AttributeList></AttributeList>; 41 for each (var attribute:CMDAttribute in attributeList) { 42 attributeListTag.appendChild(attribute.toXml()); 43 } 44 result.appendChild(attributeListTag); 45 } 46 if (valueSchemePattern) { 47 result.appendChild(<ValueScheme><pattern></pattern>{valueSchemePattern}</ValueScheme>) 48 } 49 if (valueSchemeEnumeration != null) { 50 var enumerationScheme:XML = <ValueScheme><enumeration></enumeration></ValueScheme>; 51 enumerationScheme.appendChild(valueSchemeEnumeration); 52 result.appendChild(enumerationScheme); 53 } 54 return result; 28 55 } 56 29 57 30 58 }
Note: See TracChangeset
for help on using the changeset viewer.