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

    Fields inherited from class org.nuiton.i18n.plugin.parser.AbstractFileParser

    acceptKeyPattern
  • 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.String extract​(java.lang.String i18nString)
    Fonction d'extraction de la chaine
    protected org.w3c.dom.Document fileToDocument​(java.io.File fileToProcess)  
    void parseFile​(java.io.File file)
    Parse sur un fichier
    void parseLine​(java.io.File file, java.lang.String key)
    Parse une partie du fichier
    java.io.File prepareFile​(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

    Methods inherited from class java.lang.Object

    clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.IOException
      To prepare the file (if any thing to be done before scanning it).
      Overrides:
      prepareFile in class AbstractFileParser
      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.IOException
      Description copied from interface: FileParser
      Parse 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.IOException
      Description copied from interface: FileParser
      Parse une partie du fichier
      Parameters:
      file - le fichier à parser
      key - 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.SAXException
      java.io.IOException