software/test/performance/src/gov/nih/nci/evs/browser/utils/SearchUtils.java
//public static Vector<org.LexGrid.concepts.Concept> searchByName(String scheme, String version, String matchText, String matchAlgorithm, int maxToReturn) {

public static Vector searchByName(String scheme, String version, String matchText, String matchAlgorithm, int maxToReturn) {
public static Vector searchByName ( String scheme String version String matchText String matchAlgorithm int maxToReturn ) {
public Vector<org.LexGrid.concepts.Concept> searchByName(String scheme, String version, String matchText, String matchAlgorithm, int maxToReturn) {
		String matchText0 = matchText;
		matchText0 = matchText0.trim();
        if (matchText == null || matchText.length() == 0)
        {
			return new Vector();
		}
        matchText = matchText.trim();
        matchText = preprocessSearchString(matchText);
        if (matchAlgorithm.compareToIgnoreCase("exactMatch") == 0)
        {
            if (nonAlphabetic(matchText) || matchText.indexOf(".") != -1 || matchText.indexOf("/") != -1)
            {
				return searchByName(scheme, version, matchText, "RegExp", maxToReturn);
			}
		}
		else if (matchAlgorithm.compareToIgnoreCase("startsWith") == 0)
		{
			matchText = "^" + matchText;
			matchAlgorithm = "RegExp";
		}
		else if (matchAlgorithm.compareToIgnoreCase("contains") == 0)
		{
			if (matchText.indexOf(" ") != -1) 
			{
				matchText = ".*" + matchText + ".*";
				matchAlgorithm = "RegExp";
		    }
		}
		if (matchAlgorithm.compareToIgnoreCase("RegExp") == 0)
		{
			matchText = preprocessRegExp(matchText);
		}
        LocalNameList propertyList = null;
        CodedNodeSet.PropertyType[] propertyTypes = new CodedNodeSet.PropertyType[1];
        propertyTypes[0] = CodedNodeSet.PropertyType.PRESENTATION;
        LocalNameList sourceList = null;
        NameAndValueList qualifierList = null;
        String language = null;
	    ResolvedConceptReferencesIterator iterator = restrictToMatchingProperty(
						scheme,
						version,
						propertyList,
						propertyTypes,
						sourceList,
						qualifierList,
						matchText,
						matchAlgorithm,
						language);
		if (apply_sort_score)
		{
				long ms = System.currentTimeMillis();
				try {
					iterator = sortByScore(matchText, iterator, maxToReturn);
				} catch (Exception ex) {
				}
				_logger.debug("Sorting delay ---- Run time (ms): " + (System.currentTimeMillis() - ms));
		}
        if (iterator != null) {
			Vector v = resolveIterator(	iterator, maxToReturn);
			if (v != null && v.size() > 0)
			{
				return v;
			}
			if (matchAlgorithm.compareToIgnoreCase("exactMatch") == 0) {
				Concept c = getConceptByCode(scheme, null, null, matchText0);
				if (c != null)
				{
					v = new Vector();
					v.add(c);
					return v;
				}
			}
			return new Vector();
		}
		if (matchAlgorithm.compareToIgnoreCase("exactMatch") == 0) {
			matchText0 = matchText0.trim();
			Concept c = getConceptByCode(scheme, null, null, matchText0);
			if (c != null)
			{
				Vector v = new Vector();
				v.add(c);
				return v;
			}
		}
		return new Vector();
	}
public Vector < org . LexGrid . concepts . Concept > searchByName ( String scheme , String version , String matchText , String matchAlgorithm , int maxToReturn ) { String matchText0 = matchText ; matchText0 = matchText0 . trim ( ) ; if ( matchText == null || matchText . length ( ) == 0 ) { return new Vector ( ) ; } matchText = matchText . trim ( ) ; matchText = preprocessSearchString ( matchText ) ; if ( matchAlgorithm . compareToIgnoreCase ( "exactMatch" ) == 0 ) { if ( nonAlphabetic ( matchText ) || matchText . indexOf ( "." ) != - 1 || matchText . indexOf ( "/" ) != - 1 ) { return searchByName ( scheme , version , matchText , "RegExp" , maxToReturn ) ; } } else if ( matchAlgorithm . compareToIgnoreCase ( "startsWith" ) == 0 ) { matchText = "^" + matchText ; matchAlgorithm = "RegExp" ; } else if ( matchAlgorithm . compareToIgnoreCase ( "contains" ) == 0 ) { if ( matchText . indexOf ( " " ) != - 1 ) { matchText = ".*" + matchText + ".*" ; matchAlgorithm = "RegExp" ; } } if ( matchAlgorithm . compareToIgnoreCase ( "RegExp" ) == 0 ) { matchText = preprocessRegExp ( matchText ) ; } LocalNameList propertyList = null ; CodedNodeSet . PropertyType [ ] propertyTypes = new CodedNodeSet . PropertyType [ 1 ] ; propertyTypes [ 0 ] = CodedNodeSet . PropertyType . PRESENTATION ; LocalNameList sourceList = null ; NameAndValueList qualifierList = null ; String language = null ; ResolvedConceptReferencesIterator iterator = restrictToMatchingProperty ( scheme , version , propertyList , propertyTypes , sourceList , qualifierList , matchText , matchAlgorithm , language ) ; if ( apply_sort_score ) { long ms = System . currentTimeMillis ( ) ; try { iterator = sortByScore ( matchText , iterator , maxToReturn ) ; } catch ( Exception ex ) { } _logger . debug ( "Sorting delay ---- Run time (ms): " + ( System . currentTimeMillis ( ) - ms ) ) ; } if ( iterator != null ) { Vector v = resolveIterator ( iterator , maxToReturn ) ; if ( v != null && v . size ( ) > 0 ) { return v ; } if ( matchAlgorithm . compareToIgnoreCase ( "exactMatch" ) == 0 ) { Concept c = getConceptByCode ( scheme , null , null , matchText0 ) ; if ( c != null ) { v = new Vector ( ) ; v . add ( c ) ; return v ; } } return new Vector ( ) ; } if ( matchAlgorithm . compareToIgnoreCase ( "exactMatch" ) == 0 ) { matchText0 = matchText0 . trim ( ) ; Concept c = getConceptByCode ( scheme , null , null , matchText0 ) ; if ( c != null ) { Vector v = new Vector ( ) ; v . add ( c ) ; return v ; } } return new Vector ( ) ; }
public static Vector<org.LexGrid.concepts.Concept> searchByName(String scheme, String version, String matchText, String matchAlgorithm, int maxToReturn) {
public static Vector<org . LexGrid . concepts . Concept > searchByName ( String scheme String version String matchText String matchAlgorithm int maxToReturn ) {
// contains multiple words
 //return sortByScore(searchPhrase, resultIterator, maxToReturn);
