FileAnalyzer.java revision 1195
0N/A * The contents of this file are subject to the terms of the 407N/A * Common Development and Distribution License (the "License"). 0N/A * You may not use this file except in compliance with the License. 0N/A * language governing permissions and limitations under the License. 0N/A * When distributing Covered Code, include this CDDL HEADER in each 0N/A * If applicable, add the following below this CDDL HEADER, with the 0N/A * fields enclosed by brackets "[]" replaced with your own identifying 0N/A * information: Portions Copyright [yyyy] [name of copyright owner] 1054N/A * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. 0N/A * Use is subject to license terms. 0N/A * Base class for all different File Analyzers 0N/A * An Analyzer for a filetype provides 0N/A * <li>the file extentions and magic numbers it analyzes</li> 0N/A * <li>a lucene document listing the fields it can support</li> 0N/A * <li>TokenStreams for each of the field it said requires tokenizing in 2</li> 0N/A * <li>cross reference in HTML format</li> 0N/A * <li>The type of file data, plain text etc</li> 0N/A * Created on September 21, 2005 0N/A * What kind of file is this? 1185N/A /** xrefed - line numbered context */ 1185N/A /** xrefed - summarizer context */ 1185N/A /** not xrefed - no context */ 1185N/A /** not xrefed - summarizer context from original file */ 1185N/A * Get the type name value used to tag lucence documents. 1185N/A * @return a none-null string. 1185N/A * Get the Genre for the given type name. 1185N/A * @param typeName name to check 1185N/A * @return {@code null} if it doesn't match any genre, the genre otherwise. 202N/A * Get the factory which created this analyzer. 202N/A * @return the {@code FileAnalyzerFactory} which created this analyzer 0N/A /** Creates a new instance of FileAnalyzer */ 0N/A * Write a cross referenced HTML file. 0N/A * @param out to writer HTML cross-reference 271N/A * @throws java.io.IOException if an error occurs