Namespace namespace = token.getNamespace();
Enumeration stores = namespace.enumerateScopes();
this.slideUri = token.getSlideContext();
this.topLevelQueryScope = queryScope;
String slideScope = slideUri.getSlidePath(queryScope.getHref());
Scope topScope = new Scope (slideScope);
Set ex = queryScope.getExcludedScopes();
int size = ex.size();
Scope [] excludedScopes = new Scope [size] ;
Iterator it = ex.iterator();
for (int i = 0; i < size; i++) {
String href = (String)it.next();
excludedScopes [i] = new Scope (slideUri.getSlidePath(href));
}
this.queryTree = new QueryTree (stores, topScope, excludedScopes);
it = queryTree.iterator();
while (it.hasNext()) {
Scope sScope = (Scope)it.next();
// System.out.println("createEnvelope for scope " + sScope);
BasicQueryImpl query = createSubQuery (namespace, sScope.toString(), token);
subQueries.put (sScope, query);
}
topLevelQuery = (BasicQueryImpl) subQueries.get (topScope);
}