public void Process(Document input, Stage output) { var generator = new ValueSetGenerator(new ProfileKnowledgeProvider(input.Name, input.Context.Target.Directory)); var valueset = (ValueSet)FhirParser.ParseResourceFromXml(input.Text); Document result = input.CloneMetadata(); var xmldoc = generator.generate(valueset); result.Text = xmldoc.ToString(SaveOptions.DisableFormatting); output.Post(result); }
public void Process(Document input, Stage output) { input.Context.EnsureTarget(); Log.Debug("Copy \n from: {0} \n ..to: {1}.", Path.Combine(input.Context.Source.Directory, input.Name), input.Context.Target.Directory); File.Copy(input.SourceFullPath, input.TargetFullPath, true); }
public void Process(Document source, Stage stage) { Document template = Influx.Documents.First(); string t = template.Text; string s = source.Text; Document d = stage.CloneAndPost(source); d.Text = t + s; }
public static Stage Process(this PipeLine pipeline, Stage input) { Stage output = input; foreach (IProcessor p in pipeline.Processors) { output = p.Process(output); } return output; }
public static Stage Process(this IProcessor processor, Stage input) { Stage output = Stage.New(); foreach (Document document in input.Documents) { processor.Process(document, output); } return output; }
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); }
public void Process(Document input, Stage output) { input.Context.EnsureTarget(); // omdat er eerst plaatjes worden gegenereerd voorafgaand aan het document zelf. var generator = new ProfileTableGenerator(new ProfileKnowledgeProvider(input.Name, input.Context.Target.Directory)); var profile = (Profile)FhirParser.ParseResourceFromXml(input.Text); Document result = input.CloneMetadata(); var xmldoc = generator.Generate(profile, extensionsOnly: false); result.Text = xmldoc.ToString(SaveOptions.DisableFormatting); output.Post(result); }
public void Process(Document input, Stage output) { Document template = Influx.Single(input); Document result = input.CloneMetadata(); result.Text = template.Text.Replace("%body%", input.Text); result.Extension = template.Extension; output.Post(result); }
public void Process(Document input, Stage output) { IEnumerable<string> folders = Disk.Directories(input.Context.Source.Directory, pattern); foreach(string folder in folders) { Context context = Context.CreateFromSource(input.Context.Root, folder); IWork work = Make.InterpretDocument(input.Text, context); work.Execute(); } }
public void Process(Document input, Stage output) { StringBuilder builder = new StringBuilder(input.Text); foreach(Document doc in input.Attachments) { builder.Append(doc.Text); } foreach(Document doc in Influx.Documents) { builder.Append(doc.Text); } Document result = output.CloneAndPost(input); result.Text = builder.ToString(); }
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(); }
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; } }
public void Process(Document input, Stage output) { input.Attach(Influx.Documents); output.Post(input); }
public void Process(Document input, Stage stage) { Log.Debug("Rendering {0} \n from: {1} \n ..to: {2}.", Renderer.GetType().Name, input.SourceFullPath, input.TargetFullPath); Document output = stage.CloneAndPost(input); Renderer.Render(input, output); }
public void Process(Document input, Stage output) { IWork work = Make.InterpretDocument(input.Text, input.Context); work.Execute(); }
public void Process(Document input, Stage output) { Stash.Push(key, input.Clone()); }
public static Stage ToStage(this ISelector selector) { Stage stage = new Stage(selector.Documents); return stage; }