AllTopics (query directive)

From WandoraWiki
(Difference between revisions)
Jump to: navigation, search
 
 
Line 10: Line 10:
  
 
Note that retrieving all topics of a large topic map can be very costly operation in terms of time. Thus whenever possible, try to avoid using this directive. If you for example want all topics that are instances of some other topic, instead of using something like new AllTopics().where(new IsOfType(a)) use new Instances().from(a).  
 
Note that retrieving all topics of a large topic map can be very costly operation in terms of time. Thus whenever possible, try to avoid using this directive. If you for example want all topics that are instances of some other topic, instead of using something like new AllTopics().where(new IsOfType(a)) use new Instances().from(a).  
 +
 +
== Examples ==
 +
 +
importPackage(org.wandora.query2);
 +
new BaseName().from(new AllTopics().as("#topic"))
 +
.where("#DEFAULT","=",null)
 +
 +
This finds all topics in the topic map which do not have a base name.
  
 
[[Category:Query directives]]
 
[[Category:Query directives]]

Latest revision as of 11:14, 21 August 2009

Contents

[edit] Description

Returns all topics of the topic map.

[edit] Constructor

AllTopics()

[edit] Notes

Note that retrieving all topics of a large topic map can be very costly operation in terms of time. Thus whenever possible, try to avoid using this directive. If you for example want all topics that are instances of some other topic, instead of using something like new AllTopics().where(new IsOfType(a)) use new Instances().from(a).

[edit] Examples

importPackage(org.wandora.query2);
new BaseName().from(new AllTopics().as("#topic"))
.where("#DEFAULT","=",null)

This finds all topics in the topic map which do not have a base name.

Personal tools