Interface FileParser

All Known Implementing Classes:
AbstractFileParser, AbstractParserXmlMojo.XmlFileParser, ParserGWTJavaMojo.GWTJavaFileParser, ParserJavaMojo.JavaFileParser, ParserStruts2Mojo.Struts2JspFileParser

public interface FileParser
the contract of a i18n file parser.
Since:
1.2
Author:
Tony Chemit - chemit@codelutin.com
  • Method Summary

    Modifier and Type Method Description
    void destroy()
    clean file parser.
    java.lang.String getEncoding()
    Gets encoding used to read and write files.
    org.nuiton.io.SortedProperties getResult()
    TODO As we do not used anylonger old language, we should directly TODO use only a set of keys, no need to keep i18n value...
    boolean isTouched()  
    void parseFile​(java.io.File file)
    Parse sur un fichier
    void parseLine​(java.io.File file, java.lang.String line)
    Parse une partie du fichier
  • Method Details

    • getEncoding

      java.lang.String getEncoding()
      Gets encoding used to read and write files.
      Returns:
      the encoding
    • isTouched

      boolean isTouched()
      Returns:
      true if file was touched (says contains at least one i18n key)
    • getResult

      org.nuiton.io.SortedProperties getResult()
      TODO As we do not used anylonger old language, we should directly TODO use only a set of keys, no need to keep i18n value...
      Returns:
      the results of i18n keys found for the given file
    • parseFile

      void parseFile​(java.io.File file) throws java.io.IOException
      Parse sur un fichier
      Parameters:
      file - le fichier à parser
      Throws:
      java.io.IOException - if any pb
    • parseLine

      void parseLine​(java.io.File file, java.lang.String line) throws java.io.IOException
      Parse une partie du fichier
      Parameters:
      file - le fichier à parser
      line - la ligne à parser
      Throws:
      java.io.IOException - if any pb
    • destroy

      void destroy()
      clean file parser.