Ignore:
Timestamp:
03/09/10 17:37:10 (14 years ago)
Author:
patdui
Message:
  • reimplemented my drag and drop editor
  • created search functionality for isocat conceptLinks.
  • added some flexUnit tests and cleanup error handling
File:
1 edited

Legend:

Unmodified
Added
Removed
  • ComponentRegistry/trunk/ComponentBrowserGui/src/main/flex/clarin/cmdi/componentregistry/editor/model/CMDComponentElement.as

    r206 r224  
    1717                //elements
    1818                public var attributeList:ArrayCollection = new ArrayCollection();
    19                 public var valueSchemeComplex:XMLListCollection;
     19                public var valueSchemeEnumeration:XMLListCollection;
     20                public var valueSchemePattern:String;
    2021
    2122                public function CMDComponentElement() {
     
    2526
    2627                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;
    2855                }
     56
    2957
    3058        }
Note: See TracChangeset for help on using the changeset viewer.