agave-common/common-core/src/main/java/org/iplantc/service/common/discovery/providers/sql/DiscoverableServiceCapability.java
/**
	 * Compares two {@link ServiceCapabilityImpl} fields to determine whether
	 * the first value covers the same scope the second value 
	 * supports. Every field contains something different, however
	 * the determination uses a common vocabulary.
	 * 
	 * *: matches any value
	 * ^token: invalidates * as a match for this kind of token.
	 * token: only values with exact match are covered
	 * 
	 * The implication of this grammar is that all {@link ServiceCapabilityImpl} 
	 * on all matching {@link DiscoveryService}s must be checked before a 
	 * determination can be made about whether a particular {@link ServiceCapabilityImpl}
	 * is supported for a given {@link DiscoveryService}.
	 * 
	 * @param val1
	 * @param val2
	 * @return
	 */
Compares two  ServiceCapabilityImpl fields to determine whether
the first value covers the same scope the second value
supports. Every field contains something different, however
the determination uses a common vocabulary.

*: matches any value
^token: invalidates * as a match for this kind of token.
token: only values with exact match are covered

The implication of this grammar is that all  ServiceCapabilityImpl
on all matching  DiscoveryServices must be checked before a
determination can be made about whether a particular  ServiceCapabilityImpl
is supported for a given  DiscoveryService.

@param val1
@param val2
@return
Compares two ServiceCapabilityImpl fields to determine whether the first value covers the same scope the second value supports . Every field contains something different however the determination uses a common vocabulary . * : matches any value ^token : invalidates * as a match for this kind of token . token : only values with exact match are covered The implication of this grammar is that all ServiceCapabilityImpl on all matching DiscoveryServices must be checked before a determination can be made about whether a particular ServiceCapabilityImpl is supported for a given DiscoveryService . @param val1 @param val2 @return
private boolean supports(String val1, String val2) 
	{
		if (val1.equals(val2)) {
			return true;
		} else if (val1.startsWith("^")) {
			return (val1.substring(1).equals(val2));
		} else 
            if (val2.startsWith("^")) {
			return (val2.substring(1).equals(val1));
		} else return val1.equals("*");
	}
private boolean supports ( String val1 , String val2 ) { if ( val1 . equals ( val2 ) ) { return true ; } else if ( val1 . startsWith ( "^" ) ) { return ( val1 . substring ( 1 ) . equals ( val2 ) ) ; } else if ( val2 . startsWith ( "^" ) ) { return ( val2 . substring ( 1 ) . equals ( val1 ) ) ; } else return val1 . equals ( "*" ) ; }
Compares two {@link ServiceCapabilityImpl} fields to determine whether
 the first value covers the same scope the second value
 supports.
Compares two { @link ServiceCapabilityImpl } fields to determine whether the first value covers the same scope the second value supports .
// identical values match // values starting with _ are invalidators. if // the values, minus the preceding underscore // are the same, a match is present otherwise // no match // values starting with _ are invalidators. if // the values, minus the preceding underscore // are the same, a match is present otherwise // no match // otherwise, this value is a specific // named value and only matches the same value. // neither is an invalidator. if the first  // value is a wildcard, it matches any other value