Examples of matches()


Examples of org.apache.isis.viewer.json.viewer.representations.LinkFollower.matches()

        for (final ObjectAdapter adapter : objectAdapters) {
            final JsonRepresentation linkToObject = linkTo.with(adapter).builder().build();
            values.arrayAdd(linkToObject);

            if (linkFollower.matches(linkToObject)) {
                final RendererFactory factory = RendererFactoryRegistry.instance.find(RepresentationType.DOMAIN_OBJECT);
                final DomainObjectReprRenderer renderer = (DomainObjectReprRenderer) factory.newRenderer(getResourceContext(), linkFollower, JsonRepresentation.newMap());
                final JsonRepresentation domainObject = renderer.with(adapter).render();
                linkToObject.mapPut("value", domainObject);
            }

Examples of org.apache.isis.viewer.restfulobjects.rendering.LinkFollowSpecs.matches()

    private void addLinkToSelf() {
        final JsonRepresentation link = linkToBuilder.with(objectAdapter).builder(Rel.SELF).build();

        final LinkFollowSpecs linkFollower = getLinkFollowSpecs().follow("links");
        if (linkFollower.matches(link)) {
            final DomainObjectReprRenderer renderer = new DomainObjectReprRenderer(getRendererContext(), linkFollower, JsonRepresentation.newMap());
            renderer.with(objectAdapter);
            link.mapPut("value", renderer.render());
        }

Examples of org.apache.ivy.plugins.matcher.MapMatcher.matches()

    private Object getRule(Map moduleAttributes, Filter filter) {
        for (Iterator iter = rules.entrySet().iterator(); iter.hasNext();) {
            Map.Entry ruleEntry = (Entry) iter.next();
            MapMatcher midm = (MapMatcher) ruleEntry.getKey();
            if (midm.matches(moduleAttributes)) {
                Object rule = ruleEntry.getValue();
                if (filter.accept(rule)) {
                    return rule;
                }
            }

Examples of org.apache.ivy.plugins.matcher.Matcher.matches()

        } 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);

Examples of org.apache.ivy.plugins.matcher.ModuleIdMatcher.matches()

    }

    public String getResolverName(ModuleId moduleId) {
        for (Iterator iter = moduleSettings.keySet().iterator(); iter.hasNext();) {
            ModuleIdMatcher midm = (ModuleIdMatcher) iter.next();
            if (midm.matches(moduleId)) {
                ModuleSettings ms = (ModuleSettings) moduleSettings.get(midm);
                if (ms.getResolverName() != null) {
                    return ms.getResolverName();
                }
            }

Examples of org.apache.jackrabbit.core.security.authentication.CryptedSimpleCredentials.matches()

            String plain = pwds.get(pw);
            SimpleCredentials sc = new SimpleCredentials(u.getID(), plain.toCharArray());
            CryptedSimpleCredentials cc = (CryptedSimpleCredentials) u.getCredentials();

            assertTrue(cc.matches(sc));
        }

        // valid passwords, non-matching plain text
        Map<String, String>noMatch = new HashMap<String, String>();
        noMatch.put("{"+SecurityConstants.DEFAULT_DIGEST+"}", "");

Examples of org.apache.jackrabbit.mk.json.JsopReader.matches()

                    commit.removeNodeDiff(path);
                    break;
                case '^':
                    t.read(':');
                    String value;
                    if (t.matches(JsopReader.NULL)) {
                        value = null;
                    } else {
                        value = t.readRawValue().trim();
                    }
                    String p = PathUtils.getParentPath(path);

Examples of org.apache.jackrabbit.mk.json.JsopTokenizer.matches()

                    commit.removeNodeDiff(path);
                    break;
                case '^':
                    t.read(':');
                    String value;
                    if (t.matches(JsopReader.NULL)) {
                        value = null;
                    } else {
                        value = t.readRawValue().trim();
                    }
                    String p = PathUtils.getParentPath(path);

Examples of org.apache.jackrabbit.oak.commons.json.JsopReader.matches()

    }
   
    private void loadValue(String v) {
        JsopReader reader = new JsopTokenizer(v);
        PropertyState p;
        if (reader.matches('[')) {
            p = DocumentPropertyState.readArrayProperty("x", nodeStore, reader);
            if (p.getType() == Type.BINARIES) {
                for (int i = 0; i < p.count(); i++) {
                    Blob b = p.getValue(Type.BINARY, i);
                    batch.add(b);

Examples of org.apache.jackrabbit.oak.commons.json.JsopTokenizer.matches()

    }
   
    private void loadValue(String v) {
        JsopReader reader = new JsopTokenizer(v);
        PropertyState p;
        if (reader.matches('[')) {
            p = DocumentPropertyState.readArrayProperty("x", nodeStore, reader);
            if (p.getType() == Type.BINARIES) {
                for (int i = 0; i < p.count(); i++) {
                    Blob b = p.getValue(Type.BINARY, i);
                    batch.add(b);
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.