topic.removeItemIdentifier(srcloc);
@Override public void run() { TopicIF t = getTopic(); t.removeItemIdentifier(URILocator.create("x:source-locator")); this.objectId = t.getObjectId(); } });
/** * Removes the subject locator or a subject identifier from a topic. * * @param _value * value which is going to be removed from the topic. */ @Override public void removeValue(Topic topic, Object _value, LifeCycleListener listener) { TopicIF topicIf = topic.getTopicIF(); LocatorIF value = (_value instanceof LocatorIF ? (LocatorIF) _value : URILocator.create((String) _value)); if (value != null) { if (listener != null) listener.onBeforeRemove(topic, this, value); if (isSubjectLocator()) topicIf.removeSubjectLocator(value); else if (isItemIdentifier()) topicIf.removeItemIdentifier(value); else topicIf.removeSubjectIdentifier(value); } }
/** * Removes the subject locator or a subject identifier from a topic. * * @param _value * value which is going to be removed from the topic. */ @Override public void removeValue(Topic topic, Object _value, LifeCycleListener listener) { TopicIF topicIf = topic.getTopicIF(); LocatorIF value = (_value instanceof LocatorIF ? (LocatorIF) _value : URILocator.create((String) _value)); if (value != null) { if (listener != null) listener.onBeforeRemove(topic, this, value); if (isSubjectLocator()) topicIf.removeSubjectLocator(value); else if (isItemIdentifier()) topicIf.removeItemIdentifier(value); else topicIf.removeSubjectIdentifier(value); } }
if (iid.startsWith(base)) { if (AbstractTopicMapExporter.mayCollide(iid.substring(base.length() + 1))) topic.removeItemIdentifier(itemid); else { topic.removeItemIdentifier(itemid); String tmp = iid.substring(base.length()); topic.addItemIdentifier(new URILocator(origbase + tmp));
source.removeItemIdentifier(itemIdentifier);
public void testBug652a() { try { TopicIF topic = builder.makeTopic(); URILocator loc = new URILocator("http://www.ontopia.net/A"); topic.addItemIdentifier(loc); topic.addSubjectIdentifier(loc); topic.removeSubjectIdentifier(loc); topic.removeItemIdentifier(loc); topic.remove(); } catch (MalformedURLException e) { fail("(INTERNAL) bad URL given" + e); } }
public void testBug652b() { try { TopicIF topic = builder.makeTopic(); URILocator loc = new URILocator("http://www.ontopia.net/B"); topic.addSubjectIdentifier(loc); topic.addItemIdentifier(loc); topic.removeItemIdentifier(loc); topic.removeSubjectIdentifier(loc); topic.remove(); } catch (MalformedURLException e) { fail("(INTERNAL) bad URL given" + e); } }
assertTrue("topic not found by source locator", found.equals(topic)); topic.removeItemIdentifier(loc); found = (TopicIF)tm.getObjectByItemIdentifier(loc); assertTrue("topic found by source locator when it shouldn't be",
topic.removeItemIdentifier(topic_item_identifier);
bart.removeItemIdentifier(URILocator.create("x:source-locator")); afterTest();
topic1.removeItemIdentifier(srcloc);