ARCHETYPE_ONTOLOGY VisitOntology(ARCHETYPE_ONTOLOGY ontology)
        {
            ARCHETYPE_ONTOLOGY result = new ARCHETYPE_ONTOLOGY();

            // canonicalise ontology term_definitions
            result.term_definitions = VisitCodeDefinitions(ontology.term_definitions);

            // canonicalise ontology constraint_definitions
            result.constraint_definitions = VisitCodeDefinitions(ontology.constraint_definitions);

            // canonicalise ontology term_bindings
            result.term_bindings = VisitTermBindings(ontology.term_bindings);

            // canonicalise ontology constraint_bindings
            result.constraint_bindings = VisitConstraintBindings(ontology.constraint_bindings);

            return result;
        }
        protected virtual ARCHETYPE_ONTOLOGY CloneOntology(openehr.openehr.am.archetype.ontology.ARCHETYPE_ONTOLOGY o)
        {
            ARCHETYPE_ONTOLOGY result = new ARCHETYPE_ONTOLOGY();

            result.term_definitions = CloneCodeDefinitions(o.term_definitions());
            result.term_bindings = CloneTermBindingSet(o.term_bindings());
            result.constraint_definitions = CloneCodeDefinitions(o.constraint_definitions());
            result.constraint_bindings = CloneConstraintBindingSet(o.constraint_bindings());

            return result;
        }