{
selSet=selSetList.get(0);
}
else
{
selSet=new AndDocIdSet(selSetList);
}
}
}
DocIdSet notSelSet=null;
if (notSelectionNodes!=null && notSelectionNodes.length > 0)
{
ArrayList<DocIdSet> notSelSetList=new ArrayList<DocIdSet>(notSelectionNodes.length);
for (SelectionNode selectionNode : notSelectionNodes)
{
DocIdSet ds=selectionNode.getDocSet();
if (ds!=null)
{
notSelSetList.add(ds);
}
if (notSelSetList.size()>0)
{
if (notSelSetList.size()==1)
{
notSelSet=notSelSetList.get(0);
}
else
{
notSelSet=new OrDocIdSet(notSelSetList);
}
}
}
}
if (notSelSet!=null)
{
notSelSet=new NotDocIdSet(notSelSet,maxDoc);
}
if (selSet!=null && notSelSet!=null)
{
DocIdSet[] sets=new DocIdSet[]{selSet,notSelSet};
docSet=new AndDocIdSet(Arrays.asList(sets));
}
else if (selSet!=null)
{
docSet=selSet;
}