Examples of matches()


Examples of org.apache.jackrabbit.oak.query.fulltext.LikePattern.matches()

    }

    private static boolean evaluateLike(PropertyValue v1, PropertyValue v2) {
        LikePattern like = new LikePattern(v2.getValue(Type.STRING));
        for (String s : v1.getValue(Type.STRINGS)) {
            if (like.matches(s)) {
                return true;
            }
        }
        return false;
    }

Examples of org.apache.jackrabbit.oak.spi.security.authentication.token.TokenInfo.matches()

            assertTrue(root.move(tokenTree.getPath(), node.getTree().getPath() + "/" + tokenTree.getName()));
            root.commit();

            info2 = tokenProvider.getTokenInfo(info.getToken());
            assertNotNull(info2);
            assertFalse(info2.matches(new TokenCredentials(info.getToken())));
        } finally {
            Tree t = getTokenTree(info2);
            t.remove();
            root.commit();
        }

Examples of org.apache.lenya.cms.linking.LinkRewriter.matches()

    protected String rewrite(Request request, String url) throws RepositoryException,
            ConfigurationException {
        Session session = RepositoryUtil.getSession(this.manager, request);
        LinkRewriter rewriter = new OutgoingLinkRewriter(this.manager, session, request
                .getRequestURI(), request.isSecure(), false, this.relativeUrls);
        if (!rewriter.matches(url)) {
            throw new ConfigurationException("The URL [" + url + "] can't be rewritten!");
        }
        return rewriter.rewrite(url);
    }

Examples of org.apache.lenya.cms.linking.OutgoingLinkRewriter.matches()

    protected String rewrite(Request request, String url) throws RepositoryException,
            ConfigurationException {
        Session session = RepositoryUtil.getSession(this.manager, request);
        LinkRewriter rewriter = new OutgoingLinkRewriter(this.manager, session, request
                .getRequestURI(), request.isSecure(), false, this.relativeUrls);
        if (!rewriter.matches(url)) {
            throw new ConfigurationException("The URL [" + url + "] can't be rewritten!");
        }
        return rewriter.rewrite(url);
    }

Examples of org.apache.marmotta.commons.http.ContentType.matches()

    @Test
    public void testMatchNormal1() throws Exception {
        ContentType type1 = new ContentType("application","json");
        ContentType type2 = new ContentType("application","json");

        Assert.assertTrue(type2.matches(type1));
        Assert.assertTrue(type1.matches(type2));
    }


    @Test

Examples of org.apache.metamodel.util.WildcardPattern.matches()

            return comparator.compare(selectItemValue, operandValue) > 0;
        } else if (_operator == OperatorType.LESS_THAN || _operator == OperatorType.LOWER_THAN) {
            return comparator.compare(selectItemValue, operandValue) < 0;
        } else if (_operator == OperatorType.LIKE) {
            WildcardPattern matcher = new WildcardPattern((String) operandValue, '%');
            return matcher.matches((String) selectItemValue);
        } else if (_operator == OperatorType.IN) {
            Set<?> inValues = getInValues();
            return inValues.contains(selectItemValue);
        } else {
            throw new IllegalStateException("Operator could not be determined");

Examples of org.apache.muse.ws.dm.muws.Correlation.matches()

        //
        while (i.hasNext())
        {
            Correlation next = (Correlation)i.next();
           
            if (!next.matches(epr))
                return false;
        }
       
        return true;
    }

Examples of org.apache.muse.ws.dm.muws.Match.matches()

       
        while (i.hasNext())
        {
            Match next = (Match)i.next();
           
            if (!next.matches(epr))
                return false;
        }
       
        return true;
    }

Examples of org.apache.nutch.util.mime.MimeType.matches()

      type = typeName == null ? null : this.mimeTypes.forName(typeName);
    } catch (MimeTypeException mte) {
      // Seems to be a malformed mime type name...
    }

    if (typeName == null || type == null || !type.matches(url)) {
      // If no mime-type header, or cannot find a corresponding registered
      // mime-type, or the one found doesn't match the url pattern
      // it shouldbe, then guess a mime-type from the url pattern
      type = this.mimeTypes.getMimeType(url);
      typeName = type == null ? typeName : type.getName();

Examples of org.apache.openjpa.lib.util.SimpleRegex.matches()

        String wild = args[0].toString().replace('?', '.');
        for (int st = 0, i; (i = wild.indexOf("*", st)) != -1; st = i + 3)
            wild = wild.substring(0, i) + "." + wild.substring(i);

        SimpleRegex re = new SimpleRegex(wild, false);
        return (re.matches(target.toString())) ? Boolean.TRUE : Boolean.FALSE;
    }

    public Class getType(Class targetClass, Class[] argClasses) {
        return boolean.class;
    }
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.