protected void parseQueryOperators ( TokenStream tokens , JcrPropertyDefinitionTemplate propDefn ) { if ( tokens . canConsume ( ' ' ) ) { return ; } // The query operators are expected to be enclosed in a single quote, so therefore will be a single token ... List < String > operators = new ArrayList < String > ( ) ; String operatorList = removeQuotes ( tokens . consume ( ) ) ; // Now split this string on ',' ... for ( String operatorValue : operatorList . split ( "," ) ) { String operator = operatorValue . trim ( ) ; if ( ! VALID_QUERY_OPERATORS . contains ( operator ) ) { throw new ParsingException ( tokens . previousPosition ( ) , CndI18n . expectedValidQueryOperator . text ( operator ) ) ; } operators . add ( operator ) ; } if ( operators . isEmpty ( ) ) { operators . addAll ( VALID_QUERY_OPERATORS ) ; } propDefn . setAvailableQueryOperators ( strings ( operators ) ) ; }
Parse the property definition s query operators if they appear next on the token stream .