Literals (query directive)
From WandoraWiki
Contents |
Description
Returns the strings provided to constructor. The returned rows have one column with the default role.
Constructor
Literals(String s1,...)
Notes
The from method present in every directive can be given strings instead of directives. In this case a Literals directive is implicitly from the strings. A.from("b","c","d") resolves to new From(A,new Literals("b","c","d")).
Examples
importPackage(org.wandora.query2); new If( new Exists(new Instances()), new Literals("has instances"), new Literals("no instances") )
This returns one of two literals depending on whether the input has instances.
Example below gets instances from the schema type topic. Literals is used implicitly.
importPackage(org.wandora.query2); new Instances().from("http://www.wandora.org/core/schema-type")