Examples of Matcher

  • net.fortytwo.twitlogic.syntax.Matcher
    two.net).
  • net.xeoh.plugins.diagnosis.local.util.conditions.matcher.Matcher
    @author Ralf Biedert
  • org.apache.cocoon.matching.Matcher
    @author Giacomo Pati @version CVS $Revision: 1.2.2.5 $ $Date: 2001/11/06 09:55:36 $
  • org.apache.fop.fonts.FontTriplet.Matcher
  • org.apache.ivy.plugins.matcher.Matcher
    An interface that defines a string matcher.
  • org.apache.mailet.Matcher
    This interface define the behaviour of the message "routing" inside the mailet container. The match(Mail) method returns a Collection of recipients that meet this class's criteria.

    An important feature of the mailet container is the ability to fork processing of messages. When a message first arrives at the server, it might have multiple recipients specified. As a message is passed to a matcher, the matcher might only "match" one of the listed recipients. It would then return only the matching recipient in the Collection. The mailet container should then duplicate the message splitting the recipient list across the two messages as per what the matcher returned.

    [THIS PARAGRAPH NOT YET IMPLEMENTED] The matcher can extend this forking to further separation by returning a Collection of Collection objects. This allows a matcher to fork multiple processes if there are multiple recipients that require separate processing. For example, we could write a ListservMatcher that handles multiple listservs. When someone cross-posts across multiple listservs that this matcher handles, it could put each listserv address (recipient) that it handles in a separate Collection object. By returning each of these Collections within a container Collection object, it could indicate to the mailet container how many forks to spawn.

    This interface defines methods to initialize a matcher, to match messages, and to remove a matcher from the server. These are known as life-cycle methods and are called in the following sequence:

    1. The matcher is constructed, then initialized with the init method.
    2. Any calls from clients to the match method are handled.
    3. The matcher is taken out of service, then destroyed with the destroy method, then garbage collected and finalized.
    In addition to the life-cycle methods, this interface provides the getMatcherConfig method, which the matcher can use to get any startup information, and the getMatcherInfo method, which allows the matcher to return basic information about itself, such as author, version, and copyright. @version 1.0.0, 24/04/1999 @author Federico Barbieri @author Serge Knystautas
  • org.apache.tika.sax.xpath.Matcher
    XPath element matcher. A matcher instance encapsulates a specific state in XPath evaluation.
  • org.gocha.text.regex.Matcher
    Результат совпадения шаблона @author gocha
  • org.gwt.mosaic.core.client.util.regex.Matcher
    @author georgopoulos.georgios(at)gmail.com
  • org.hamcrest.Matcher
    A matcher over acceptable values. A matcher is able to describe itself to give feedback when it fails.

    Matcher implementations should NOT directly implement this interface. Instead, extend the {@link BaseMatcher} abstract class,which will ensure that the Matcher API can grow to support new features and remain compatible with all Matcher implementations.

    For easy access to common Matcher implementations, use the static factory methods in {@link CoreMatchers}. @see CoreMatchers @see BaseMatcher

  • org.infinispan.objectfilter.Matcher
    @author anistor@redhat.com @since 7.0
  • org.jbehave.core.mock.Matcher
    Represents a matcher on a method argument. @author Dan North
  • org.jbpm.pvm.internal.type.Matcher
  • org.jbpm.pvm.type.Matcher
  • org.joni.Matcher
  • org.jregex.Matcher
    Matcher instance is an automaton that actually performs matching. It provides the following methods:
  • searching for a matching substrings : matcher.find() or matcher.findAll();
  • testing whether a text matches a whole pattern : matcher.matches();
  • testing whether the text matches the beginning of a pattern : matcher.matchesPrefix();
  • searching with custom options : matcher.find(int options)

    Obtaining results
    After the search succeded, i.e. if one of above methods returned true one may obtain an information on the match:

  • may check whether some group is captured : matcher.isCaptured(int);
  • may obtain start and end positions of the match and its length : matcher.start(int),matcher.end(int),matcher.length(int);
  • may obtain match contents as String : matcher.group(int).
    The same way can be obtained the match prefix and suffix information. The appropriate methods are grouped in MatchResult interface, which the Matcher class implements.
    Matcher objects are not thread-safe, so only one thread may use a matcher instance at a time. Note, that Pattern objects are thread-safe(the same instanse may be shared between multiple threads), and the typical tactics in multithreaded applications is to have one Pattern instance per expression(a singleton), and one Matcher object per thread.
  • org.kitesdk.morphline.shaded.com.google.code.regexp.Matcher
    An engine that performs match operations on a character sequence by interpreting a {@link Pattern}. This is a wrapper for {@link java.util.regex.Matcher}. @since 0.1.9
  • org.modeshape.jcr.sequencer.SequencerPathExpression.Matcher
  • org.netbeans.server.componentsmatch.Matcher
    @author Jindrich Sedek
  • org.openstreetmap.osmosis.tagtransform.Matcher
  • org.parboiled.matchers.Matcher
    A Matcher instance is responsible for "executing" a specific Rule instance, i.e. it implements the actual rule type specific matching logic. Since it extends the {@link GraphNode} interface it can have submatchers.
  • org.shiftone.jrat.util.regex.Matcher
    @author $Author: jeffdrost $ @version $Revision: 1.4 $

  • Examples of java.util.regex.Matcher

        rePattern.insert(0, '^');
        rePattern.append('$');

        try {
                Pattern patternRegex = Pattern.compile(rePattern.toString(), Pattern.DOTALL);
                Matcher matcher = patternRegex.matcher(search);
                return matcher.matches();
        } catch(PatternSyntaxException e) {
                throw new ExpressionEvaluationException(e, "ERR.015.006.0014", QueryPlugin.Util.getString("ERR.015.006.0014", new Object[]{pattern, e.getMessage()})); //$NON-NLS-1$ //$NON-NLS-2$
        }
      }
    View Full Code Here

    Examples of java.util.regex.Matcher

          Embedded,
          Socket
        }
       
        public static ConnectionType acceptsUrl(String url) {
          Matcher m = urlPattern.matcher(url);
          if (m.matches()) {
            return m.group(2) != null?ConnectionType.Socket:ConnectionType.Embedded;
          }
          return null;
        }
    View Full Code Here

    Examples of java1.util.regex.Matcher

          StructPatternHelper.patternMapping.put(struct,
              Pattern.compile(regex));
        }

        Pattern patt = StructPatternHelper.patternMapping.get(struct);
        Matcher matches = patt.matcher(message);
        matches.lookingAt();
        int lastPossition = getLast(matches);
        /*List<String> matchesl = new ArrayList<String>();
        if (matches.matches()) {
          for (int i = 0; i <= matches.groupCount(); i++) {
            matchesl.add(matches.group(i));
    View Full Code Here

    Examples of jregex.Matcher

                check(p, "internal pool", "db.destroyMethod");

                p.put("db.destroyMethod", "close");
            }

            Matcher m = new jregex.Pattern("^mysql:(//)?(({user}[a-zA-Z0-9_]+)(:({pwd}[^@]+))?@)?(({host}[^/]+)/)?({name}[^\\s]+)$").matcher(p.getProperty("db", ""));
            if (m.matches()) {
                String user = m.group("user");
                String password = m.group("pwd");
                String name = m.group("name");
                String host = m.group("host");
                p.put("db.driver", "com.mysql.jdbc.Driver");
                p.put("db.url", "jdbc:mysql://" + (host == null ? "localhost" : host) + "/" + name + "?useUnicode=yes&characterEncoding=UTF-8&connectionCollation=utf8_general_ci");
                if (user != null) {
                    p.put("db.user", user);
                }
                if (password != null) {
                    p.put("db.pass", password);
                }
            }
           
            m = new jregex.Pattern("^postgres:(//)?(({user}[a-zA-Z0-9_]+)(:({pwd}[^@]+))?@)?(({host}[^/]+)/)?({name}[^\\s]+)$").matcher(p.getProperty("db", ""));
            if (m.matches()) {
                String user = m.group("user");
                String password = m.group("pwd");
                String name = m.group("name");
                String host = m.group("host");
                p.put("db.driver", "org.postgresql.Driver");
                p.put("db.url", "jdbc:postgresql://" + (host == null ? "localhost" : host) + "/" + name);
                if (user != null) {
                    p.put("db.user", user);
                }
    View Full Code Here

    Examples of net.fortytwo.twitlogic.syntax.Matcher

                        // Add a "topic sniffer".
                        TopicSniffer topicSniffer = new TopicSniffer(f);

                        // Add a tweet annotator.
                        Matcher matcher = new MultiMatcher(
                                new DemoAfterthoughtMatcher());

                        final Handler<Tweet> annotator
                                = new TweetAnnotator(matcher, topicSniffer);
    View Full Code Here

    Examples of net.xeoh.plugins.diagnosis.local.util.conditions.matcher.Matcher

            this.currentStatus.put(status.getChannel(), status.getValue());
           
            // Next match status agains on status
            Set<Class<? extends DiagnosisChannelID<?>>> keySet = this.onRequirements.keySet();
            for (Class<? extends DiagnosisChannelID<?>> c : keySet) {
                final Matcher requirement = this.onRequirements.get(c);
                final Object is = this.currentStatus.get(c);
               
                if(!requirement.matches(is)) {
                    announceState(STATE.OFF);
                    return;
                }
            }
           
    View Full Code Here

    Examples of org.apache.cocoon.matching.Matcher

            if (this.threadSafeMatcher != null) {
                // Avoid select() and try/catch block (faster !)
                result = this.threadSafeMatcher.match(resolvedPattern, objectModel, resolvedParams);
            } else {
                // Get matcher from selector
                Matcher matcher = (Matcher)this.selector.select(this.componentName);
                try {
                    result = matcher.match(resolvedPattern, objectModel, resolvedParams);
                } finally {
                    this.selector.release(matcher);
                }
            }
    View Full Code Here

    Examples of org.apache.fop.fonts.FontTriplet.Matcher

         * Updates the referenced font list using the FontManager's referenced fonts matcher
         * ({@link #getReferencedFontsMatcher()}).
         * @param fontInfoList a font info list
         */
        public void updateReferencedFonts(List<EmbedFontInfo> fontInfoList) {
            Matcher matcher = getReferencedFontsMatcher();
            updateReferencedFonts(fontInfoList, matcher);
        }
    View Full Code Here

    Examples of org.apache.ivy.plugins.matcher.Matcher

        public IvyEventFilter(String event, String filterExpression, PatternMatcher matcher) {
            this.matcher = matcher == null ? ExactPatternMatcher.INSTANCE : matcher;
            if (event == null) {
                nameFilter = NoFilter.INSTANCE;
            } else {
                final Matcher eventNameMatcher = this.matcher.getMatcher(event);
                nameFilter = new Filter() {
                    public boolean accept(Object o) {
                        IvyEvent e = (IvyEvent) o;
                        return eventNameMatcher.matches(e.getName());
                    }
                };
            }
            attFilter = filterExpression == null || filterExpression.trim().length() == 0 ? NoFilter.INSTANCE
                    : parseExpression(filterExpression);
    View Full Code Here

    Examples of org.apache.mailet.Matcher

                    try {
                        MatcherConfigImpl configImpl = new MatcherConfigImpl();
                        configImpl.setCondition(condition);
                        configImpl.setMailetContext(context);

                        Matcher matcher = (Matcher) Class.forName(className).newInstance();
                        matcher.init(configImpl);
                        return matcher;
                    } catch (ClassNotFoundException cnfe) {
                        //do this so we loop through all the packages
                    }
                }
    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.