当前位置 : 主页 > 网络编程 > 其它编程 >

net.ontopia.topicmaps.core.VariantNameIF.addTheme()方法的使用及代码示例

来源:互联网 收集:自由互联 发布时间:2023-07-02
本文整理了Java中net.ontopia.topicmaps.core.VariantNameIF.addTheme()方法的一些代码示例,展示了Vari 本文整理了Java中net.ontopia.topicmaps.core.VariantNameIF.addTheme()方法的一些代码示例,展示了VariantNameI
本文整理了Java中net.ontopia.topicmaps.core.VariantNameIF.addTheme()方法的一些代码示例,展示了Vari

本文整理了Java中net.ontopia.topicmaps.core.VariantNameIF.addTheme()方法的一些代码示例,展示了VariantNameIF.addTheme()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。VariantNameIF.addTheme()方法的具体详情如下:包路径:net.ontopia.topicmaps.core.VariantNameIF类名称:VariantNameIF方法名:addTheme

VariantNameIF.addTheme介绍

暂无

代码示例

代码示例来源:origin: net.ontopia/ontopia-webed

public void perform(ActionParametersIF params, ActionResponseIF response) { //test params ActionSignature paramsType = ActionSignature.getSignature("b t?"); paramsType.validateArguments(params, this); TopicNameIF basename = (TopicNameIF) params.get(0); Collection themes = params.getCollection(1); String value = params.getStringValue().trim(); TopicMapBuilderIF builder = basename.getTopicMap().getBuilder(); // do not create variant with empty string value if (value == null || value.equals("")) return; // create new (internal) variant for base name VariantNameIF variant = builder.makeVariantName(basename, value); // set scope, if provided if (themes != null) { Iterator it = themes.iterator(); while (it.hasNext()) variant.addTheme((TopicIF) it.next()); } }}

代码示例来源:origin: net.ontopia/ontopia-webed

Iterator it = themes.iterator();while (it.hasNext()) variant.addTheme((TopicIF) it.next());

代码示例来源:origin: ontopia/ontopia

public void testVariantRemovalWithScope() { TopicIF theme1 = builder.makeTopic(); TopicIF theme2 = builder.makeTopic(); TopicIF topic = builder.makeTopic(); TopicNameIF bn = builder.makeTopicName(topic, ""); VariantNameIF vn = builder.makeVariantName(bn, "duplicate"); vn.addTheme(theme1); vn.addTheme(theme2); vn = builder.makeVariantName(bn, "duplicate"); vn.addTheme(theme1); vn.addTheme(theme2); DuplicateSuppressionUtils.removeDuplicates(bn); assertTrue("duplicate variant names were not removed", bn.getVariants().size() == 1);}

代码示例来源:origin: ontopia/ontopia

@Override public void run() { VariantNameIF vn = getVariantName(); TopicIF theme = builder.makeTopic(); this.data.put("scope", theme); vn.addTheme(theme); this.objectId = vn.getObjectId(); this.value = theme.getObjectId(); }});

代码示例来源:origin: ontopia/ontopia

vname.addTheme(scope);

代码示例来源:origin: ontopia/ontopia

public void testVariantName() { TopicIF sort = builder.makeTopic(); sort.addSubjectIdentifier(PSI.getXTMSort()); TopicNameIF bn1 = builder.makeTopicName(topic, "Name1"); VariantNameIF vn1 = builder.makeVariantName(bn1, "Sort name"); vn1.addTheme(sort); TopicNameIF bn2 = builder.makeTopicName(topic, "Name2"); TopicNameIF bn3 = builder.makeTopicName(topic, "Name3"); VariantNameIF vn2 = builder.makeVariantName(bn1, "Blecch"); StringifierIF sf = TopicStringifiers.getVariantNameStringifier(Collections.singleton(sort)); assertTrue("Stringifying topic gave wrong variant name", sf.toString(topic).equals("Sort name")); }}

代码示例来源:origin: ontopia/ontopia

public void testMergeVariantNameScopeUse() { try { TopicIF t1 = builder1.makeTopic(); TopicIF t2 = builder1.makeTopic(); TopicNameIF bn = builder1.makeTopicName(t1, ""); VariantNameIF vn = builder1.makeVariantName(bn, ""); vn.addTheme(t2); MergeUtils.mergeInto(t1, t2); assertTrue("variant name scope corrupted", vn.getScope().size() == 1); assertTrue("variant name theme replacement not done correctly", vn.getScope().contains(t1)); } catch (ConstraintViolationException e) { fail("merge of topics unaccountably failed" + e.getMessage()); }}

代码示例来源:origin: ontopia/ontopia

public void testDSDisplay() { TopicIF display = builder.makeTopic(); display.addSubjectIdentifier(PSI.getXTMDisplay()); TopicNameIF bn1 = builder.makeTopicName(topic, "Name1"); VariantNameIF vn1 = builder.makeVariantName(bn1, "Display name"); vn1.addTheme(display); TopicNameIF bn2 = builder.makeTopicName(topic, "Name2"); TopicNameIF bn3 = builder.makeTopicName(topic, "Name3"); VariantNameIF vn2 = builder.makeVariantName(bn1, "Blecch"); StringifierIF sf = TopicStringifiers.getDefaultStringifier(); assertTrue("Stringifying topic gave wrong display name", sf.toString(topic).equals("Display name"));}

代码示例来源:origin: ontopia/ontopia

!ix.usedAsVariantTheme(theme2));scoped1.addTheme(theme1);scoped2.addTheme(theme2);scoped3.addTheme(theme1);scoped3.addTheme(theme2);

代码示例来源:origin: ontopia/ontopia

public void testSSSort() { TopicIF sort = builder.makeTopic(); sort.addSubjectIdentifier(PSI.getXTMSort()); TopicNameIF bn1 = builder.makeTopicName(topic, "Name1"); VariantNameIF vn1 = builder.makeVariantName(bn1, "Sort name"); vn1.addTheme(sort); TopicNameIF bn2 = builder.makeTopicName(topic, "Name2"); TopicNameIF bn3 = builder.makeTopicName(topic, "Name3"); VariantNameIF vn2 = builder.makeVariantName(bn1, "Blecch"); StringifierIF sf = TopicStringifiers.getSortNameStringifier(); assertTrue("Stringifying topic gave wrong sort name", sf.toString(topic).equals("Sort name"));}

代码示例来源:origin: ontopia/ontopia

basename1.addTheme(topicWriter);VariantNameIF variant1A = builder.makeVariantName(basename1, "Hillern, Wilhelmine");variant1A.addTheme(topicSort);basename2.addTheme(topicWriter);VariantNameIF variant2A = builder.makeVariantName(basename2, "Daudet, Alphonse");variant2A.addTheme(topicSort);basename3.addTheme(topicPlay);VariantNameIF variant3A = builder.makeVariantName(basename3, "Trovador");variant3A.addTheme(topicSort);basename4.addTheme(topicPlay);VariantNameIF variant4A = builder.makeVariantName(basename4, "Merry Wives of Windsor");variant4A.addTheme(topicSort);basename5A.addTheme(topicPlay);VariantNameIF variant5A = builder.makeVariantName(basename5A, "Jungfrau von Orleans");variant5A.addTheme(topicSort);variant5C.addTheme(topicPlay);

代码示例来源:origin: ontopia/ontopia

theme.addSubjectIdentifier(PSI.getXTMSort());builder2.makeTopicName(theme, "Sort name");vn.addTheme(theme);

代码示例来源:origin: ontopia/ontopia

String bn_oid = bn.getObjectId();VariantNameIF ivn = builder.makeVariantName(bn, vnval);ivn.addTheme(theme);VariantNameIF evn = builder.makeVariantName(bn, vnloc);String ivn_oid = ivn.getObjectId();

代码示例来源:origin: ontopia/ontopia

vn.addTheme(vn_theme);

代码示例来源:origin: ontopia/ontopia

vn.addTheme(other);afterTest();【文章转自迪拜服务器 http://www.558idc.com/dibai.html处的文章,转载请说明出处】

上一篇:【CTO变形记】驱动力的选择
下一篇:没有了
网友评论