Пример #1
0
        C_MULTIPLE_ATTRIBUTE VisitMultipleAttributeConstraint(C_MULTIPLE_ATTRIBUTE attributeConstraint)
        {
            System.Diagnostics.Trace.Assert(attributeConstraint != null, "existingAttribute must not be null");

            C_MULTIPLE_ATTRIBUTE result = new C_MULTIPLE_ATTRIBUTE();
            CloneAttributeConstraint(attributeConstraint, result);
            result.cardinality = attributeConstraint.cardinality;

            return result;
        }
Пример #2
0
 //public C_MULTIPLE_ATTRIBUTE MakeMultipleAttribute(C_COMPLEX_OBJECT an_object, string name, CARDINALITY a_cardinality)//, int capacity) //JAR: 30APR2007, AE-42 Support XML Schema 1.0.1
 public C_MULTIPLE_ATTRIBUTE MakeMultipleAttribute(C_COMPLEX_OBJECT an_object, string name, CARDINALITY a_cardinality, IntervalOfInteger existence)//, int capacity)
 {
     C_MULTIPLE_ATTRIBUTE result = new C_MULTIPLE_ATTRIBUTE();
     result.rm_attribute_name = name;
     result.cardinality = a_cardinality;
     result.existence = existence; //JAR: 30APR2007, AE-42 Support XML Schema 1.0.1
     //result.children = Array.CreateInstance(typeof(XMLParser.C_OBJECT), capacity) as C_OBJECT[];
     add_attribute(an_object, result);
     return result;
 }
        protected virtual C_ATTRIBUTE CloneAttribute(openehr.openehr.am.archetype.constraint_model.C_ATTRIBUTE o)
        {
            C_ATTRIBUTE result;

            if (o.cardinality() == null)
                result = new C_SINGLE_ATTRIBUTE();
            else
            {
                C_MULTIPLE_ATTRIBUTE cloneMultiple = new C_MULTIPLE_ATTRIBUTE();
                cloneMultiple.cardinality = CloneCardinality(o.cardinality());
                result = cloneMultiple;
            }

            result.rm_attribute_name = o.rm_attribute_name().to_cil();

            if (o.existence() != null)
                result.existence = CloneIntervalOfInteger(o.existence());

            // 0..* children C_OBJECT (set in CloneTree)

            return result;
        }