/// <summary>Harvest common summary information from a conformance resource.</summary>
 /// <returns><c>true</c> if the current target represents a conformance resource, or <c>false</c> otherwise.</returns>
 /// <remarks>
 /// The <see cref="ArtifactSummaryGenerator"/> calls this method through a <see cref="ArtifactSummaryHarvester"/> delegate.
 /// Also called directly by other <see cref="ArtifactSummaryHarvester"/> delegates to harvest summary
 /// information common to all conformance resources, before harvesting any additional type specific
 /// information.
 /// </remarks>
 /// <seealso cref="StructureDefinitionSummaryProperties"/>
 /// <seealso cref="ValueSetSummaryProperties"/>
 /// <seealso cref="ConceptMapSummaryProperties"/>
 public static bool Harvest(IElementNavigator nav, ArtifactSummaryPropertyBag properties)
 {
     if (IsConformanceSummary(properties))
     {
         nav.HarvestValue(properties, CanonicalUrlKey, "url");
         nav.HarvestValue(properties, NameKey, "name");
         nav.HarvestValue(properties, StatusKey, "status");
         return(true);
     }
     return(false);
 }
 /// <summary>Harvest specific summary information from a <see cref="StructureDefinition"/> resource.</summary>
 /// <returns><c>true</c> if the current target represents a <see cref="StructureDefinition"/> resource, or <c>false</c> otherwise.</returns>
 /// <remarks>The <see cref="ArtifactSummaryGenerator"/> calls this method from a <see cref="ArtifactSummaryHarvester"/> delegate.</remarks>
 public static bool Harvest(IElementNavigator nav, ArtifactSummaryPropertyBag properties)
 {
     if (IsStructureDefinitionSummary(properties))
     {
         // Explicit extractor chaining
         if (ConformanceSummaryProperties.Harvest(nav, properties))
         {
             nav.HarvestValue(properties, FhirVersionKey, "fhirVersion");
             nav.HarvestValue(properties, KindKey, "kind");
             nav.HarvestValue(properties, ConstrainedTypeKey, "constrainedType");
             nav.HarvestValue(properties, ContextTypeKey, "contextType");
             nav.HarvestValue(properties, BaseKey, "base");
         }
         return(true);
     }
     return(false);
 }
        /// <summary>Harvest specific summary information from a <see cref="ConceptMap"/> resource.</summary>
        /// <returns><c>true</c> if the current target represents a <see cref="ConceptMap"/> resource, or <c>false</c> otherwise.</returns>
        /// <remarks>The <see cref="ArtifactSummaryGenerator"/> calls this method from a <see cref="ArtifactSummaryHarvester"/> delegate.</remarks>
        public static bool Harvest(IElementNavigator nav, ArtifactSummaryPropertyBag properties)
        {
            if (IsConceptMapSummary(properties))
            {
                // Explicit extractor chaining
                if (ConformanceSummaryProperties.Harvest(nav, properties))
                {
                    if (!nav.HarvestValue(properties, SourceKey, "sourceUri"))
                    {
                        nav.HarvestValue(properties, SourceKey, "sourceReference", "reference");
                    }

                    if (!nav.HarvestValue(properties, TargetKey, "targetUri"))
                    {
                        nav.HarvestValue(properties, TargetKey, "targetReference", "reference");
                    }
                }
                return(true);
            }
            return(false);
        }
 /// <summary>Harvest specific summary information from a <see cref="ValueSet"/> resource.</summary>
 /// <returns><c>true</c> if the current target is a ValueSet, or <c>false</c> otherwise.</returns>
 /// <remarks>The <see cref="ArtifactSummaryGenerator"/> calls this method from a <see cref="ArtifactSummaryHarvester"/> delegate.</remarks>
 public static bool Harvest(IElementNavigator nav, ArtifactSummaryPropertyBag properties)
 {
     if (IsValueSetSummary(properties))
     {
         // Explicit extractor chaining
         if (ConformanceSummaryProperties.Harvest(nav, properties))
         {
             nav.HarvestValue(properties, SystemKey, "codeSystem", "system");
         }
         return(true);
     }
     return(false);
 }
 /// <summary>Harvest the value of the (current or sibling) element with the specified name into a property bag.</summary>
 /// <param name="nav">An <see cref="IElementNavigator"/> instance.</param>
 /// <param name="properties">A property bag to store harvested summary information.</param>
 /// <param name="key">A property key.</param>
 /// <param name="element">An element name.</param>
 public static bool HarvestValue(this IElementNavigator nav, IDictionary <string, object> properties, string key, string element)
 {
     return(nav.Find(element) && nav.HarvestValue(properties, key));
 }