Examples of PatternFacet


Examples of com.sun.msv.datatype.xsd.PatternFacet

                param("minLength", Long.toString(((MinLengthFacet)dtf).minLength));
            } else if (dtf instanceof MaxLengthFacet) {
                param("maxLength", Long.toString(((MaxLengthFacet)dtf).maxLength));
            } else if (dtf instanceof PatternFacet) {
                String pattern = "";
                PatternFacet pf = (PatternFacet)dtf;
                for (int j = 0; j < pf.getRegExps().length; j++) {
                    if (pattern.length() != 0)
                        pattern += "|";
                    pattern += pf.patterns[j];
                }
                param("pattern", pattern);
View Full Code Here

Examples of com.sun.msv.datatype.xsd.PatternFacet

                param("minLength", Long.toString(((MinLengthFacet)dtf).minLength));
            } else if (dtf instanceof MaxLengthFacet) {
                param("maxLength", Long.toString(((MaxLengthFacet)dtf).maxLength));
            } else if (dtf instanceof PatternFacet) {
                String pattern = "";
                PatternFacet pf = (PatternFacet)dtf;
                for (int j = 0; j < pf.getRegExps().length; j++) {
                    if (pattern.length() != 0)
                        pattern += "|";
                    pattern += pf.patterns[j];
                }
                param("pattern", pattern);
View Full Code Here

Examples of org.eclipse.persistence.jaxb.compiler.facets.PatternFacet

        if (helper.isAnnotationPresent(element, NotNull.class)) {
            property.setNotNullAnnotated(true);
        }
        if (helper.isAnnotationPresent(element, Pattern.class)) {
            Pattern a = (Pattern) helper.getAnnotation(element, Pattern.class);
            PatternFacet facet = new PatternFacet(a.regexp(), a.flags());
            property.addFacet(facet);
        }
        /* Example:
            @Pattern.List({
                @Pattern(regexp = "first_expression", message = "first.Pattern.message"),
                @Pattern(regexp = "second_expression", message = "second.Pattern.message"),
                @Pattern(regexp = "third_expression", message = "third.Pattern.message")
        }) */
        if (helper.isAnnotationPresent(element, Pattern.List.class)) {
            Pattern.List a = (Pattern.List) helper.getAnnotation(element, Pattern.List.class);
            PatternListFacet facet = new PatternListFacet(new ArrayList<PatternFacet>());
            for (Pattern pat : a.value()) {
                PatternFacet pf = new PatternFacet(pat.regexp(), pat.flags());
                facet.addPattern(pf);
            }
            property.addFacet(facet);
        }
        if (helper.isAnnotationPresent(element, Size.class)) {
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.