@Test public void testMergedInReifiedTopicMap() throws IOException { TopicMapIF tm = read("tmreify-mergemap.ltm"); Assert.assertTrue("Source locator of merged-in TM applied to master TM", tm.getItemIdentifiers().isEmpty()); }
@Override protected TopicMapIF read(TopicMapStoreFactoryIF store_factory) throws IOException { TopicMapStoreIF store = store_factory.createStore(); TopicMapIF topicmap = store.getTopicMap(); if ((store instanceof net.ontopia.topicmaps.impl.utils.AbstractTopicMapStore) && store.getBaseAddress() == null) ((net.ontopia.topicmaps.impl.utils.AbstractTopicMapStore)store) .setBaseAddress(getBaseAddress()); try (Reader reader = makeReader((String) null, new LTMEncodingSniffer())) { LTMLexer lexer = new LTMLexer(reader); LTMParser parser = new LTMParser(lexer); parser.setBase(getBaseAddress()); parser.setTopicMap(topicmap); 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.resolveAssociations1(topicmap); return topicmap; }
LTMTopicMapReader extends AbstractTopicMapReader { @Override protected TopicMapIF read(TopicMapStoreFactoryIF store_factory) throws IOException { TopicMapStoreIF store = store_factory.createStore(); TopicMapIF topicmap = store.getTopicMap(); if ((store instanceof net.ontopia.topicmaps.impl.utils.AbstractTopicMapStore) && store.getBaseAddress() == null) ((net.ontopia.topicmaps.impl.utils.AbstractTopicMapStore)store) .setBaseAddress(getBaseAddress()); try (Reader reader = makeReader((String) null, new LTMEncodingSniffer())) { LTMLexer lexer = new LTMLexer(reader); LTMParser parser = new LTMParser(lexer); parser.setBase(getBaseAddress()); parser.setTopicMap(topicmap); 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.resolveAssociations1(topicmap); return topicmap; } }
LTMTopicMapReader extends AbstractTopicMapReader { @Override protected TopicMapIF read(TopicMapStoreFactoryIF store_factory) throws IOException { TopicMapStoreIF store = store_factory.createStore(); TopicMapIF topicmap = store.getTopicMap(); if ((store instanceof net.ontopia.topicmaps.impl.utils.AbstractTopicMapStore) && store.getBaseAddress() == null) ((net.ontopia.topicmaps.impl.utils.AbstractTopicMapStore)store) .setBaseAddress(getBaseAddress()); try (Reader reader = makeReader((String) null, new LTMEncodingSniffer())) { LTMLexer lexer = new LTMLexer(reader); LTMParser parser = new LTMParser(lexer); parser.setBase(getBaseAddress()); parser.setTopicMap(topicmap); 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.resolveAssociations1(topicmap); return topicmap; } LTMTopicMapReader(URL url);  LTMTopicMapReader(URL url, LocatorIF base_address);  LTMTopicMapReader(Reader reader, LocatorIF base_address);  LTMTopicMapReader(InputStream stream, LocatorIF base_address);  LTMTopicMapReader(File file); }
LTMTopicMapReader extends AbstractTopicMapReader { @Override protected TopicMapIF read(TopicMapStoreFactoryIF store_factory) throws IOException { TopicMapStoreIF store = store_factory.createStore(); TopicMapIF topicmap = store.getTopicMap(); if ((store instanceof net.ontopia.topicmaps.impl.utils.AbstractTopicMapStore) && store.getBaseAddress() == null) ((net.ontopia.topicmaps.impl.utils.AbstractTopicMapStore)store) .setBaseAddress(getBaseAddress()); try (Reader reader = makeReader((String) null, new LTMEncodingSniffer())) { LTMLexer lexer = new LTMLexer(reader); LTMParser parser = new LTMParser(lexer); parser.setBase(getBaseAddress()); parser.setTopicMap(topicmap); 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.resolveAssociations1(topicmap); return topicmap; } LTMTopicMapReader(URL url);  LTMTopicMapReader(URL url, LocatorIF base_address);  LTMTopicMapReader(Reader reader, LocatorIF base_address);  LTMTopicMapReader(InputStream stream, LocatorIF base_address);  LTMTopicMapReader(File file);  }
LTMTopicMapReader extends AbstractTopicMapReader { @Override protected TopicMapIF read(TopicMapStoreFactoryIF store_factory) throws IOException { TopicMapStoreIF store = store_factory.createStore(); TopicMapIF topicmap = store.getTopicMap(); if ((store instanceof net.ontopia.topicmaps.impl.utils.AbstractTopicMapStore) && store.getBaseAddress() == null) ((net.ontopia.topicmaps.impl.utils.AbstractTopicMapStore)store) .setBaseAddress(getBaseAddress()); try (Reader reader = makeReader((String) null, new LTMEncodingSniffer())) { LTMLexer lexer = new LTMLexer(reader); LTMParser parser = new LTMParser(lexer); parser.setBase(getBaseAddress()); parser.setTopicMap(topicmap); 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.resolveAssociations1(topicmap); return topicmap; } LTMTopicMapReader(URL url);  LTMTopicMapReader(URL url, LocatorIF base_address);  LTMTopicMapReader(Reader reader, LocatorIF base_address);  LTMTopicMapReader(InputStream stream, LocatorIF base_address);  LTMTopicMapReader(File file);   }