BaseName (query directive)
From WandoraWiki
		(Difference between revisions)
		
		
| Line 1: | Line 1: | ||
== Description ==  | == Description ==  | ||
| − | Gets the base name of the active column value of input.    | + | Gets the base name of the active column value of input. Returns null if the input doesn't have a base name.  | 
== Constructor ==  | == Constructor ==  | ||
Latest revision as of 13:10, 21 August 2009
[edit] Description
Gets the base name of the active column value of input. Returns null if the input doesn't have a base name.
[edit] Constructor
BaseName()
[edit] Examples
Following example gets the base names of the instances of the input topic.
importPackage(org.wandora.query2); new BaseName().from(new Instances())
Following example gets the base name of content type topic.
importPackage(org.wandora.query2);
new BaseName().from("http://www.wandora.org/core/contenttype")
Following example finds all topics in the topic map which do not have a base name.
importPackage(org.wandora.query2);
new BaseName().from(new AllTopics().as("#topic"))
.where("#DEFAULT","=",null)
Following example gets the base name of the input topic or the first subject identifier if it doesn't have a base name.
importPackage(org.wandora.query2);
new If(
  new BaseName().where("#DEFAULT","!=",null),
  new BaseName(),
  new First(new SubjectIdentifiers())
)