public ResourceSet query( String query ) throws XMLDBException { if ( !( query.startsWith( "document(" ) || query.startsWith( "collection(" ) ) ) { if ( collection.getName().equals( "/db" ) || collection.getName().equals( "/" ) ) query = "document(*)" + query; else query = "collection('" + collection.getPath() + "')" + query; } return doQuery( query, null, null ); }
public ResourceSet query(String query) throws XMLDBException { return query(query, null); }
    public ResourceSet query( String query ) throws XMLDBException {        if ( !( query.startsWith( "document(" ) || query.startsWith( "collection(" ) ) ) {            if ( collection.getName().equals( "/db" ) ||                collection.getName().equals( "/" ) )                query = "document(*)" + query;            else                query = "collection('" + collection.getPath() + "')" + query;        }        return doQuery( query, null, null );    }