Package com.google.code.ftspc.lector.indexers

Examples of com.google.code.ftspc.lector.indexers.AddDataToIndex


            PDFTextStripper = null;

            if (fileContent.length() < 1) {
                ////////////////////
            }
            AddDataToIndex AddDataToIndex = new AddDataToIndex(null);
            AddDataToIndex.doAddData(fileContent, pathToFile, fileName);

            fileContent = null;
            Vars.current_run_indexes--;

        } catch (Exception ex) {
View Full Code Here


                        new String(fileContentForLanguageDetermination.getBytes("UTF-8"));
                fileContent = fileContentForLanguageDetermination;
            }
            fileContentForLanguageDetermination = null;

            AddDataToIndex AddDataToIndex = new AddDataToIndex(lang);
            AddDataToIndex.doAddData(fileContent, pathToFile, fileName);

            AddDataToIndex = null;
            fileContent = null;
            RTFEditorKit = null;
            RTFdoc = null;
View Full Code Here

            ChmExtract localChmExtract = new ChmExtract();
            String tmpDir = Vars.PathToTmpDir + "/" + (new Date()).getTime();
            File tmpDirForDeleting = new File(tmpDir);
            CHMParserFunctions CHMParserFunctions = new CHMParserFunctions();
            localChmExtract.main(pathToFile, tmpDir);
            AddDataToIndex AddDataToIndex = new AddDataToIndex(null);

            fileContent = CHMParserFunctions.processUnpackedObjects(tmpDirForDeleting);
            CHMParserFunctions.deleteDirectory(tmpDirForDeleting);
            AddDataToIndex.doAddData(fileContent, pathToFile, fileName);
            Vars.current_run_indexes--;

        } catch (Exception ex) {
            Vars.current_run_indexes--;
            Vars.logger.fatal("Error: ", ex);
View Full Code Here

            fileForParsing = new File(pathToFile);
            length = (int) fileForParsing.length();

            if (length != 0) {
                Source source;
                AddDataToIndex AddDataToIndex = new AddDataToIndex(null);
                char[] cbuf = new char[length];
                InputStreamReader isr = new InputStreamReader(
                        new FileInputStream(fileForParsing), fileEnc);
                final int read = isr.read(cbuf);

                fileContent = new String(cbuf, 0, read);
                isr.close();

                if (!fileEnc.equals("UTF-8")) {
                    fileContent = (new String(fileContent.getBytes("UTF-8"), "UTF-8"));
                }

                source = new Source(fileContent);
                source.setLogger(null);
                fileContent = source.getTextExtractor().toString();

                AddDataToIndex.doAddData(fileContent, pathToFile, fileName);

                pathToFile = null;
                AddDataToIndex = null;
                fileContent = null;
                source = null;
View Full Code Here

            String fileContent = "";
            String[] paragraphes = word.getParagraphText();
            for (String paragraph : paragraphes) {
                fileContent += " " + paragraph;
            }
            AddDataToIndex AddDataToIndex = new AddDataToIndex(null);
            AddDataToIndex.doAddData(fileContent, pathToFile, fileName);
            Vars.current_run_indexes--;
           
        } catch (OldWordFileFormatException ex) {
            parseWord6(pathToFile);
        } catch (Exception ex) {
View Full Code Here

            String fileContent = "";
            String[] paragraphes = docExtractor.getParagraphText();
            for (String paragraph : paragraphes) {
                fileContent += " " + paragraph;
            }
            AddDataToIndex AddDataToIndex = new AddDataToIndex(null);
            AddDataToIndex.doAddData(fileContent, pathToFile, fileName);
            Vars.current_run_indexes--;
           
        } catch (Exception ex) {
            Vars.current_run_indexes--;
            Vars.logger.fatal("Error: ", ex);
View Full Code Here

                read = isr.read(cbuf);
                fileContent = new String(cbuf, 0, read);
                isr.close();

                if (!fileEnc.equals("UTF-8")) {
                    AddDataToIndex AddDataToIndex = new AddDataToIndex(null);
                    AddDataToIndex.doAddData((new String(fileContent.getBytes("UTF-8"), "UTF-8")),
                            pathToFile, fileName);
                } else {
                    AddDataToIndex AddDataToIndex = new AddDataToIndex(null);
                    AddDataToIndex.doAddData(fileContent, pathToFile, fileName);
                }
                isr = null;
                fileContent = null;
                read = null;
                cbuf = null;
View Full Code Here

TOP

Related Classes of com.google.code.ftspc.lector.indexers.AddDataToIndex

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.