test_class.declarator: INPUT_FILE = new File("src/test/resource/resfilter/pot/input.pot")
test_class.modifier: private static final
test_class.original_string: private static final File INPUT_FILE = new File("src/test/resource/resfilter/pot/input.pot");
test_class.type: File
test_class.var_name: INPUT_FILE
test_class.declarator: EXPECTED_WRITE_FILE = new File("src/test/resource/resfilter/pot/write-output.pot")
test_class.modifier: private static final
test_class.original_string: private static final File EXPECTED_WRITE_FILE = new File("src/test/resource/resfilter/pot/write-output.pot");
test_class.type: File
test_class.var_name: EXPECTED_WRITE_FILE
test_class.declarator: MERGE_INPUT_1_FILE = new File("src/test/resource/resfilter/pot/merge-input-1.pot")
test_class.modifier: private static final
test_class.original_string: private static final File MERGE_INPUT_1_FILE = new File("src/test/resource/resfilter/pot/merge-input-1.pot");
test_class.type: File
test_class.var_name: MERGE_INPUT_1_FILE
test_class.declarator: MERGE_INPUT_2_FILE = new File("src/test/resource/resfilter/pot/merge-input-2.pot")
test_class.modifier: private static final
test_class.original_string: private static final File MERGE_INPUT_2_FILE = new File("src/test/resource/resfilter/pot/merge-input-2.pot");
test_class.type: File
test_class.var_name: MERGE_INPUT_2_FILE
test_class.declarator: EXPECTED_MERGE_1_FILE = new File("src/test/resource/resfilter/pot/merge-output-1.pot")
test_class.modifier: private static final
test_class.original_string: private static final File EXPECTED_MERGE_1_FILE = new File("src/test/resource/resfilter/pot/merge-output-1.pot");
test_class.type: File
test_class.var_name: EXPECTED_MERGE_1_FILE
test_class.declarator: EXPECTED_MERGE_2_FILE = new File("src/test/resource/resfilter/pot/merge-output-2.pot")
test_class.modifier: private static final
test_class.original_string: private static final File EXPECTED_MERGE_2_FILE = new File("src/test/resource/resfilter/pot/merge-output-2.pot");
test_class.type: File
test_class.var_name: EXPECTED_MERGE_2_FILE
test_class.declarator: EXPECTED_INPUT_RES_LIST
test_class.modifier: private static final
test_class.original_string: private static final Collection<ResourceString> EXPECTED_INPUT_RES_LIST;
test_class.type: Collection<ResourceString>
test_class.var_name: EXPECTED_INPUT_RES_LIST
test_class.declarator: WRITE_BUNDLE
test_class.modifier: private static
test_class.original_string: private static LanguageBundle WRITE_BUNDLE;
test_class.type: LanguageBundle
test_class.var_name: WRITE_BUNDLE
test_class.declarator: MERGE_BUNDLE
test_class.modifier: private static
test_class.original_string: private static LanguageBundle MERGE_BUNDLE;
test_class.type: LanguageBundle
test_class.var_name: MERGE_BUNDLE
test_class.declarator: res = new POTResource()
test_class.modifier: private static final
test_class.original_string: private static final POTResource res = new POTResource();
test_class.type: POTResource
test_class.var_name: res
test_class.file: gp-res-filter/src/test/java/com/ibm/g11n/pipeline/resfilter/impl/POTResourceTest.java
test_class.identifier: POTResourceTest
test_case.body: @Test
      public void testParse() throws IOException, ResourceFilterException {
          assertTrue("The input test file <" + INPUT_FILE + "> does not exist.", INPUT_FILE.exists());
  
          try (InputStream is = new FileInputStream(INPUT_FILE)) {
              LanguageBundle bundle = res.parse(is, null);
              List<ResourceString> resStrList = new ArrayList<>(bundle.getResourceStrings());
              Collections.sort(resStrList, new ResourceStringComparator());
              assertEquals("ResourceStrings did not match.", EXPECTED_INPUT_RES_LIST, resStrList);
          }
      }
test_case.class_method_signature: POTResourceTest.testParse()
test_case.full_signature: @Test public void testParse()
test_case.identifier: testParse
test_case.invocations: assertTrue exists parse getResourceStrings sort assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testParse()
focal_class.declarator: CHAR_SET = "UTF-8"
focal_class.modifier: static final
focal_class.original_string: static final String CHAR_SET = "UTF-8";
focal_class.type: String
focal_class.var_name: CHAR_SET
focal_class.declarator: ENTRY_PREFIX_PATTERN = "^(msgid|msgstr).*"
focal_class.modifier: static final
focal_class.original_string: static final String ENTRY_PREFIX_PATTERN = "^(msgid|msgstr).*";
focal_class.type: String
focal_class.var_name: ENTRY_PREFIX_PATTERN
focal_class.declarator: UNTRANSLATED_STRING_PREFIX = "msgid "
focal_class.modifier: static final
focal_class.original_string: static final String UNTRANSLATED_STRING_PREFIX = "msgid ";
focal_class.type: String
focal_class.var_name: UNTRANSLATED_STRING_PREFIX
focal_class.declarator: UNTRANSLATED_PLURAL_STRING_PREFIX = "msgid_plural "
focal_class.modifier: static final
focal_class.original_string: static final String UNTRANSLATED_PLURAL_STRING_PREFIX = "msgid_plural ";
focal_class.type: String
focal_class.var_name: UNTRANSLATED_PLURAL_STRING_PREFIX
focal_class.declarator: TRANSLATED_STRING_PREFIX = "msgstr "
focal_class.modifier: static final
focal_class.original_string: static final String TRANSLATED_STRING_PREFIX = "msgstr ";
focal_class.type: String
focal_class.var_name: TRANSLATED_STRING_PREFIX
focal_class.declarator: TRANSLATED_PLURAL_STRING_PREFIX = "msgstr["
focal_class.modifier: static final
focal_class.original_string: static final String TRANSLATED_PLURAL_STRING_PREFIX = "msgstr[";
focal_class.type: String
focal_class.var_name: TRANSLATED_PLURAL_STRING_PREFIX
focal_class.declarator: TRANSLATED_PLURAL_0_STRING_PREFIX = "msgstr[0] "
focal_class.modifier: static final
focal_class.original_string: static final String TRANSLATED_PLURAL_0_STRING_PREFIX = "msgstr[0] ";
focal_class.type: String
focal_class.var_name: TRANSLATED_PLURAL_0_STRING_PREFIX
focal_class.declarator: TRANSLATED_PLURAL_1_STRING_PREFIX = "msgstr[1] "
focal_class.modifier: static final
focal_class.original_string: static final String TRANSLATED_PLURAL_1_STRING_PREFIX = "msgstr[1] ";
focal_class.type: String
focal_class.var_name: TRANSLATED_PLURAL_1_STRING_PREFIX
focal_class.declarator: PLURAL_KEY_PREFIX = "{n} "
focal_class.modifier: static final
focal_class.original_string: static final String PLURAL_KEY_PREFIX = "{n} ";
focal_class.type: String
focal_class.var_name: PLURAL_KEY_PREFIX
focal_class.declarator: HEADER = "# Translations template for PROJECT.\n" + "# Copyright (C) %s ORGANIZATION\n"
              + "# This file is distributed under the same license as the " + "PROJECT project.\n"
              + "# FIRST AUTHOR <EMAIL@ADDRESS>, %s.\n" + "#\n" + "#, fuzzy\n" + "msgid \"\"\n" + "msgstr \"\"\n"
              + "\"Project-Id-Version: PROJECT VERSION\\n\"\n" + "\"Report-Msgid-Bugs-To: EMAIL@ADDRESS\\n\"\n"
              + "\"POT-Creation-Date: %s\\n\"\n" + "\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n"
              + "\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n" + "\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n"
              + "\"MIME-Version: 1.0\\n\"\n" + "\"Content-Type: text/plain; charset=%s\\n\"\n"
              + "\"Content-Transfer-Encoding: 8bit\\n\"\n" + "\"Generated-By: Globalization Pipeline\\n\"\n"
focal_class.modifier: static final
focal_class.original_string: static final String HEADER = "# Translations template for PROJECT.\n" + "# Copyright (C) %s ORGANIZATION\n"
              + "# This file is distributed under the same license as the " + "PROJECT project.\n"
              + "# FIRST AUTHOR <EMAIL@ADDRESS>, %s.\n" + "#\n" + "#, fuzzy\n" + "msgid \"\"\n" + "msgstr \"\"\n"
              + "\"Project-Id-Version: PROJECT VERSION\\n\"\n" + "\"Report-Msgid-Bugs-To: EMAIL@ADDRESS\\n\"\n"
              + "\"POT-Creation-Date: %s\\n\"\n" + "\"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\\n\"\n"
              + "\"Last-Translator: FULL NAME <EMAIL@ADDRESS>\\n\"\n" + "\"Language-Team: LANGUAGE <LL@li.org>\\n\"\n"
              + "\"MIME-Version: 1.0\\n\"\n" + "\"Content-Type: text/plain; charset=%s\\n\"\n"
              + "\"Content-Transfer-Encoding: 8bit\\n\"\n" + "\"Generated-By: Globalization Pipeline\\n\"\n";
focal_class.type: String
focal_class.var_name: HEADER
focal_class.file: gp-res-filter/src/main/java/com/ibm/g11n/pipeline/resfilter/impl/POTResource.java
focal_class.identifier: POTResource
focal_class.class_method_signature: POTResource.parse(InputStream inStream, FilterOptions options)
focal_class.full_signature: @Override public LanguageBundle parse(InputStream inStream, FilterOptions options)
focal_class.identifier: parse
focal_class.modifiers: @Override public
focal_class.parameters: (InputStream inStream, FilterOptions options)
focal_class.return: LanguageBundle
focal_class.signature: LanguageBundle parse(InputStream inStream, FilterOptions options)
focal_class.class_method_signature: POTResource.write(OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.full_signature: @Override public void write(OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.identifier: write
focal_class.modifiers: @Override public
focal_class.parameters: (OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.return: void
focal_class.signature: void write(OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.class_method_signature: POTResource.merge(InputStream baseStream, OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.full_signature: @Override public void merge(InputStream baseStream, OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.identifier: merge
focal_class.modifiers: @Override public
focal_class.parameters: (InputStream baseStream, OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.return: void
focal_class.signature: void merge(InputStream baseStream, OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.class_method_signature: POTResource.extractMessage(String firstLine, BufferedReader reader)
focal_class.full_signature: static String extractMessage(String firstLine, BufferedReader reader)
focal_class.identifier: extractMessage
focal_class.modifiers: static
focal_class.parameters: (String firstLine, BufferedReader reader)
focal_class.return: String
focal_class.signature: String extractMessage(String firstLine, BufferedReader reader)
focal_class.class_method_signature: POTResource.extractMsgBetweenQuotes(String line)
focal_class.full_signature: static String extractMsgBetweenQuotes(String line)
focal_class.identifier: extractMsgBetweenQuotes
focal_class.modifiers: static
focal_class.parameters: (String line)
focal_class.return: String
focal_class.signature: String extractMsgBetweenQuotes(String line)
focal_class.class_method_signature: POTResource.formatMessage(String prefix, String message, BreakIterator brkItr)
focal_class.full_signature: static String formatMessage(String prefix, String message, BreakIterator brkItr)
focal_class.identifier: formatMessage
focal_class.modifiers: static
focal_class.parameters: (String prefix, String message, BreakIterator brkItr)
focal_class.return: String
focal_class.signature: String formatMessage(String prefix, String message, BreakIterator brkItr)
focal_class.class_method_signature: POTResource.getHeader()
focal_class.full_signature: static String getHeader()
focal_class.identifier: getHeader
focal_class.modifiers: static
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String getHeader()
focal_class.superclass: extends ResourceFilter
focal_method.body: @Override
      public LanguageBundle parse(InputStream inStream, FilterOptions options)
              throws IOException, ResourceFilterException {
          BufferedReader reader = new BufferedReader(new InputStreamReader(inStream, CHAR_SET));
          LanguageBundleBuilder bb = new LanguageBundleBuilder(true);
          String line, value;
          while ((line = reader.readLine()) != null) {
              value = extractMessage(line, reader);
              if (value == null || value.isEmpty()) {
                  continue;
              }
  
              if (line.startsWith(UNTRANSLATED_STRING_PREFIX) || line.startsWith(UNTRANSLATED_PLURAL_STRING_PREFIX)) {
  
                  bb.addResourceString(value, value);
              }
          }
          return bb.build();
      }
focal_method.class_method_signature: POTResource.parse(InputStream inStream, FilterOptions options)
focal_method.full_signature: @Override public LanguageBundle parse(InputStream inStream, FilterOptions options)
focal_method.identifier: parse
focal_method.invocations: readLine extractMessage isEmpty startsWith startsWith addResourceString build
focal_method.modifiers: @Override public
focal_method.parameters: (InputStream inStream, FilterOptions options)
focal_method.return: LanguageBundle
focal_method.signature: LanguageBundle parse(InputStream inStream, FilterOptions options)