private void recursiveCreateAttributeModels(Attribute attribute, IDEAAttributeGroupModel parentGroupModel) { var fieldAttributeModel = new IDEAFieldAttributeModel(attribute.RawName, attribute.DisplayName, attribute.Index, InputDataTypeConstants.FromDataType(attribute.DataType), InputDataTypeConstants.FromDataType(attribute.DataType) == InputDataTypeConstants.NVARCHAR ? "enum" : "numeric", attribute.VisualizationHints); fieldAttributeModel.OriginModel = this; if (parentGroupModel != null) { parentGroupModel.InputModels.Add(fieldAttributeModel); } else { InputModels.Add(fieldAttributeModel); } }
private void recursiveCreateAttributeModels(AttributeGroup attributeGroup, IDEAAttributeGroupModel parentGroupModel) { var groupModel = new IDEAAttributeGroupModel(attributeGroup.Name, attributeGroup.Name); groupModel.OriginModel = this; if (parentGroupModel != null) { parentGroupModel.InputModels.Add(groupModel); } else { InputModels.Add(groupModel); } foreach (var childGroup in attributeGroup.AttributeGroups) { recursiveCreateAttributeModels(childGroup, groupModel); } foreach (var childAttribute in attributeGroup.Attributes) { recursiveCreateAttributeModels(childAttribute, groupModel); } }