Variant (query directive)

From WandoraWiki
Revision as of 15:35, 29 November 2013 by Olli (Talk | contribs)

Jump to: navigation, search

Description

Gets the variant name with the specified type and version from the active column value of input. Returns null if the input doesn't have the specified variant.

Constructor

Variant(TopicOperand type,TopicOperand version)

Examples

Following example gets variant names of the input topic in various languages and joins them all together.

importPackage(org.wandora.query2);
importPackage(org.wandora.topicmap);
new Join(
  new Variant(XTMPSI.DISPLAY,XTMPSI.getLang("en")).as("#en"),
  new Variant(XTMPSI.DISPLAY,XTMPSI.getLang("fi")).as("#fi"),
  new Variant(XTMPSI.DISPLAY,XTMPSI.getLang("se")).as("#se"),
  new Variant(XTMPSI.DISPLAY,XTMPSI.getLang("it")).as("#it")
)
Personal tools