/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* See LICENSE.txt included in this distribution for the specific
* language governing permissions and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at LICENSE.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Use is subject to license terms.
*/
/**
* Base class for all different File Analyzers
*
* An Analyzer for a filetype provides
*<ol>
* <li>the file extentions and magic numbers it analyzes</li>
* <li>a lucene document listing the fields it can support</li>
* <li>TokenStreams for each of the field it said requires tokenizing in 2</li>
* <li>cross reference in HTML format</li>
* <li>The type of file data, plain text etc</li>
*</ol>
*
* Created on September 21, 2005
*
* @author Chandan
*/
/**
* What kind of file is this?
*/
public static enum Genre {
/** xrefed - line numbered context */
/** xrefed - summarizer context */
/** not xrefed - no context */
/** not xrefed - summarizer context from original file */
;
}
/**
* Get the type name value used to tag lucene documents.
* @return a none-null string.
*/
return typeName;
}
/**
* Get the Genre for the given type name.
* @param typeName name to check
* @return {@code null} if it doesn't match any genre, the genre otherwise.
* @see #typeName()
*/
return null;
}
return g;
}
}
return null;
}
}
}
}
/**
* Get the factory which created this analyzer.
* @return the {@code FileAnalyzerFactory} which created this analyzer
*/
return factory;
}
}
/** Creates a new instance of FileAnalyzer */
super(new Analyzer.PerFieldReuseStrategy());
}
// not used
}
return tsc_path;
return tsc_project;
}
return null;
}
/**
* Write a cross referenced HTML file.
* @param out to writer HTML cross-reference
* @throws java.io.IOException if an error occurs
*/
}
try {
if (compressed) {
}
writeXref(w);
} finally {
}
}
}