test_class.declarator: INPUT_FILE = new File("src/test/resource/resfilter/yml/input.yml")
test_class.modifier: private static final
test_class.original_string: private static final File INPUT_FILE = new File("src/test/resource/resfilter/yml/input.yml");
test_class.type: File
test_class.var_name: INPUT_FILE
test_class.declarator: EXPECTED_WRITE_FILE = new File("src/test/resource/resfilter/yml/write-output.yml")
test_class.modifier: @SuppressWarnings("unused")
      private static final
test_class.original_string: @SuppressWarnings("unused")
      private static final File EXPECTED_WRITE_FILE = new File("src/test/resource/resfilter/yml/write-output.yml");
test_class.type: File
test_class.var_name: EXPECTED_WRITE_FILE
test_class.declarator: EXPECTED_MERGE_FILE = new File("src/test/resource/resfilter/yml/merge-output.yml")
test_class.modifier: @SuppressWarnings("unused")
      private static final
test_class.original_string: @SuppressWarnings("unused")
      private static final File EXPECTED_MERGE_FILE = new File("src/test/resource/resfilter/yml/merge-output.yml");
test_class.type: File
test_class.var_name: EXPECTED_MERGE_FILE
test_class.declarator: EXPECTED_INPUT_RES_LIST
test_class.modifier: private static
test_class.original_string: private static 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: res = new YMLResource()
test_class.modifier: private static final
test_class.original_string: private static final YMLResource res = new YMLResource();
test_class.type: YMLResource
test_class.var_name: res
test_class.file: gp-res-filter/src/test/java/com/ibm/g11n/pipeline/resfilter/impl/YMLResourceTest.java
test_class.identifier: YMLResourceTest
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)) {
              @SuppressWarnings("unused")
              LanguageBundle bundle =  res.parse(is, null);
              // TODO: Not ready yet
              // assertEquals("ResourceStrings did not match.", EXPECTED_INPUT_RES_LIST, bundle.getResourceStrings());
          }
      }
test_case.class_method_signature: YMLResourceTest.testParse()
test_case.full_signature: @Test public void testParse()
test_case.identifier: testParse
test_case.invocations: assertTrue exists parse
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testParse()
focal_class.file: gp-res-filter/src/main/java/com/ibm/g11n/pipeline/resfilter/impl/YMLResource.java
focal_class.identifier: YMLResource
focal_class.class_method_signature: YMLResource.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: YMLResource.flattenMap(String prefix, Map<String, Object> map, Map<String, String> resource,
              char separator)
focal_class.full_signature: @SuppressWarnings("unchecked") private Map<String, String> flattenMap(String prefix, Map<String, Object> map, Map<String, String> resource,
              char separator)
focal_class.identifier: flattenMap
focal_class.modifiers: @SuppressWarnings("unchecked") private
focal_class.parameters: (String prefix, Map<String, Object> map, Map<String, String> resource,
              char separator)
focal_class.return: Map<String, String>
focal_class.signature: Map<String, String> flattenMap(String prefix, Map<String, Object> map, Map<String, String> resource,
              char separator)
focal_class.class_method_signature: YMLResource.write(OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.full_signature: @SuppressWarnings("unchecked") @Override public void write(OutputStream outStream, LanguageBundle languageBundle,
              FilterOptions options)
focal_class.identifier: write
focal_class.modifiers: @SuppressWarnings("unchecked") @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: YMLResource.writeFile(OutputStream writer, Map<String, Object> map, int depth)
focal_class.full_signature: @SuppressWarnings("unchecked") private void writeFile(OutputStream writer, Map<String, Object> map, int depth)
focal_class.identifier: writeFile
focal_class.modifiers: @SuppressWarnings("unchecked") private
focal_class.parameters: (OutputStream writer, Map<String, Object> map, int depth)
focal_class.return: void
focal_class.signature: void writeFile(OutputStream writer, Map<String, Object> map, int depth)
focal_class.superclass: extends ResourceFilter
focal_method.body: @Override
      public LanguageBundle parse(InputStream inStream, FilterOptions options)
              throws IOException, ResourceFilterException {
  
          char separator = '.';
  
          YAMLFactory yf = new YAMLFactory();
          ObjectMapper mapper = new ObjectMapper(yf);
          Map<String, Object> YAML_map = new LinkedHashMap<String, Object>();
  
          // Reads contents of YAML file and converts it to a hashmap
          YAML_map = mapper.readValue(inStream, new TypeReference<LinkedHashMap<String, Object>>() {
          });
  
          Map<String, String> resultMap = flattenMap("", YAML_map, new LinkedHashMap<String, String>(), separator);
  
          LanguageBundleBuilder bb = new LanguageBundleBuilder(true);
          for (Entry<String, String> entry : resultMap.entrySet()) {
              bb.addResourceString(entry.getKey(), entry.getValue());
          }
          return bb.build();
      }
focal_method.class_method_signature: YMLResource.parse(InputStream inStream, FilterOptions options)
focal_method.full_signature: @Override public LanguageBundle parse(InputStream inStream, FilterOptions options)
focal_method.identifier: parse
focal_method.invocations: readValue flattenMap entrySet addResourceString getKey getValue 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)