Project

General

Profile

« Previous | Next » 

Revision 3224

Added by Jing Tao over 17 years ago

Add a new method to compare the query terms to see if they have same search value.

View differences:

src/edu/ucsb/nceas/metacat/QueryTerm.java
332 332

  
333 333
        return this.printSQL(true);
334 334
    }
335
    
336
    /**
337
     * Compare two query terms to see if they have same search value.
338
     * @param term
339
     * @return
340
     */
341
    public boolean hasSameSearchValue(QueryTerm term)
342
    {
343
    	boolean same = false;
344
    	if (term != null)
345
    	{
346
    		String searchValue = term.getValue();
347
    		if (searchValue != null && this.value != null)
348
    		{
349
    			if (searchValue.equalsIgnoreCase(this.value))
350
    			{
351
    				same = true;
352
    			}
353
    		}
354
    	}
355
    	return same;
356
    }
335 357
}

Also available in: Unified diff