src/com/wherehoo/WHDataCollector.java
/**
     *Creates some <tt>WHOperation</tt>, based on the field settings of this <tt>WHDataCollector</tt>.  
     * @exception WHClientCommandException is thrown if field settings of this <tt>WHDataCollector</tt> are not 
     * consistent with what's needed to instantiate one of <tt>WHOperation</tt> objects.
     */
Creates some WHOperation, based on the field settings of this WHDataCollector.
@exception WHClientCommandException is thrown if field settings of this WHDataCollector are not
consistent with what's needed to instantiate one of WHOperation objects.
Creates some WHOperation based on the field settings of this WHDataCollector . @exception WHClientCommandException is thrown if field settings of this WHDataCollector are not consistent with what ' s needed to instantiate one of WHOperation objects .
public WHOperation createWHOperation() throws WHClientCommandException {
	if (very_verbose) 
	    System.out.println("Started to create WHOperation, about to check data");
	this.checkAndProcessData();
	if (verbose || very_verbose) 
	    System.out.println("Data check OK");
	if (act.equals("insert")){
	    WHInsertOperation whi= new WHInsertOperation(idt,ll_poly,height,data,time_interval,mimetype,protocol);
	    if (received.get(WHServer.MET))
		whi.setMeta(meta);
	    return whi;
	}
	else {
	    if (act.equals("query")){
		WHSearchArea search_area = new WHSearchArea(ll_poly,coordinates[0],height,heading);
		WHSearchOperation whq= new WHSearchOperation(search_area);
		if (received.get(WHServer.BEG))
		    whq.setBegin(time_interval.getBegin());
		if (received.get(WHServer.END))
		    whq.setEnd(time_interval.getEnd());
		if (received.get(WHServer.LIM))
		    whq.setLimit(limit);
		if (received.get(WHServer.MET))
		    whq.setMeta(meta);
		if (received.get(WHServer.MIM))
		    whq.setMimetype(mimetype);
		if (received.get(WHServer.PRO))
		    whq.setProtocol(protocol);
		return whq;
	    } 
	    else { 
		if (act.equals("count")){
		    WHSearchArea search_area = new WHSearchArea(ll_poly,coordinates[0],height,heading);
		    WHCountOperation whc= new WHCountOperation(search_area);
		    if (received.get(WHServer.BEG))
			whc.setBegin(time_interval.getBegin());
		    if (received.get(WHServer.END))
			whc.setEnd(time_interval.getEnd());
		    if (received.get(WHServer.LIM))
			whc.setLimit(limit);
		    if (received.get(WHServer.MET))
			whc.setMeta(meta);
		    if (received.get(WHServer.MIM))
			whc.setMimetype(mimetype);
		    if (received.get(WHServer.PRO))
			whc.setProtocol(protocol);
		    return whc;
		}    
		else 
		    return new WHDeleteOperation(uniqueidSHA);
	    }
	}
    }
public WHOperation createWHOperation ( ) throws WHClientCommandException { if ( very_verbose ) System . out . println ( "Started to create WHOperation, about to check data" ) ; this . checkAndProcessData ( ) ; if ( verbose || very_verbose ) System . out . println ( "Data check OK" ) ; if ( act . equals ( "insert" ) ) { WHInsertOperation whi = new WHInsertOperation ( idt , ll_poly , height , data , time_interval , mimetype , protocol ) ; if ( received . get ( WHServer . MET ) ) whi . setMeta ( meta ) ; return whi ; } else { if ( act . equals ( "query" ) ) { WHSearchArea search_area = new WHSearchArea ( ll_poly , coordinates [ 0 ] , height , heading ) ; WHSearchOperation whq = new WHSearchOperation ( search_area ) ; if ( received . get ( WHServer . BEG ) ) whq . setBegin ( time_interval . getBegin ( ) ) ; if ( received . get ( WHServer . END ) ) whq . setEnd ( time_interval . getEnd ( ) ) ; if ( received . get ( WHServer . LIM ) ) whq . setLimit ( limit ) ; if ( received . get ( WHServer . MET ) ) whq . setMeta ( meta ) ; if ( received . get ( WHServer . MIM ) ) whq . setMimetype ( mimetype ) ; if ( received . get ( WHServer . PRO ) ) whq . setProtocol ( protocol ) ; return whq ; } else { if ( act . equals ( "count" ) ) { WHSearchArea search_area = new WHSearchArea ( ll_poly , coordinates [ 0 ] , height , heading ) ; WHCountOperation whc = new WHCountOperation ( search_area ) ; if ( received . get ( WHServer . BEG ) ) whc . setBegin ( time_interval . getBegin ( ) ) ; if ( received . get ( WHServer . END ) ) whc . setEnd ( time_interval . getEnd ( ) ) ; if ( received . get ( WHServer . LIM ) ) whc . setLimit ( limit ) ; if ( received . get ( WHServer . MET ) ) whc . setMeta ( meta ) ; if ( received . get ( WHServer . MIM ) ) whc . setMimetype ( mimetype ) ; if ( received . get ( WHServer . PRO ) ) whc . setProtocol ( protocol ) ; return whc ; } else return new WHDeleteOperation ( uniqueidSHA ) ; } } }
Creates some <tt>WHOperation</tt>, based on the field settings of this <tt>WHDataCollector</tt>.
Creates some <tt > WHOperation< / tt > based on the field settings of this <tt > WHDataCollector< / tt > .
//verify that we have consistent data
 //create an appropriate WHOperation object and return
