org.nuiton.i18n.plugin.parser.impl
Class ParserValidation

java.lang.Object
  extended by org.apache.maven.plugin.AbstractMojo
      extended by org.nuiton.i18n.plugin.AbstractI18nPlugin
          extended by org.nuiton.i18n.plugin.parser.AbstractI18nParser
              extended by org.nuiton.i18n.plugin.parser.impl.ParserXml
                  extended by org.nuiton.i18n.plugin.parser.impl.ParserValidation
All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo, Parser

public class ParserValidation
extends ParserXml

Récupération des chaine à traduire depuis les fichiers xml de validation.

Le goal doit etre execute avant que les resources soient copiees dans target/classes pour rendre operatne le file updater (sinon lesfichiers sont toujours a jour...)

Author:
chemit

Field Summary
protected  java.io.File cp
          Where jaxx files should have been generated.
protected  java.io.File defaultBasedir
          default src for an entry.
protected  java.lang.String defaultIncludes
          Source entries (src+includes+excludes) .
protected  java.lang.String rulesValidation
          Regles xml.
protected  boolean useLocalResolver
          Always use the local xowrks dtd to increase performance.
static java.lang.String XWORK_PUBLIC_ID
           
 
Fields inherited from class org.nuiton.i18n.plugin.parser.impl.ParserXml
BUFFER_SIZE, builder, factory, rules, xpath
 
Fields inherited from class org.nuiton.i18n.plugin.parser.AbstractI18nParser
entries, fileTreated, oldLanguage, oldParser, result, safeMode, showTouchedFiles, t0, touchFile, treadedFiles, treateDefaultEntry
 
Fields inherited from class org.nuiton.i18n.plugin.AbstractI18nPlugin
artifactId, bundles, DIRECTORY_INSTALL, encoding, events, genSrc, keepBackup, keysModifier, locales, out, silent, src, strictMode, verbose, verboseLog
 
Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
 
Constructor Summary
ParserValidation()
           
 
Method Summary
 java.lang.String extract(java.lang.String i18nString)
          Fonction d'extraction de la chaine
protected  java.lang.String getCoreFileRules()
           
 java.io.File getDefaultBasedir()
           
 java.lang.String[] getDefaultExcludes()
           
 java.lang.String[] getDefaultIncludes()
           
 org.xml.sax.EntityResolver getEntityResolver()
           
protected  java.lang.String getFileRules()
           
protected  java.lang.String getKeyModifierEnd()
           
protected  java.lang.String getKeyModifierStart()
           
protected  java.lang.String getOutGetter()
           
 FileUpdater newFileUpdater(SourceEntry entry)
           
 
Methods inherited from class org.nuiton.i18n.plugin.parser.impl.ParserXml
getSystemId, init, parseFile, parseLine
 
Methods inherited from class org.nuiton.i18n.plugin.parser.AbstractI18nParser
addDefaultEntry, execute, isStrictMode, parse, parseEntry, saveGetterFile
 
Methods inherited from class org.nuiton.i18n.plugin.AbstractI18nPlugin
addGetter, addParserEvent, backupFile, checkBundle, copyFile, getArtifactId, getGetterFile, getGetterFileBackup, getI18nFile, getI18nFileBackup, getVerboseLog, needGeneration, removeParserEvent
 
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
 

Field Detail

XWORK_PUBLIC_ID

public static final java.lang.String XWORK_PUBLIC_ID
See Also:
Constant Field Values

defaultIncludes

protected java.lang.String defaultIncludes
Source entries (src+includes+excludes) .


cp

protected java.io.File cp
Where jaxx files should have been generated.


rulesValidation

protected java.lang.String rulesValidation
Regles xml.


defaultBasedir

protected java.io.File defaultBasedir
default src for an entry.


useLocalResolver

protected boolean useLocalResolver
Always use the local xowrks dtd to increase performance.

Since:
1.6.0
Constructor Detail

ParserValidation

public ParserValidation()
Method Detail

getDefaultIncludes

public java.lang.String[] getDefaultIncludes()
Specified by:
getDefaultIncludes in class AbstractI18nParser
Returns:
the default includes to add to directory scanner

getDefaultExcludes

public java.lang.String[] getDefaultExcludes()
Specified by:
getDefaultExcludes in class AbstractI18nParser
Returns:
the default excludes to add to directory scanner

getDefaultBasedir

public java.io.File getDefaultBasedir()
Overrides:
getDefaultBasedir in class ParserXml
Returns:
the default src directory to use in directory scanner

newFileUpdater

public FileUpdater newFileUpdater(SourceEntry entry)
Specified by:
newFileUpdater in class AbstractI18nParser

getOutGetter

protected java.lang.String getOutGetter()
Specified by:
getOutGetter in class AbstractI18nParser
Returns:
the outGetter to use for the instance (java.getter,...)

getKeyModifierStart

protected java.lang.String getKeyModifierStart()
Specified by:
getKeyModifierStart in class AbstractI18nParser
Returns:
the starting regex expression to catch keys in key modifier

getKeyModifierEnd

protected java.lang.String getKeyModifierEnd()
Specified by:
getKeyModifierEnd in class AbstractI18nParser
Returns:
the ending regex expression to catch keys in key modifier

getFileRules

protected java.lang.String getFileRules()
Specified by:
getFileRules in class ParserXml
Returns:
le fichier des rules

getCoreFileRules

protected java.lang.String getCoreFileRules()
Specified by:
getCoreFileRules in class ParserXml
Returns:
le fichier des rules de base à toujours charger

extract

public java.lang.String extract(java.lang.String i18nString)
Description copied from class: ParserXml
Fonction d'extraction de la chaine

Specified by:
extract in class ParserXml
Parameters:
i18nString - le clef i18n
Returns:
la chaine

getEntityResolver

public org.xml.sax.EntityResolver getEntityResolver()
Overrides:
getEntityResolver in class ParserXml


Copyright © 2007-2009 CodeLutin. All Rights Reserved.