test_class.declarator: templatesParser
test_class.modifier: private
test_class.original_string: private TemplatesParser templatesParser;
test_class.type: TemplatesParser
test_class.var_name: templatesParser
test_class.file: everrest-core/src/test/java/org/everrest/core/impl/provider/TemplatesParserTest.java
test_class.identifier: TemplatesParserTest
test_case.body: @Test
      public void parsesGivenSourceToTemplates() throws Exception {
          try (InputStream testXslResource = Thread.currentThread().getContextClassLoader().getResourceAsStream("xslt/book.xsl")) {
              Source source = new StreamSource(testXslResource);
              Templates templates = templatesParser.parseTemplates(source);
              assertNotNull(templates);
          }
      }
test_case.class_method_signature: TemplatesParserTest.parsesGivenSourceToTemplates()
test_case.full_signature: @Test public void parsesGivenSourceToTemplates()
test_case.identifier: parsesGivenSourceToTemplates
test_case.invocations: getResourceAsStream getContextClassLoader currentThread parseTemplates assertNotNull
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void parsesGivenSourceToTemplates()
focal_class.declarator: resolver
focal_class.modifier: private
focal_class.original_string: private EntityResolver resolver;
focal_class.type: EntityResolver
focal_class.var_name: resolver
focal_class.file: everrest-core/src/main/java/org/everrest/core/impl/provider/TemplatesParser.java
focal_class.identifier: TemplatesParser
focal_class.class_method_signature: TemplatesParser.setResolver(EntityResolver resolver)
focal_class.full_signature: public void setResolver(EntityResolver resolver)
focal_class.identifier: setResolver
focal_class.modifiers: public
focal_class.parameters: (EntityResolver resolver)
focal_class.return: void
focal_class.signature: void setResolver(EntityResolver resolver)
focal_class.class_method_signature: TemplatesParser.parseTemplates(Source source)
focal_class.full_signature: public Templates parseTemplates(Source source)
focal_class.identifier: parseTemplates
focal_class.modifiers: public
focal_class.parameters: (Source source)
focal_class.return: Templates
focal_class.signature: Templates parseTemplates(Source source)
focal_class.class_method_signature: TemplatesParser.createFeaturedSaxTransformerFactory()
focal_class.full_signature: private SAXTransformerFactory createFeaturedSaxTransformerFactory()
focal_class.identifier: createFeaturedSaxTransformerFactory
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: SAXTransformerFactory
focal_class.signature: SAXTransformerFactory createFeaturedSaxTransformerFactory()
focal_method.body: public Templates parseTemplates(Source source) throws TransformerConfigurationException, SAXException, IOException {
          InputSource inputSource = SAXSource.sourceToInputSource(source);
          if (inputSource == null) {
              throw new RuntimeException("Unable convert to Input Source");
          }
  
          SAXTransformerFactory saxTransformerFactory = createFeaturedSaxTransformerFactory();
          TemplatesHandler templateHandler = saxTransformerFactory.newTemplatesHandler();
          XMLReader xmlReader = XMLReaderFactory.createXMLReader();
          if (resolver != null) {
              xmlReader.setEntityResolver(resolver);
          }
          xmlReader.setContentHandler(templateHandler);
  
          xmlReader.parse(inputSource);
  
          Templates templates = templateHandler.getTemplates();
          if (templates == null) {
              throw new RuntimeException("Unable create templates from given source");
          }
          return templates;
      }
focal_method.class_method_signature: TemplatesParser.parseTemplates(Source source)
focal_method.full_signature: public Templates parseTemplates(Source source)
focal_method.identifier: parseTemplates
focal_method.invocations: sourceToInputSource createFeaturedSaxTransformerFactory newTemplatesHandler createXMLReader setEntityResolver setContentHandler parse getTemplates
focal_method.modifiers: public
focal_method.parameters: (Source source)
focal_method.return: Templates
focal_method.signature: Templates parseTemplates(Source source)