public override bool SetContentChunk(ContentChunk chunk, ChunkContentCandidate candidate, ChunkDetectionResult result) { JunctionPoint <NodeGraph> junctionPoint = candidate.MetaData as JunctionPoint <NodeGraph>; NodeGraphTemplateDetection templateDetection = new NodeGraphTemplateDetection(junctionPoint.rootItem); if (templateDetection.IsValid()) { RecordTemplateSet templateSet = templateDetection.GetTemplateSet(); chunk.ExtractorCustomizationSettings.AddObjectEntry(nameof(RecordTemplateExtractor.TemplateSet), templateSet); return(true); } else { return(false); } }
public override bool SetContentChunk(ContentChunk chunk, ChunkContentCandidate candidate, ChunkDetectionResult result) { NodeGraphTemplateDetection templateDetection = new NodeGraphTemplateDetection(candidate.Node); chunk.multiNodePolicy = TaskMultiNodePolicy.AsSeparatedTables; chunk.type = ContentChunkType.DynamicDataExtraction; if (templateDetection.IsValid()) { RecordTemplateSet templateSet = templateDetection.GetTemplateSet(); chunk.ExtractorCustomizationSettings.AddObjectEntry(nameof(RecordTemplateExtractor.TemplateSet), templateSet); return(true); } else { chunk.description = "Refused for failed template detection"; return(false); } }