@Singleton @Named public class ContentParserJava extends AbstractContentParserTextMarkupAware
ContentParser
interface for Java
sources (content with the mimetype "text/java-source").Modifier and Type | Field and Description |
---|---|
private static Pattern |
AUTHOR_PATTERN
pattern to extract the author
|
private static Pattern |
CLASS_PATTERN
pattern to extract the class name
|
static String |
KEY_EXTENSION
The default extension.
|
static String |
KEY_MIMETYPE
The mimetype.
|
private static Pattern |
PACKAGE_PATTERN
pattern to extract the package name
|
private static String |
PACKAGE_SEPARATOR
the string used to separate package names
|
VARIABLE_NAME_CREATOR, VARIABLE_NAME_KEYWORDS, VARIABLE_NAME_LANGUAGE, VARIABLE_NAME_TEXT, VARIABLE_NAME_TITLE
Constructor and Description |
---|
ContentParserJava()
The constructor.
|
Modifier and Type | Method and Description |
---|---|
String |
getExtension()
This method gets the default filename extension excluding the dot (e.g.
|
String |
getMimetype()
This method gets the default mimetype (e.g.
|
protected void |
parseLine(MutableGenericContext context,
String line)
This method may be overridden to parse additional metadata from the
content.
|
doInitialize, parse
getEncodingUtil, getXmlUtil, parse, parseProperty, parseProperty, setEncodingUtil, setXmlUtil
getAlternativeKeyArray, getPrimaryKeys, getSecondaryKeyArray, getSecondaryKeys, parse, parse, setGenericContextFactory
createLogger, getLogger
doInitialized, getInitializationState, initialize
public static final String KEY_MIMETYPE
public static final String KEY_EXTENSION
private static final String PACKAGE_SEPARATOR
private static final Pattern PACKAGE_PATTERN
private static final Pattern CLASS_PATTERN
private static final Pattern AUTHOR_PATTERN
public String getExtension()
ContentParser
.getExtension
in interface ContentParser
getExtension
in class AbstractContentParserText
null
if this is the
generic parser
.public String getMimetype()
ContentParser
.getMimetype
in interface ContentParser
getMimetype
in class AbstractContentParserText
null
if this is the
generic parser
.protected void parseLine(MutableGenericContext context, String line)
parseLine
in class AbstractContentParserText
context
- are the properties with the collected metadata.line
- is a single line read from the text.Copyright © 2001–2016 mmm-Team. All rights reserved.