test_class.declarator: testdataDirectory = "nav2"
test_class.modifier: private final static
test_class.original_string: private final static String testdataDirectory = "nav2";
test_class.type: String
test_class.var_name: testdataDirectory
test_class.file: ontopia-navigator/src/test/java/net/ontopia/topicmaps/nav2/utils/ModuleReaderTest.java
test_class.identifier: ModuleReaderTest
test_case.body: @Test
    public void testEncrypted() throws IOException, SAXException {
      String inpFile = TestFileUtils.getTestInputFile(testdataDirectory, "functions", "encryptedTest.jsm");
      ModuleReaderIF modReader = new ModuleReader(true);
      Map funcs = modReader.read(StreamUtils.getInputStream(inpFile));
  
      Assert.assertTrue("Could not retrieve correct number of functions from encrypted module file",
                 funcs.size() == 1);
      
      Assert.assertTrue("Could not retrieve function 'names' from encrypted module file",
                 funcs.containsKey("names"));
      
      Assert.assertTrue("Object is not instance of FunctionIF.",
                 funcs.get("names") instanceof FunctionIF); 
    }
test_case.class_method_signature: ModuleReaderTest.testEncrypted()
test_case.full_signature: @Test public void testEncrypted()
test_case.identifier: testEncrypted
test_case.invocations: getTestInputFile read getInputStream assertTrue size assertTrue containsKey assertTrue get
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEncrypted()
focal_class.declarator: logger =
      LoggerFactory.getLogger(ModuleReader.class.getName())
focal_class.modifier: private static
focal_class.original_string: private static Logger logger =
      LoggerFactory.getLogger(ModuleReader.class.getName());
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: encrypted
focal_class.modifier: protected
focal_class.original_string: protected boolean encrypted;
focal_class.type: boolean
focal_class.var_name: encrypted
focal_class.declarator: parser
focal_class.modifier: protected
focal_class.original_string: protected XMLReader parser;
focal_class.type: XMLReader
focal_class.var_name: parser
focal_class.file: ontopia-navigator/src/main/java/net/ontopia/topicmaps/nav2/utils/ModuleReader.java
focal_class.identifier: ModuleReader
focal_class.interfaces: implements ModuleReaderIF
focal_class.class_method_signature: ModuleReader.ModuleReader(boolean encrypted)
focal_class.full_signature: public  ModuleReader(boolean encrypted)
focal_class.identifier: ModuleReader
focal_class.modifiers: public
focal_class.parameters: (boolean encrypted)
focal_class.signature:  ModuleReader(boolean encrypted)
focal_class.class_method_signature: ModuleReader.read(InputStream source)
focal_class.full_signature: @Override public Map read(InputStream source)
focal_class.identifier: read
focal_class.modifiers: @Override public
focal_class.parameters: (InputStream source)
focal_class.return: Map
focal_class.signature: Map read(InputStream source)
focal_class.class_method_signature: ModuleReader.getXMLParser()
focal_class.full_signature: protected XMLReader getXMLParser()
focal_class.identifier: getXMLParser
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: XMLReader
focal_class.signature: XMLReader getXMLParser()
focal_method.body: @Override
    public Map read(InputStream source) throws IOException, SAXException {
      logger.debug("Start to read in module.");
      parser = getXMLParser();
      ModuleContentHandler handler = new ModuleContentHandler();
      handler.register(parser);
      InputSource inpsrc = new InputSource();
      if (encrypted)
        inpsrc.setByteStream(new EncryptedInputStream(source));
      else
        inpsrc.setByteStream(source);
      
      try {
        parser.parse(inpsrc);
      } catch (SAXParseException e) {
        throw new SAXException(e.getLineNumber() + ":" +
                               e.getColumnNumber() + ": " +
                               e.getMessage());
      }
  
      return handler.getFunctions();
    }
focal_method.class_method_signature: ModuleReader.read(InputStream source)
focal_method.full_signature: @Override public Map read(InputStream source)
focal_method.identifier: read
focal_method.invocations: debug getXMLParser register setByteStream setByteStream parse getLineNumber getColumnNumber getMessage getFunctions
focal_method.modifiers: @Override public
focal_method.parameters: (InputStream source)
focal_method.return: Map
focal_method.signature: Map read(InputStream source)