/// <summary> /// Handles the Structure top level elements /// This includes Codelist /// </summary> /// <param name="parent"> /// The parent <see cref="IMutableObjects"/> /// </param> /// <param name="localName"> /// The name of the current xml element /// </param> /// <returns> /// The <see cref="StructureReaderBaseV20.ElementActions"/>. /// </returns> protected override ElementActions HandleTopLevel(IMutableObjects parent, object localName) { ElementActions actions = null; if (NameTableCache.IsElement(localName, ElementNameTable.CodeList)) { ICodelistMutableObject codelist = new CodelistMutableCore(); ParseAttributes(codelist, this.Attributes); parent.AddCodelist(codelist); actions = this.AddNameableAction(codelist, this.HandleChildElements); } return actions; }
/// <summary> /// Process the <paramref name="current"/> and populate the <paramref name="mutableObjects"/> /// </summary> /// <param name="av"> /// The current Structure Retrieval state /// </param> /// <param name="current"> /// The <see cref="IMaintainableRefObject"/> codelist request /// </param> /// <param name="mutableObjects">The output mutable objects</param> /// <returns> /// <c>true</c> if the partial codelist is found found is larger than 0. Else <c>false</c> /// </returns> private static bool ProcessReference(StructureRetrievalInfo av, IMaintainableRefObject current, IMutableObjects mutableObjects) { ICodelistMutableObject availableData = _specialRequestManager.RetrieveAvailableData(current, av); if (availableData != null) { mutableObjects.AddCodelist(availableData); return true; } return false; }