Variant (query directive)

From WandoraWiki
Revision as of 13:11, 21 August 2009 by Olli (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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(String type,String 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