private Selector parsePredicate ( String predicate , String fullPath ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . entry ( cclass , "parsePredicate" , "predicate: " + predicate ) ; Selector parsed = null ; try { // Preprocess predicate for special characters String parserInput = preProcessForSpecials ( predicate ) ; // Attempt to parse predicate with "JMS" parser predicateParser = MatchParserImpl . prime ( predicateParser , parserInput , true ) ; parsed = predicateParser . getSelector ( parserInput ) ; if ( parsed . getType ( ) == Selector . INVALID ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) tc . debug ( this , cclass , "parsePredicate" , "Unable to parse predicate" ) ; // reset the output to null parsed = null ; } else { postProcessSelectorTree ( parsed , fullPath ) ; } } catch ( Exception ex ) { // No FFDC Code Needed. // In this case we will only trace the exception that we encountered. // It could be that the XPath parser is able to process this predicate // and that we've encountered a discrepancy between the syntax of an // expression supported by JMS and by XPath. if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) tc . debug ( this , cclass , "parsePredicate" , ex ) ; } if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isEntryEnabled ( ) ) tc . exit ( this , cclass , "parsePredicate" , parsed ) ; return parsed ; }
Attempt to parse an isolated predicate using the MatchParser .