@Override public void run() { VariantNameIF vn = getVariantName(); vn.addItemIdentifier(URILocator.create("x:source-locator")); this.objectId = vn.getObjectId(); } });
@Test public void testPreservesVariantnameID() throws IOException { prepareTopicMap(); TopicIF topic = builder.makeTopic(); TopicNameIF bn = builder.makeTopicName(topic, "bongomonog"); VariantNameIF vn = builder.makeVariantName(bn, "bongomonog"); vn.addItemIdentifier(sourceLoc); reload(); // get a topic with at least one name topic = null; for (Object obj : topicmap.getTopics()) { Collection<TopicNameIF> names = ((TopicIF) obj).getTopicNames(); if (names != null && names.size() > 0) { topic = (TopicIF) obj; break; } } Assert.assertNotNull("no topic found with a topic name after reload", topic); bn = (TopicNameIF) topic.getTopicNames().iterator().next(); check("variant name", (VariantNameIF) bn.getVariants().iterator().next()); }
vn.addItemIdentifier(vn_item_identifier);
vn.addItemIdentifier(URILocator.create("x:source-locator")); afterTest();