Class Omission

java.lang.Object
overit.geocall.lang.Omission

public class Omission extends Object
This class implements the object that manages the storing of the missing translations.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Long
    The company ID for which the dictionary is written and the omissions are stored
    protected String
    The language with which the dictionary is written and the omissions are stored
    protected LinkedHashSet
    Maintains a list of string for which there isn't a translation.
    protected String
    The package for which the dictionary is written and the omissions are stored
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Omission(String lang, String pkg, Long factory)
    Creates the Omission, for the specific language, package and factory
  • Method Summary

    Modifier and Type
    Method
    Description
    static Omission
    get(String lang, String pkg, Long factory)
    Extracts the Omission starting from the language, the package and the factory
    Returns the company ID for which the omissions are stored
    Returns the language for which the omissions are stored
    Retuns a copy of the set of missing translations, keeping the insertion order
    static DBView
    Creates and returns a DBView that contains all the missing translations
    Returns the package for which the omissions are stored
    protected void
    Records a missing translation
    int
    Returns the number of missing translations

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • _lang

      protected String _lang
      The language with which the dictionary is written and the omissions are stored
    • _factory

      protected Long _factory
      The company ID for which the dictionary is written and the omissions are stored
    • _pkg

      protected String _pkg
      The package for which the dictionary is written and the omissions are stored
    • _omissionEntries

      protected LinkedHashSet _omissionEntries
      Maintains a list of string for which there isn't a translation. The @ characters are removed from the strings because they are not considered in dictionaries files
  • Constructor Details

    • Omission

      protected Omission(String lang, String pkg, Long factory)
      Creates the Omission, for the specific language, package and factory
      Parameters:
      lang - The specific language for which the dictionary is written and the omissions are stored
      pkg - The specific package for which the dictionary is written and the omissions are stored
      factory - The specific factory for which the dictionary is written and the omissions are stored
  • Method Details

    • get

      public static Omission get(String lang, String pkg, Long factory)
      Extracts the Omission starting from the language, the package and the factory
      Parameters:
      lang - The language
      pkg - The applicative package
      factory - The company ID
      Returns:
      The desired Omission instance
    • getLang

      public String getLang()
      Returns the language for which the omissions are stored
      Returns:
      The language value
    • getFactory

      public Long getFactory()
      Returns the company ID for which the omissions are stored
      Returns:
      The factory value
    • getPackage

      public String getPackage()
      Returns the package for which the omissions are stored
      Returns:
      The package value
    • getOmissionEntries

      public LinkedHashSet getOmissionEntries()
      Retuns a copy of the set of missing translations, keeping the insertion order
      Returns:
      A LinkedHashSet that is the copy of the set missing translations
    • size

      public int size()
      Returns the number of missing translations
      Returns:
      The number of missing translations, stored in the Omission object
    • logOmission

      protected void logOmission(String source)
      Records a missing translation
      Parameters:
      source - The string for which the translation is missing
    • getOmissionsDBView

      public static DBView getOmissionsDBView(Identity id, Lang lang)
      Creates and returns a DBView that contains all the missing translations
      Parameters:
      id - the Identity
      lang - the Lang
      Returns:
      The Omission's DBView, ie the view of all the omissions recorded