Package org.jab.docsearch.constants

Examples of org.jab.docsearch.constants.FileType


            return false;
        }

        // check filetype is known
        String extension = FileUtils.getFileExtension(filename);
        FileType fileType = FileType.fromValue(extension);

        return FileType.UNKNOWN != fileType;
    }
View Full Code Here


            if (DateTimeUtils.getDaysOld(date) > maxDays) {
                returnbool = false;
            }
        }

        FileType fileType = FileType.fromValue(type);
        String lowerTitle = title.toLowerCase();
        int titleLen = title.length();
        int authLen = author.length();
        int descLen = description.length();
        int keywdLen = keywords.length();
View Full Code Here

     *
     * @param typeStr  Type
     * @return         Image String
     */
    private String getImageString(final String typeStr) {
        FileType type = FileType.fromValue(typeStr);

        switch (type) {
            case HTML: return htmlTag;
            case MS_WORD: return wordTag;
            case MS_EXCEL: return excelTag;
View Full Code Here

                String documentText = null;
                File curFile = new File(currentFi);
                long curFileSize = curFile.length();
                String fileTypeStr = FileUtils.getFileExtension(currentFi);
                String lowerFileTypeStr = fileTypeStr.toLowerCase();
                FileType fileType = FileType.fromValue(lowerFileTypeStr);

                // file
                if (isSpiderFile) {
                    dateIndexStr = DateTimeUtils.getTimeStringForIndex(spy.getLastModified());
View Full Code Here

                                    currentFile = currentDocument.get(Index.FIELD_URL);
                                }

                                // type
                                String currentTypeStr = currentDocument.get(Index.FIELD_TYPE);
                                FileType currentType = FileType.fromValue(currentTypeStr);

                                // author
                                String currentAuthor = currentDocument.get(Index.FIELD_AUTHOR);
                                if ("".equals(currentAuthor)) {
                                    currentAuthor = I18n.getString("unknown");
View Full Code Here

TOP

Related Classes of org.jab.docsearch.constants.FileType

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.