Package org.apache.wink.common.internal.uritemplate

Examples of org.apache.wink.common.internal.uritemplate.UriTemplateMatcher.matches()


        readersLock.lock();
        try {
            // the list of root resource records is already sorted
            for (ResourceRecord record : rootResources) {
                UriTemplateMatcher matcher = record.getTemplateProcessor().matcher();
                if (matcher.matches(uri)) {
                    if (matcher.isExactMatch() || record.hasSubResources()) {
                        found.add(new ResourceInstance(record, matcher));
                    }
                }
            }
View Full Code Here


        List<SubResourceInstance> list = new LinkedList<SubResourceInstance>();
        // add records according to the request uri
        for (SubResourceRecord record : subResources) {
            UriTemplateMatcher matcher = record.getTemplateProcessor().matcher();
            // if the uri is a match to the uri template
            if (matcher.matches(uri)) {
                if (method && record instanceof SubResourceMethodRecord && matcher.isExactMatch()) {
                    list.add(new SubResourceInstance(record, matcher));
                }
                if (locator && record instanceof SubResourceLocatorRecord) {
                    list.add(new SubResourceInstance(record, matcher));
View Full Code Here

         */
        previousMatched = uriToResourceCache.get(isContinuedSearchPolicy).get(uri);
        if (previousMatched != null) {
            for (ResourceRecord record : previousMatched) {
                UriTemplateMatcher matcher = record.getTemplateProcessor().matcher();
                if (matcher.matches(uri)) {
                    found.add(new ResourceInstance(record, matcher));
                }
            }
            return found;
        }
View Full Code Here

            previousMatched = new ArrayList<ResourceRecord>();

            // the list of root resource records is already sorted
            for (ResourceRecord record : rootResources) {
                UriTemplateMatcher matcher = record.getTemplateProcessor().matcher();
                if (matcher.matches(uri)) {
                    if (matcher.isExactMatch() || record.hasSubResources()) {
                        previousMatched.add(record);
                        found.add(new ResourceInstance(record, matcher));
                        if (!isContinuedSearchPolicy) {
                            break;
View Full Code Here

         */
        previousMatched = uriToResourceCache.get(isContinuedSearchPolicy).get(uri);
        if (previousMatched != null) {
            for (ResourceRecord record : previousMatched) {
                UriTemplateMatcher matcher = record.getTemplateProcessor().matcher();
                if (matcher.matches(uri)) {
                    found.add(new ResourceInstance(record, matcher));
                }
            }
            return found;
        }
View Full Code Here

            previousMatched = new ArrayList<ResourceRecord>();

            // the list of root resource records is already sorted
            for (ResourceRecord record : rootResources) {
                UriTemplateMatcher matcher = record.getTemplateProcessor().matcher();
                if (matcher.matches(uri)) {
                    if (matcher.isExactMatch() || record.hasSubResources()) {
                        previousMatched.add(record);
                        found.add(new ResourceInstance(record, matcher));
                        if (!isContinuedSearchPolicy) {
                            break;
View Full Code Here

        List<SubResourceInstance> list = new LinkedList<SubResourceInstance>();
        // add records according to the request uri
        for (SubResourceRecord record : subResources) {
            UriTemplateMatcher matcher = record.getTemplateProcessor().matcher();
            // if the uri is a match to the uri template
            if (matcher.matches(uri)) {
                if (method && record instanceof SubResourceMethodRecord && matcher.isExactMatch()) {
                    list.add(new SubResourceInstance(record, matcher));
                }
                if (locator && record instanceof SubResourceLocatorRecord) {
                    list.add(new SubResourceInstance(record, matcher));
View Full Code Here

         */
        previousMatched = uriToResourceCache.get(isContinuedSearchPolicy).get(uri);
        if (previousMatched != null) {
            for (ResourceRecord record : previousMatched) {
                UriTemplateMatcher matcher = record.getTemplateProcessor().matcher();
                if (matcher.matches(uri)) {
                    found.add(new ResourceInstance(record, matcher));
                }
            }
            return found;
        }
View Full Code Here

            previousMatched = new ArrayList<ResourceRecord>();

            // the list of root resource records is already sorted
            for (ResourceRecord record : rootResources) {
                UriTemplateMatcher matcher = record.getTemplateProcessor().matcher();
                if (matcher.matches(uri)) {
                    if (matcher.isExactMatch() || record.hasSubResources()) {
                        previousMatched.add(record);
                        found.add(new ResourceInstance(record, matcher));
                        if (!isContinuedSearchPolicy) {
                            break;
View Full Code Here

        List<SubResourceInstance> list = new LinkedList<SubResourceInstance>();
        // add records according to the request uri
        for (SubResourceRecord record : subResources) {
            UriTemplateMatcher matcher = record.getTemplateProcessor().matcher();
            // if the uri is a match to the uri template
            if (matcher.matches(uri)) {
                if (method && record instanceof SubResourceMethodRecord && matcher.isExactMatch()) {
                    list.add(new SubResourceInstance(record, matcher));
                }
                if (locator && record instanceof SubResourceLocatorRecord) {
                    list.add(new SubResourceInstance(record, matcher));
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.