Class AbstractParserXmlMojo.XmlFileParser
java.lang.Object
org.nuiton.i18n.plugin.parser.AbstractFileParser
org.nuiton.i18n.plugin.parser.impl.AbstractParserXmlMojo.XmlFileParser
- All Implemented Interfaces:
FileParser
- Enclosing class:
- AbstractParserXmlMojo
public abstract static class AbstractParserXmlMojo.XmlFileParser extends AbstractFileParser
-
Field Summary
-
Constructor Summary
Constructors Constructor Description XmlFileParser(org.apache.maven.plugin.logging.Log log, java.lang.String encoding, org.nuiton.io.SortedProperties oldParser, java.util.regex.Pattern acceptKeyPattern, boolean showTouchedFiles, java.lang.String rules, javax.xml.xpath.XPath xpath, javax.xml.parsers.DocumentBuilder builder, java.util.Map<java.lang.String,java.lang.String> namespaces, boolean verbose) -
Method Summary
Modifier and Type Method Description abstract java.lang.Stringextract(java.lang.String i18nString)Fonction d'extraction de la chaineprotected org.w3c.dom.DocumentfileToDocument(java.io.File fileToProcess)voidparseFile(java.io.File file)Parse sur un fichiervoidparseLine(java.io.File file, java.lang.String key)Parse une partie du fichierjava.io.FileprepareFile(java.io.File file)To prepare the file (if any thing to be done before scanning it).Methods inherited from class org.nuiton.i18n.plugin.parser.AbstractFileParser
destroy, finalize, getEncoding, getLog, getResult, isShowTouchedFiles, isTouched, registerKey, setTouched
-
Constructor Details
-
XmlFileParser
public XmlFileParser(org.apache.maven.plugin.logging.Log log, java.lang.String encoding, org.nuiton.io.SortedProperties oldParser, java.util.regex.Pattern acceptKeyPattern, boolean showTouchedFiles, java.lang.String rules, javax.xml.xpath.XPath xpath, javax.xml.parsers.DocumentBuilder builder, java.util.Map<java.lang.String,java.lang.String> namespaces, boolean verbose)
-
-
Method Details
-
extract
public abstract java.lang.String extract(java.lang.String i18nString)Fonction d'extraction de la chaine- Parameters:
i18nString- le clef i18n- Returns:
- la chaine
-
prepareFile
public java.io.File prepareFile(java.io.File file) throws java.io.IOExceptionTo prepare the file (if any thing to be done before scanning it).- Overrides:
prepareFilein classAbstractFileParser- Parameters:
file- the incoming file- Returns:
- the real file to process
- Throws:
java.io.IOException- if any IO problem while preparing file- Since:
- 2.0
-
parseFile
public void parseFile(java.io.File file) throws java.io.IOExceptionDescription copied from interface:FileParserParse sur un fichier- Parameters:
file- le fichier à parser- Throws:
java.io.IOException- if any pb
-
parseLine
public void parseLine(java.io.File file, java.lang.String key) throws java.io.IOExceptionDescription copied from interface:FileParserParse une partie du fichier- Parameters:
file- le fichier à parserkey- la ligne à parser- Throws:
java.io.IOException- if any pb
-
fileToDocument
protected org.w3c.dom.Document fileToDocument(java.io.File fileToProcess) throws org.xml.sax.SAXException, java.io.IOException- Throws:
org.xml.sax.SAXExceptionjava.io.IOException
-