예제 #1
0
        public static Document CreateFromFullPath(Context context, string fullpath)
        {
            Document document = new Document();

            document.Context = Context.CreateFromSource(context.Root, fullpath);
            document.SetFilename(fullpath);
            return(document);
        }
예제 #2
0
        public static Document CreateInContext(Context context, string filename)
        {
            Document document = new Document();

            document.Context = context.Clone();
            string dir = Path.GetDirectoryName(filename);

            document.Context.MoveTo(dir);
            document.SetFilename(filename);
            return(document);
        }
        public void Process(Document input, Stage output)
        {
            var      pkp       = new ProfileKnowledgeProvider(input.Name, input.Context.Target.Directory);
            var      generator = new DictHtmlGenerator(pkp);
            var      profile   = (Profile)FhirParser.ParseResourceFromXml(input.Text);
            Document result    = input.CloneMetadata();
            var      xmldoc    = generator.Generate(profile);

            result.SetFilename(pkp.GetLinkForProfileDict(profile));
            result.Text = xmldoc.ToString(SaveOptions.DisableFormatting);
            output.Post(result);
        }
예제 #4
0
        public void Process(Document input, Stage output)
        {
            if (Mask != null)
            {
                if (Mask.StartsWith("."))
                {
                    input.Extension = Mask;
                }
                else
                {
                    string s = Disk.ParseMask(input.Name, Mask);
                    input.SetFilename(s);
                }
            }

            input.Save();
        }
예제 #5
0
        public void Process(Document input, Stage output)
        {
            if (Mask != null)
            {
                if (Mask.StartsWith("."))
                {
                    input.Extension = Mask;
                }
                else 
                {
                    string s = Disk.ParseMask(input.Name, Mask);
                    input.SetFilename(s);
                }
            }

            input.Save();
        }
예제 #6
0
        public void Process(Document input, Stage output)
        {
            var pkp       = new ProfileKnowledgeProvider(input.Name, input.Context.Target.Directory);
            var generator = new StructureGenerator(pkp);

            var profile = (Profile)FhirParser.ParseResourceFromXml(input.Text);

            foreach (var structure in profile.Structure)
            {
                var result = generator
                             .generateStructureTable(structure, false, profile)
                             .ToString(System.Xml.Linq.SaveOptions.DisableFormatting);

                Document document = output.CloneAndPost(input);
                document.SetFilename(pkp.GetLinkForLocalStructure(profile, structure));
                document.Text = result;
            }
        }
예제 #7
0
 public static Document CreateInContext(Context context, string filename)
 {
     Document document = new Document();
     document.Context = context.Clone();
     string dir = Path.GetDirectoryName(filename);
     document.Context.MoveTo(dir);
     document.SetFilename(filename);
     return document;
 }
예제 #8
0
 public static Document CreateFromFullPath(Context context, string fullpath)
 {
     Document document = new Document();
     document.Context = Context.CreateFromSource(context.Root, fullpath);
     document.SetFilename(fullpath);
     return document;
 }