Example #1
0
 public void LoadStr(string contents, AbstractEasyParser parser, IContentExtractor extractor = null)
 {
     Parser = parser;
     if (extractor != null)
     {
         using (TextReader tr = new StringReader(contents))
         {
             TextReader extractedContents = extractor.GetTextReader(tr);
             contents = extractedContents.ReadToEnd();
         }
     }
     if (Parser != null)
     {
         Parser.OnRowAdd   += OnRowAdd;
         Parser.OnError    += OnError;
         Parser.OnProgress += OnProgress;
         Parser.LoadStr(contents, this);
         Parser.OnRowAdd   -= OnRowAdd;
         Parser.OnError    -= OnError;
         Parser.OnProgress -= OnProgress;
     }
     else
     {
         LoadXml(contents);
     }
     Transform();
 }
Example #2
0
 public void Load(TextReader txtReader, AbstractEasyParser parser, IContentExtractor extractor = null)
 {
     Parser = parser;
     if (extractor != null)
     {
         txtReader = extractor.GetTextReader(txtReader);
     }
     Load(txtReader);
 }
Example #3
0
 public void Load(Stream inStream, AbstractEasyParser parser, IContentExtractor extractor = null)
 {
     Parser = parser;
     if (extractor != null)
     {
         inStream = extractor.GetStream(inStream);
     }
     Load(inStream);
 }
Example #4
0
 public ParsingWorkflow(IJobStatusStore statusStore,
                        IBlobReader blobReader,
                        IContentExtractor extractor,
                        ISearchIndex searchIndex,
                        IDocumentScorer documentScorer)
 {
     this.statusStore = statusStore;
     this.blobReader  = blobReader;
     this.extractor   = extractor;
     this.searchIndex = searchIndex;
     this.docScorer   = documentScorer;
 }
Example #5
0
 public void Load(string filename, AbstractEasyParser parser, IContentExtractor extractor = null)
 {
     Parser = parser;
     if (extractor != null)
     {
         Stream inStream = extractor.GetStream(filename);
         Load(inStream);
     }
     else
     {
         Load(filename);
     }
 }
Example #6
0
 public GenericDocumentTranslator(IContentExtractor <TDocument> contentExtractor)
 {
     extractor = contentExtractor;
 }
 public VueStorefrontExportJob(IContentExtractor vsfExporter, IExtractedContentHandler contentHandler)
 {
     _vsfExporter    = vsfExporter;
     _contentHandler = contentHandler;
 }
Example #8
0
 public ContentsController(IMapper mapper, IContentExtractor contentExtractor)
 {
     _mapper           = mapper ?? throw new ArgumentNullException(nameof(mapper));
     _contentExtractor = contentExtractor ?? throw new ArgumentNullException(nameof(contentExtractor));
 }
Example #9
0
 public RollMeOne()
 {
     contentExtractor = new ContentExtractor();
     rollUtill        = new RollUtility();
 }