public LocalResourceSet( User user, BrokerPool pool, LocalCollection col, Value val, boolean indentXML, String encoding, boolean saxDocumentEvents, boolean createContainerElements, boolean matchTagging, String sortExpr ) throws XMLDBException {
public LocalResourceSet( User user, BrokerPool pool, LocalCollection col ) { this.collection = col; this.brokerPool = pool;
    public LocalResourceSet( User user, BrokerPool pool, LocalCollection col,                              Value val,                             boolean indentXML, String encoding,                              boolean saxDocumentEvents,                              boolean createContainerElements,                             boolean matchTagging, String sortExpr )         throws XMLDBException {        this.user = user;        this.brokerPool = pool;        this.encoding = encoding;        this.collection = col;        this.indentXML = indentXML;        this.saxDocumentEvents = saxDocumentEvents;        this.createContainerElements = createContainerElements;        switch ( val.getType() ) {            case Value.isNodeList:                NodeSet resultSet = (NodeSet)val.getNodeList();                if(sortExpr != null) {                	SortedNodeSet sorted =                 		new SortedNodeSet(brokerPool, user, sortExpr);                	sorted.addAll(resultSet);                	resultSet = sorted;                }                NodeProxy p;                for ( Iterator i = resultSet.iterator();                    i.hasNext();  ) {                    p = (NodeProxy) i.next();                    if ( p == null )                        continue;                    resources.add( p );                }                break;            default:	        	ValueSet valueSet = val.getValueSet();	        	Value v;	        	for (int i = 0; i < valueSet.getLength(); i++) {	        		v = valueSet.get(i);	        		resources.add(v.getStringValue());	        	}	        	break;        }    }