Package org.apache.oro.text.regex

Examples of org.apache.oro.text.regex.PatternMatcher.matches()


    private void setFieldsValues(String value) {
        if (value == null) {
            resetFieldsValues();
        } else {
            PatternMatcher matcher = new Perl5Matcher();
            if (matcher.matches(value, getAggregateFieldDefinition().getSplitPattern())) {
                MatchResult matchResult = matcher.getMatch();
                Iterator iterator = getAggregateFieldDefinition().getSplitMappingsIterator();
                while (iterator.hasNext()) {
                    SplitMapping splitMapping = (SplitMapping)iterator.next();
                    String result = matchResult.group(splitMapping.getGroup());
View Full Code Here


      //loop the matches
      while (matcher.contains(input, pattern)) {
        result = matcher.getMatch();
        url = result.group(2);
        PatternMatcherInput input1 = new PatternMatcherInput(url);
        if (!matcher1.matches(input1, pattern1)) {
          //LOG.fine(" - invalid '" + url + "'");
          continue;
        }
        if (url.startsWith("www.")) {
            url = "http://" + url;
View Full Code Here

                        String name = (String) iter.next();
                        boolean use = false;

                        for( int n = 0; !use && n < refer.length; n++ )
                        {
                            use = matcher.matches( name, refer[n] );
                        }

                        if( use )
                        {
                            Collection<String> refs = engine.getReferenceManager().findReferrers( name );
View Full Code Here

                                use = false;

                                for( int n = 0; !use && n < include.length; n++ )
                                {

                                    use = matcher.matches( name, include[n] );
                                }
                            }

                            // did we specify what pages to exclude?
                            if( use && null != exclude )
View Full Code Here

                            if( use && null != exclude )
                            {
                                for( int n = 0; use && n < exclude.length; n++ )
                                {

                                    use &= !matcher.matches( name, exclude[n] );
                                }
                            }

                            if( use )
                            {
View Full Code Here

            if( m_include != null )
            {
                for( int j = 0; j < m_include.length; j++ )
                {
                    if( pm.matches( pageName, m_include[j] ) )
                    {
                        includeThis = true;
                        break;
                    }
                }
View Full Code Here

            if( m_exclude != null )
            {
                for( int j = 0; j < m_exclude.length; j++ )
                {
                    if( pm.matches( pageName, m_exclude[j] ) )
                    {
                        includeThis = false;
                        break; // The inner loop, continue on the next item
                    }
                }
View Full Code Here

        }

        while (iter.hasNext()) {
            EntryHolder entryHolder = (EntryHolder) iter.next();

            boolean matched = matcher.matches(url, entryHolder.getCompiledPattern());

            if (logger.isDebugEnabled()) {
                logger.debug("Candidate is: '" + url + "'; pattern is " + entryHolder.getCompiledPattern().getPattern()
                    + "; matched=" + matched);
            }
View Full Code Here

        // Sql Server maintains the default values for DATE/TIME jdbc types, so we have to
        // migrate the default value to TIMESTAMP
        PatternMatcher matcher   = new Perl5Matcher();
        Timestamp      timestamp = null;
 
        if (matcher.matches(defaultValue, _isoDatePattern))
        {
          timestamp = new Timestamp(Date.valueOf(matcher.getMatch().group(1)).getTime());
        }
        else if (matcher.matches(defaultValue, _isoTimePattern))
        {
View Full Code Here

 
        if (matcher.matches(defaultValue, _isoDatePattern))
        {
          timestamp = new Timestamp(Date.valueOf(matcher.getMatch().group(1)).getTime());
        }
        else if (matcher.matches(defaultValue, _isoTimePattern))
        {
          timestamp = new Timestamp(Time.valueOf(matcher.getMatch().group(1)).getTime());
        }
        if (timestamp != null)
        {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.