|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.nuiton.plugin.AbstractPlugin
org.nuiton.i18n.plugin.AbstractI18nMojo
org.nuiton.i18n.plugin.parser.AbstractI18nParserMojo
org.nuiton.i18n.plugin.parser.impl.AbstractParserXmlMojo
public abstract class AbstractParserXmlMojo
Abstract xml parser mojo.
| Nested Class Summary | |
|---|---|
static class |
AbstractParserXmlMojo.XmlFileParser
|
| Nested classes/interfaces inherited from interface org.nuiton.plugin.Plugin |
|---|
org.nuiton.plugin.Plugin.InitState, org.nuiton.plugin.Plugin.Packaging |
| Field Summary | |
|---|---|
protected static int |
BUFFER_SIZE
Taille du buffer pour les lectures/écritures |
protected DocumentBuilderFactory |
documentBuilderFactory
Document builder factory to load xml files. |
protected XPathFactory |
factory
XPath factory used to detect i18n keys in xml files. |
protected Map<String,String> |
namespaces
Defines namespaces mapping if needed. |
protected String |
rules
available rules to detect i18n keys in xml files. |
protected String[] |
userRulesFiles
Extra rules files to use for detecting i18n keys in xml validation files. |
| Fields inherited from class org.nuiton.i18n.plugin.parser.AbstractI18nParserMojo |
|---|
backupGetter, cp, entries, force, keysModifier, oldLanguage, oldParser, showTouchedFiles, t0, treateDefaultEntry |
| Fields inherited from class org.nuiton.i18n.plugin.AbstractI18nMojo |
|---|
artifactId, bundles, encoding, genSrc, locales, out, project, silent, src, strictMode, verbose |
| Fields inherited from interface org.apache.maven.plugin.Mojo |
|---|
ROLE |
| Constructor Summary | |
|---|---|
AbstractParserXmlMojo()
|
|
| Method Summary | |
|---|---|
protected abstract String |
getCoreRuleFile()
|
protected List<String> |
getRulefiles()
Obtain the list of files which define rules to apply. |
String[] |
getUserRuleFiles()
|
void |
init()
|
protected String |
loadRules(List<String> files)
|
protected String |
loadRulesFile(String fileRules)
|
FileParser |
newFileParser()
|
protected abstract AbstractParserXmlMojo.XmlFileParser |
newXmlFileParser(XPath xpath,
DocumentBuilder builder)
|
| Methods inherited from class org.nuiton.i18n.plugin.parser.AbstractI18nParserMojo |
|---|
addDefaultEntry, doAction, getDefaultBasedir, getDefaultExcludes, getDefaultIncludes, getKeyModifierEnd, getKeyModifierStart, getLogEntry, getOutGetter, getResult, isForce, isShowTouchedFiles, isStrictMode, newFileUpdater, onEnterEntry, saveGetterFile |
| Methods inherited from class org.nuiton.i18n.plugin.AbstractI18nMojo |
|---|
addGetter, backupFile, checkBundle, checkPackaging, getArtifactId, getBackupFile, getEncoding, getGetterFile, getI18nFile, getProject, isSilent, isVerbose, needGeneration, setEncoding, setProject, setVerbose |
| Methods inherited from class org.nuiton.plugin.AbstractPlugin |
|---|
acceptPackaging, addCompileSourceRoots, addDirectoryToUrlsList, addResourceDir, addTestCompileSourceRoots, addTestResourceDir, addUrlToUrlsList, afterExecute, checkEncoding, checkResource, checkRunOnceDone, checkSkip, copyFile, createDirectoryIfNecessary, createNewFile, deleteFile, execute, getFileFromBasedir, getFilesToTreate, getFilesToTreateForRoots, getRootProject, getTemplate, hasClassPath, initClassLoader, isExecutionRoot, isFileNewerThanPomFile, rejectPackaging, removeCompileSourceRoots, removeTestCompileSourceRoots, renameFile, writeFile |
| Methods inherited from class org.apache.maven.plugin.AbstractMojo |
|---|
getLog, getPluginContext, setLog, setPluginContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.nuiton.i18n.plugin.parser.I18nParserConfiguration |
|---|
getLog, isSilent, isVerbose |
| Methods inherited from interface org.apache.maven.plugin.Mojo |
|---|
execute, getLog, setLog |
| Field Detail |
|---|
protected static final int BUFFER_SIZE
protected String rules
protected XPathFactory factory
protected DocumentBuilderFactory documentBuilderFactory
protected String[] userRulesFiles
coreRulesFile is not defined, then you must
fill this parameter.
protected Map<String,String> namespaces
<namespaces> <s>http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd</s> </namespaces>
| Constructor Detail |
|---|
public AbstractParserXmlMojo()
| Method Detail |
|---|
protected abstract String getCoreRuleFile()
protected abstract AbstractParserXmlMojo.XmlFileParser newXmlFileParser(XPath xpath,
DocumentBuilder builder)
protected List<String> getRulefiles()
public void init()
throws Exception
init in class AbstractI18nParserMojoExceptionpublic final String[] getUserRuleFiles()
public final FileParser newFileParser()
newFileParser in class AbstractI18nParserMojoprotected String loadRules(List<String> files)
protected String loadRulesFile(String fileRules)
throws IOException
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||