Class SimpleTB


  • public class SimpleTB
    extends Object
    Very basic memory-only simple termbase. This is used for prototyping the terminology interface.
    • Method Detail

      • initialize

        public void initialize​(boolean stringSearch,
                               boolean betweenCodes)
      • guessAndImport

        public void guessAndImport​(File file)
      • importTBX

        public void importTBX​(File file)
      • importCSV

        public void importCSV​(File file)
      • importTSV

        public void importTSV​(File file)
      • removeAll

        public void removeAll()
      • isValidMatch

        public static boolean isValidMatch​(StringBuilder text,
                                           String stringToMatch,
                                           Range location,
                                           boolean betweenCodes)
        Searches for a given string in a text. The location parameter is updated with the position of the first character and the one of the character after the last one.
        Parameters:
        text - Text where to search the strings.
        stringToMatch - the string to search for.
        location - location of the term.
        Returns:
        true if it's a match, false otherwise. If the return is true, the values in location are updated.
      • save

        public void save​(String path)
      • load

        public void load​(String path)