public void RegisterForceCallableSRTemplate(PSMClass representedClass, ERepresentedTemplatePart part, string templateName)
        {
            Dictionary <PSMElement, string> templateCollection;

            if (part == ERepresentedTemplatePart.Attributes)
            {
                templateCollection = representedContentTemplatesAttFC;
            }
            else
            {
                templateCollection = representedContentTemplatesElmFC;
            }
            templateCollection[representedClass] = templateName;
        }
        public string GetRepresentedContentTemplate(PSMClass containingClass, ERepresentedTemplatePart part, bool forceCallable)
        {
            Dictionary <PSMElement, string> templateCollection;

            if (forceCallable)
            {
                templateCollection = part == ERepresentedTemplatePart.Attributes ? representedContentTemplatesAttFC : representedContentTemplatesElmFC;
            }
            else
            {
                templateCollection = part == ERepresentedTemplatePart.Attributes ? representedContentTemplatesAtt : representedContentTemplatesElm;
            }
            string name;

            if (templateCollection.ContainsKey(containingClass))
            {
                name = templateCollection[containingClass];
            }
            else
            {
                name = suggestNameFromXPath(containingClass);
                if (!containingClass.HasElementLabel)
                {
                    name += "/" + containingClass.Name.ToUpper();
                }
                name  = name.Replace("/", "-").Trim('-');
                name += REPRESENTED_CONTENT_SUFFIX;
                if (part == ERepresentedTemplatePart.Attributes)
                {
                    name += ATTRIBUTES_SUFFIX;
                }
                else
                {
                    name += ELEMENTS_SUFFIX;
                }
                if (forceCallable)
                {
                    name += FORCE_CALLABLE_SUFFIX;
                }
                templateCollection[containingClass] = name;
            }

            return(name);
        }
 public string GetRepresentedContentTemplate(StructuralRepresentativeElements structuralRepresentativeElements, ERepresentedTemplatePart part, bool forceCallable)
 {
     return(GetRepresentedContentTemplate(structuralRepresentativeElements.RepresentedPSMClass, part, forceCallable));
 }