Examples of regex()


Examples of com.mongodb.QueryBuilder.regex()

            String path = paths.toArray(new String[0])[0];
            if (depth == 0) {
                queryBuilder = queryBuilder.is(path);
            } else {
                Pattern pattern = createPrefixRegExp(path);
                queryBuilder = queryBuilder.regex(pattern);
            }
        }

        // FIXME - This needs to be improved to not fetch all revisions of a path.
        if (revisionId > -1) {
View Full Code Here

Examples of com.mongodb.QueryBuilder.regex()

            String path = paths.toArray(new String[0])[0];
            if (depth == 0) {
                queryBuilder = queryBuilder.is(path);
            } else {
                Pattern pattern = createPrefixRegExp(path);
                queryBuilder = queryBuilder.regex(pattern);
            }
        }

        if (revisionId > -1) {
            queryBuilder = queryBuilder.and(MongoNode.KEY_REVISION_ID).lessThanEquals(revisionId);
View Full Code Here

Examples of com.sk89q.intake.parametric.annotation.Validate.regex()

       
        for (Annotation modifier : modifiers) {
            if (modifier instanceof Validate) {
                Validate validate = (Validate) modifier;
               
                if (!validate.regex().isEmpty()) {
                    if (!string.matches(validate.regex())) {
                        throw new ParameterException(
                                String.format(
                                        "The given text doesn't match the right " +
                                        "format (technically speaking, the 'format' is %s)",
View Full Code Here

Examples of com.sk89q.intake.parametric.annotation.Validate.regex()

        for (Annotation modifier : modifiers) {
            if (modifier instanceof Validate) {
                Validate validate = (Validate) modifier;
               
                if (!validate.regex().isEmpty()) {
                    if (!string.matches(validate.regex())) {
                        throw new ParameterException(
                                String.format(
                                        "The given text doesn't match the right " +
                                        "format (technically speaking, the 'format' is %s)",
                                        validate.regex()));
View Full Code Here

Examples of com.sk89q.intake.parametric.annotation.Validate.regex()

                    if (!string.matches(validate.regex())) {
                        throw new ParameterException(
                                String.format(
                                        "The given text doesn't match the right " +
                                        "format (technically speaking, the 'format' is %s)",
                                        validate.regex()));
                    }
                }
            }
        }
    }
View Full Code Here

Examples of jade.content.onto.annotations.Slot.regex()

              orderByPosition = true;
            }
            if (!Slot.NULL.equals(slotAnnotation.defaultValue())) {
              defaultValue = slotAnnotation.defaultValue();
            }
            if (!Slot.NULL.equals(slotAnnotation.regex())) {
              regex = slotAnnotation.regex();
            }
            if (slotAnnotation.permittedValues().length > 0) {
              permittedValues = slotAnnotation.permittedValues();
            }
View Full Code Here

Examples of jade.content.onto.annotations.Slot.regex()

            }
            if (!Slot.NULL.equals(slotAnnotation.defaultValue())) {
              defaultValue = slotAnnotation.defaultValue();
            }
            if (!Slot.NULL.equals(slotAnnotation.regex())) {
              regex = slotAnnotation.regex();
            }
            if (slotAnnotation.permittedValues().length > 0) {
              permittedValues = slotAnnotation.permittedValues();
            }
            if (!Slot.NULL.equals(slotAnnotation.documentation())) {
View Full Code Here

Examples of org.elasticsearch.search.facet.terms.TermsFacetBuilder.regex()

            SearchRequestBuilder srb = createSearchBuilder();
            lastQ.initRequestBuilder(srb);

            TermsFacetBuilder tfb = FacetBuilders.termsFacet(TAG).field(TAG);
            if (!secPart.trim().isEmpty())
                tfb.regex(secPart + ".*", Pattern.DOTALL);

            srb.addFacet(tfb);
            SearchResponse rsp = query(new ArrayList<JUser>(), srb.execute().actionGet());
            Set<String> res = new TreeSet<String>();
            TermsFacet tf = rsp.facets().facet(TAG);
View Full Code Here

Examples of org.elasticsearch.search.facet.terms.TermsFacetBuilder.regex()

    if (allTerms) {
      builder.allTerms(allTerms);
    }

    if (StringUtils.isNotBlank(regex)) {
      builder.regex(regex, regexFlag);
    }

    return builder;
  }
}
View Full Code Here

Examples of org.hibernate.validator.Pattern.regex()

            lengthClientValidator.setLengthValidator(lengthValidator);
            return lengthClientValidator;
        } else if (annotationClass.equals(Pattern.class)) {
            Pattern pattern = (Pattern) annotation;
            RegexValidator regexValidator = new RegexValidator();
            regexValidator.setPattern(pattern.regex());
            return regexValidator;
        } else if (annotationClass.equals(Range.class)) {
            Range range = (Range) annotation;
            LongRangeValidator longRangeValidator = new LongRangeValidator();
            longRangeValidator.setMaximum(range.max());
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.