test_class.file: ontopia-engine/src/test/java/net/ontopia/topicmaps/impl/rdbms/RDBMSTopicMapReferenceTest.java
test_class.identifier: RDBMSTopicMapReferenceTest
test_case.body: @Test
    public void testSetBaseAddress() throws Exception {
      final LocatorIF NEW_BASE_ADDRESS = URILocator.create("foo:bar-" + System.currentTimeMillis());
  
      RDBMSTestFactory factory = new RDBMSTestFactory();
      RDBMSTopicMapReference before = (RDBMSTopicMapReference) factory.makeTopicMapReference();
      Assert.assertNotSame("Test reference already has base address '" + NEW_BASE_ADDRESS.getAddress() + "', cannot test for change", NEW_BASE_ADDRESS, before.getBaseAddress());
      before.setBaseAddress(NEW_BASE_ADDRESS);
      String referenceId = before.getId();
  
      factory = new RDBMSTestFactory(); // reload
      RDBMSTopicMapReference after = null;
      for (TopicMapReferenceIF i : factory.getSource().getReferences()) {
        if (referenceId.equals(i.getId())) { after = (RDBMSTopicMapReference) i; }
      }
      Assert.assertNotNull("Reference with id '" + referenceId + "' not found", after);
      Assert.assertEquals("Reference base address not changed correctly", NEW_BASE_ADDRESS, after.getBaseAddress());
    }
test_case.class_method_signature: RDBMSTopicMapReferenceTest.testSetBaseAddress()
test_case.full_signature: @Test public void testSetBaseAddress()
test_case.identifier: testSetBaseAddress
test_case.invocations: create currentTimeMillis makeTopicMapReference assertNotSame getAddress getBaseAddress setBaseAddress getId getReferences getSource equals getId assertNotNull assertEquals getBaseAddress
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testSetBaseAddress()
focal_class.declarator: EXHAUSED_BLOCK = "block"
focal_class.modifier: public static final
focal_class.original_string: public static final String EXHAUSED_BLOCK = "block";
focal_class.type: String
focal_class.var_name: EXHAUSED_BLOCK
focal_class.declarator: EXHAUSED_GROW = "grow"
focal_class.modifier: public static final
focal_class.original_string: public static final String EXHAUSED_GROW = "grow";
focal_class.type: String
focal_class.var_name: EXHAUSED_GROW
focal_class.declarator: EXHAUSED_FAIL = "fail"
focal_class.modifier: public static final
focal_class.original_string: public static final String EXHAUSED_FAIL = "fail";
focal_class.type: String
focal_class.var_name: EXHAUSED_FAIL
focal_class.declarator: log = LoggerFactory.getLogger(RDBMSTopicMapReference.class.getName())
focal_class.modifier: private static final
focal_class.original_string: private static final Logger log = LoggerFactory.getLogger(RDBMSTopicMapReference.class.getName());
focal_class.type: Logger
focal_class.var_name: log
focal_class.declarator: storage
focal_class.modifier: protected
focal_class.original_string: protected StorageIF storage;
focal_class.type: StorageIF
focal_class.var_name: storage
focal_class.declarator: topicmap_id
focal_class.modifier: protected
focal_class.original_string: protected long topicmap_id;
focal_class.type: long
focal_class.var_name: topicmap_id
focal_class.declarator: base_address
focal_class.modifier: protected
focal_class.original_string: protected LocatorIF base_address;
focal_class.type: LocatorIF
focal_class.var_name: base_address
focal_class.declarator: ofactory
focal_class.modifier: protected
focal_class.original_string: protected StorePoolableObjectFactory ofactory;
focal_class.type: StorePoolableObjectFactory
focal_class.var_name: ofactory
focal_class.declarator: pool
focal_class.modifier: protected
focal_class.original_string: protected GenericObjectPool pool;
focal_class.type: GenericObjectPool
focal_class.var_name: pool
focal_class.declarator: rostore
focal_class.modifier: protected
focal_class.original_string: protected RDBMSTopicMapStore rostore;
focal_class.type: RDBMSTopicMapStore
focal_class.var_name: rostore
focal_class.file: ontopia-engine/src/main/java/net/ontopia/topicmaps/impl/rdbms/RDBMSTopicMapReference.java
focal_class.identifier: RDBMSTopicMapReference
focal_class.class_method_signature: RDBMSTopicMapReference.RDBMSTopicMapReference(String _id, String _title, StorageIF _storage,
        long _topicmap_id, LocatorIF _base_address)
focal_class.full_signature: public  RDBMSTopicMapReference(String _id, String _title, StorageIF _storage,
        long _topicmap_id, LocatorIF _base_address)
focal_class.identifier: RDBMSTopicMapReference
focal_class.modifiers: public
focal_class.parameters: (String _id, String _title, StorageIF _storage,
        long _topicmap_id, LocatorIF _base_address)
focal_class.signature:  RDBMSTopicMapReference(String _id, String _title, StorageIF _storage,
        long _topicmap_id, LocatorIF _base_address)
focal_class.class_method_signature: RDBMSTopicMapReference._createStore(boolean readonly)
focal_class.full_signature: protected RDBMSTopicMapStore _createStore(boolean readonly)
focal_class.identifier: _createStore
focal_class.modifiers: protected
focal_class.parameters: (boolean readonly)
focal_class.return: RDBMSTopicMapStore
focal_class.signature: RDBMSTopicMapStore _createStore(boolean readonly)
focal_class.class_method_signature: RDBMSTopicMapReference.init()
focal_class.full_signature: protected void init()
focal_class.identifier: init
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void init()
focal_class.class_method_signature: RDBMSTopicMapReference.open()
focal_class.full_signature: @Override public synchronized void open()
focal_class.identifier: open
focal_class.modifiers: @Override public synchronized
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void open()
focal_class.class_method_signature: RDBMSTopicMapReference.createStore(boolean readonly)
focal_class.full_signature: @Override public synchronized TopicMapStoreIF createStore(boolean readonly)
focal_class.identifier: createStore
focal_class.modifiers: @Override public synchronized
focal_class.parameters: (boolean readonly)
focal_class.return: TopicMapStoreIF
focal_class.signature: TopicMapStoreIF createStore(boolean readonly)
focal_class.class_method_signature: RDBMSTopicMapReference.setTitle(String title)
focal_class.full_signature: @Override public void setTitle(String title)
focal_class.identifier: setTitle
focal_class.modifiers: @Override public
focal_class.parameters: (String title)
focal_class.return: void
focal_class.signature: void setTitle(String title)
focal_class.class_method_signature: RDBMSTopicMapReference.getBaseAddress()
focal_class.full_signature: public LocatorIF getBaseAddress()
focal_class.identifier: getBaseAddress
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: LocatorIF
focal_class.signature: LocatorIF getBaseAddress()
focal_class.class_method_signature: RDBMSTopicMapReference.setBaseAddress(LocatorIF base_address)
focal_class.full_signature: public void setBaseAddress(LocatorIF base_address)
focal_class.identifier: setBaseAddress
focal_class.modifiers: public
focal_class.parameters: (LocatorIF base_address)
focal_class.return: void
focal_class.signature: void setBaseAddress(LocatorIF base_address)
focal_class.class_method_signature: RDBMSTopicMapReference.close()
focal_class.full_signature: @Override public synchronized void close()
focal_class.identifier: close
focal_class.modifiers: @Override public synchronized
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: RDBMSTopicMapReference.clear()
focal_class.full_signature: @Override public synchronized void clear()
focal_class.identifier: clear
focal_class.modifiers: @Override public synchronized
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void clear()
focal_class.class_method_signature: RDBMSTopicMapReference.delete()
focal_class.full_signature: @Override public synchronized void delete()
focal_class.identifier: delete
focal_class.modifiers: @Override public synchronized
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void delete()
focal_class.class_method_signature: RDBMSTopicMapReference.toString()
focal_class.full_signature: @Override public String toString()
focal_class.identifier: toString
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String toString()
focal_class.class_method_signature: RDBMSTopicMapReference.getTopicMapId()
focal_class.full_signature: public long getTopicMapId()
focal_class.identifier: getTopicMapId
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: long
focal_class.signature: long getTopicMapId()
focal_class.class_method_signature: RDBMSTopicMapReference.storeClosed(TopicMapStoreIF store)
focal_class.full_signature: @Override public synchronized void storeClosed(TopicMapStoreIF store)
focal_class.identifier: storeClosed
focal_class.modifiers: @Override public synchronized
focal_class.parameters: (TopicMapStoreIF store)
focal_class.return: void
focal_class.signature: void storeClosed(TopicMapStoreIF store)
focal_class.class_method_signature: RDBMSTopicMapReference.writeReport(java.io.Writer out, boolean dumpCaches)
focal_class.full_signature: public void writeReport(java.io.Writer out, boolean dumpCaches)
focal_class.identifier: writeReport
focal_class.modifiers: public
focal_class.parameters: (java.io.Writer out, boolean dumpCaches)
focal_class.return: void
focal_class.signature: void writeReport(java.io.Writer out, boolean dumpCaches)
focal_class.superclass: extends AbstractTopicMapReference
focal_method.body: public void setBaseAddress(LocatorIF base_address) {
      this.base_address = base_address;
      TopicMapStoreIF store = null;
      try {
        store = createStore(false);
        TopicMap topicmap = (TopicMap) store.getTopicMap();
        topicmap.setBaseAddress(base_address);
        store.commit();
      } finally {
        if (store != null) {
          store.close();
        }
      }
    }
focal_method.class_method_signature: RDBMSTopicMapReference.setBaseAddress(LocatorIF base_address)
focal_method.full_signature: public void setBaseAddress(LocatorIF base_address)
focal_method.identifier: setBaseAddress
focal_method.invocations: createStore getTopicMap setBaseAddress commit close
focal_method.modifiers: public
focal_method.parameters: (LocatorIF base_address)
focal_method.return: void
focal_method.signature: void setBaseAddress(LocatorIF base_address)