test_class.declarator: file
test_class.modifier: private final
test_class.original_string: private final File file;
test_class.type: File
test_class.var_name: file
test_class.declarator: locator
test_class.modifier: private final
test_class.original_string: private final URILocator locator;
test_class.type: URILocator
test_class.var_name: locator
test_class.file: ontopia-engine/src/test/java/net/ontopia/topicmaps/utils/ctm/CTMTopicMapReaderTest.java
test_class.identifier: CTMTopicMapReaderTest
test_case.body: @Test
    public void testReadFromInputStream() throws IOException {
      TopicMapIF tm = new CTMTopicMapReader(new FileInputStream(file), locator).read();
      Assert.assertNotNull(tm);
      Assert.assertEquals(1, tm.getTopics().size());
    }
test_case.class_method_signature: CTMTopicMapReaderTest.testReadFromInputStream()
test_case.full_signature: @Test public void testReadFromInputStream()
test_case.identifier: testReadFromInputStream
test_case.invocations: read assertNotNull assertEquals size getTopics
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testReadFromInputStream()
focal_class.file: ontopia-engine/src/main/java/net/ontopia/topicmaps/utils/ctm/CTMTopicMapReader.java
focal_class.identifier: CTMTopicMapReader
focal_class.class_method_signature: CTMTopicMapReader.CTMTopicMapReader(URL url)
focal_class.full_signature: public  CTMTopicMapReader(URL url)
focal_class.identifier: CTMTopicMapReader
focal_class.modifiers: public
focal_class.parameters: (URL url)
focal_class.signature:  CTMTopicMapReader(URL url)
focal_class.class_method_signature: CTMTopicMapReader.CTMTopicMapReader(URL url, LocatorIF base_address)
focal_class.full_signature: public  CTMTopicMapReader(URL url, LocatorIF base_address)
focal_class.identifier: CTMTopicMapReader
focal_class.modifiers: public
focal_class.parameters: (URL url, LocatorIF base_address)
focal_class.signature:  CTMTopicMapReader(URL url, LocatorIF base_address)
focal_class.class_method_signature: CTMTopicMapReader.CTMTopicMapReader(Reader reader, LocatorIF base_address)
focal_class.full_signature: public  CTMTopicMapReader(Reader reader, LocatorIF base_address)
focal_class.identifier: CTMTopicMapReader
focal_class.modifiers: public
focal_class.parameters: (Reader reader, LocatorIF base_address)
focal_class.signature:  CTMTopicMapReader(Reader reader, LocatorIF base_address)
focal_class.class_method_signature: CTMTopicMapReader.CTMTopicMapReader(InputStream stream, LocatorIF base_address)
focal_class.full_signature: public  CTMTopicMapReader(InputStream stream, LocatorIF base_address)
focal_class.identifier: CTMTopicMapReader
focal_class.modifiers: public
focal_class.parameters: (InputStream stream, LocatorIF base_address)
focal_class.signature:  CTMTopicMapReader(InputStream stream, LocatorIF base_address)
focal_class.class_method_signature: CTMTopicMapReader.CTMTopicMapReader(File file)
focal_class.full_signature: public  CTMTopicMapReader(File file)
focal_class.identifier: CTMTopicMapReader
focal_class.modifiers: public
focal_class.parameters: (File file)
focal_class.signature:  CTMTopicMapReader(File file)
focal_class.class_method_signature: CTMTopicMapReader.read(TopicMapStoreFactoryIF store_factory)
focal_class.full_signature: @Override protected TopicMapIF read(TopicMapStoreFactoryIF store_factory)
focal_class.identifier: read
focal_class.modifiers: @Override protected
focal_class.parameters: (TopicMapStoreFactoryIF store_factory)
focal_class.return: TopicMapIF
focal_class.signature: TopicMapIF read(TopicMapStoreFactoryIF store_factory)
focal_class.class_method_signature: CTMTopicMapReader.makeReader(InputStream stream, String encoding)
focal_class.full_signature: protected Reader makeReader(InputStream stream, String encoding)
focal_class.identifier: makeReader
focal_class.modifiers: protected
focal_class.parameters: (InputStream stream, String encoding)
focal_class.return: Reader
focal_class.signature: Reader makeReader(InputStream stream, String encoding)
focal_class.superclass: extends AbstractTopicMapReader
focal_method.body: @Override
    protected TopicMapIF read(TopicMapStoreFactoryIF store_factory)
        throws IOException {
      TopicMapStoreIF store = store_factory.createStore();
      TopicMapIF topicmap = store.getTopicMap();
  
      // Set base address on in-memory store
      if ((store instanceof net.ontopia.topicmaps.impl.utils.AbstractTopicMapStore) &&
          store.getBaseAddress() == null)
        ((net.ontopia.topicmaps.impl.utils.AbstractTopicMapStore)store)
            .setBaseAddress(getBaseAddress());
  
      // Parse!
      try (Reader reader = makeReader((String) null, new CTMEncodingSniffer())) {
        CTMLexer lexer = new CTMLexer(reader);
        lexer.setDocuri(getBaseAddress().getAddress());
        CTMParser parser = new CTMParser(lexer);
        parser.setBase(getBaseAddress());
        parser.setTopicMap(topicmap, null);
        parser.init();
        parser.topicmap();
        reader.close();
      } catch (AntlrWrapException ex) {
        throw (IOException) ex.getException();
      } catch (RecognitionException ex) {
        throw new IOException("Lexical error at " + getBaseAddress().getAddress()
            + ":" + ex.line + ":" + ex.column + ": "+ ex.getMessage());
      } catch (TokenStreamRecognitionException e) {
        RecognitionException ex = e.recog;
        throw new IOException("Lexical error at " + getBaseAddress().getAddress()
            + ":" + ex.line + ":" + ex.column + ": "+ ex.getMessage());
      } catch (TokenStreamIOException ex) {
        throw ex.io;
      } catch (TokenStreamException ex) {
        throw new IOException("Lexical error: " + ex.getMessage());
      } catch (java.io.CharConversionException e) {
        throw new IOException("Problem decoding character encoding."
                              + "Did you declare the right encoding?");
      }
  
      ClassInstanceUtils.resolveAssociations2(topicmap);
      return topicmap;
    }
focal_method.class_method_signature: CTMTopicMapReader.read(TopicMapStoreFactoryIF store_factory)
focal_method.full_signature: @Override protected TopicMapIF read(TopicMapStoreFactoryIF store_factory)
focal_method.identifier: read
focal_method.invocations: createStore getTopicMap getBaseAddress setBaseAddress getBaseAddress makeReader setDocuri getAddress getBaseAddress setBase getBaseAddress setTopicMap init topicmap close getException getAddress getBaseAddress getMessage getAddress getBaseAddress getMessage getMessage resolveAssociations2
focal_method.modifiers: @Override protected
focal_method.parameters: (TopicMapStoreFactoryIF store_factory)
focal_method.return: TopicMapIF
focal_method.signature: TopicMapIF read(TopicMapStoreFactoryIF store_factory)