test_class.file: oak-search/src/test/java/org/apache/jackrabbit/oak/plugins/index/search/spi/binary/TikaParserConfigTest.java
test_class.identifier: TikaParserConfigTest
test_case.body: @Test
      public void emptyParser() throws Exception{
          String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" +
                  "<properties>\n" +
                  "  <detectors>\n" +
                  "    <detector class=\"org.apache.tika.detect.TypeDetector\"/>\n" +
                  "  </detectors>\n" +
                  "  <parsers>\n" +
                  "    <parser class=\"org.apache.tika.parser.DefaultParser\"/>\n" +
                  "    <parser class=\"org.apache.tika.parser.EmptyParser\">\n" +
                  "      <mime>application/x-archive</mime>\n" +
                  "      <mime>application/x-bzip</mime>\n" +
                  "    </parser>\n" +
                  "  </parsers>\n" +
                  "</properties>";
  
          Set<MediaType> types = TikaParserConfig.getNonIndexedMediaTypes(
                  new ReaderInputStream(new StringReader(xml), "UTF-8"));
          assertEquals(2, types.size());
          assertTrue(types.contains(MediaType.parse("application/x-archive")));
      }
test_case.class_method_signature: TikaParserConfigTest.emptyParser()
test_case.full_signature: @Test public void emptyParser()
test_case.identifier: emptyParser
test_case.invocations: getNonIndexedMediaTypes assertEquals size assertTrue contains parse
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void emptyParser()
focal_class.declarator: EMPTY_PARSER = "org.apache.tika.parser.EmptyParser"
focal_class.modifier: private static final
focal_class.original_string: private static final String EMPTY_PARSER = "org.apache.tika.parser.EmptyParser";
focal_class.type: String
focal_class.var_name: EMPTY_PARSER
focal_class.file: oak-search/src/main/java/org/apache/jackrabbit/oak/plugins/index/search/spi/binary/TikaParserConfig.java
focal_class.identifier: TikaParserConfig
focal_class.class_method_signature: TikaParserConfig.getNonIndexedMediaTypes(InputStream configStream)
focal_class.full_signature: public static Set<MediaType> getNonIndexedMediaTypes(InputStream configStream)
focal_class.identifier: getNonIndexedMediaTypes
focal_class.modifiers: public static
focal_class.parameters: (InputStream configStream)
focal_class.return: Set<MediaType>
focal_class.signature: Set<MediaType> getNonIndexedMediaTypes(InputStream configStream)
focal_class.class_method_signature: TikaParserConfig.parseMimeTypes(Set<MediaType> result, NodeList mimes)
focal_class.full_signature: private static void parseMimeTypes(Set<MediaType> result, NodeList mimes)
focal_class.identifier: parseMimeTypes
focal_class.modifiers: private static
focal_class.parameters: (Set<MediaType> result, NodeList mimes)
focal_class.return: void
focal_class.signature: void parseMimeTypes(Set<MediaType> result, NodeList mimes)
focal_class.class_method_signature: TikaParserConfig.getBuilder()
focal_class.full_signature: private static DocumentBuilder getBuilder()
focal_class.identifier: getBuilder
focal_class.modifiers: private static
focal_class.parameters: ()
focal_class.return: DocumentBuilder
focal_class.signature: DocumentBuilder getBuilder()
focal_method.body: public static Set<MediaType> getNonIndexedMediaTypes(InputStream configStream) throws
              TikaException, IOException, SAXException {
          Set<MediaType> result = new HashSet<>();
          Element element = getBuilder().parse(configStream).getDocumentElement();
          NodeList nodes = element.getElementsByTagName("parsers");
          if (nodes.getLength() == 1) {
              Node parentNode = nodes.item(0);
              NodeList parsersNodes = parentNode.getChildNodes();
              for (int i = 0; i < parsersNodes.getLength(); i++) {
                  Node node = parsersNodes.item(i);
                  if (node instanceof Element) {
                      String className = ((Element) node).getAttribute("class");
                      if (EMPTY_PARSER.equals(className)) {
                          NodeList mimes = ((Element) node).getElementsByTagName("mime");
                          parseMimeTypes(result, mimes);
                      }
                  }
              }
          }
          return result;
      }
focal_method.class_method_signature: TikaParserConfig.getNonIndexedMediaTypes(InputStream configStream)
focal_method.full_signature: public static Set<MediaType> getNonIndexedMediaTypes(InputStream configStream)
focal_method.identifier: getNonIndexedMediaTypes
focal_method.invocations: getDocumentElement parse getBuilder getElementsByTagName getLength item getChildNodes getLength item getAttribute equals getElementsByTagName parseMimeTypes
focal_method.modifiers: public static
focal_method.parameters: (InputStream configStream)
focal_method.return: Set<MediaType>
focal_method.signature: Set<MediaType> getNonIndexedMediaTypes(InputStream configStream)