Package org.apache.xerces.impl.xpath.regex

Examples of org.apache.xerces.impl.xpath.regex.RegularExpression.matches()


    }
    if ( (fFacetsDefined & FACET_PATTERN ) != 0 ) {
      RegularExpression regex;
      for (int idx = fPattern.size()-1; idx >= 0; idx--) {
        regex = (RegularExpression)fPattern.elementAt(idx);
        if (!regex.matches(nvalue)){
          throw new InvalidDatatypeValueException("cvc-pattern-valid",
              new Object[]{content,
              fPatternStr.elementAt(idx),
             
              fTypeName});
View Full Code Here


        if ( (fFacetsDefined & FACET_PATTERN ) != 0 ) {
            RegularExpression regex;
            for (int idx = fPattern.size()-1; idx >= 0; idx--) {
                regex = (RegularExpression)fPattern.elementAt(idx);
                if (!regex.matches(nvalue)){
                    throw new InvalidDatatypeValueException("cvc-pattern-valid",
                                                            new Object[]{content,
                                                            fPatternStr.elementAt(idx)});
                }
            }
View Full Code Here

            if ( (fFacetsDefined & FACET_PATTERN ) != 0 ) {
                RegularExpression regex;
                for (int idx = fPattern.size()-1; idx >= 0; idx--) {
                    regex = (RegularExpression)fPattern.elementAt(idx);
                    if (!regex.matches(nvalue)){
                        throw new InvalidDatatypeValueException("cvc-pattern-valid",
                                                                new Object[]{content, regex});
                    }
                }
            }
View Full Code Here

            if ( (fFacetsDefined & FACET_PATTERN ) != 0 ) {
                RegularExpression regex;
                for (int idx = fPattern.size()-1; idx >= 0; idx--) {
                    regex = (RegularExpression)fPattern.elementAt(idx);
                    if (!regex.matches(nvalue)){
                        throw new InvalidDatatypeValueException("cvc-pattern-valid",
                                                                new Object[]{content, regex});
                    }
                }
            }
View Full Code Here

        return uuid.substring(0, uuid.indexOf('-'));
    }

    public static boolean validateUUID(String uuid) {
        RegularExpression regex = new RegularExpression("[0-9a-fA-F]{8}(?:-[0-9a-fA-F]{4}){3}-[0-9a-fA-F]{12}");
        return regex.matches(uuid);
    }
}
View Full Code Here

            if ( (fFacetsDefined & FACET_PATTERN ) != 0 ) {
                RegularExpression regex;
                for (int idx = fPattern.size()-1; idx >= 0; idx--) {
                    regex = (RegularExpression)fPattern.elementAt(idx);
                    if (!regex.matches(nvalue)){
                        throw new InvalidDatatypeValueException("cvc-pattern-valid",
                                                                new Object[]{content, regex});
                    }
                }
            }
View Full Code Here

        }
        if ( (fFacetsDefined & FACET_PATTERN ) != 0 ) {
            RegularExpression regex;
            for (int idx = fPattern.size()-1; idx >= 0; idx--) {
                regex = (RegularExpression)fPattern.elementAt(idx);
                if (!regex.matches(nvalue)){
                    throw new InvalidDatatypeValueException("cvc-pattern-valid",
                            new Object[]{content,
                            fPatternStr.elementAt(idx),

                            fTypeName});
View Full Code Here

        }
        if ( (fFacetsDefined & FACET_PATTERN ) != 0 ) {
            RegularExpression regex;
            for (int idx = fPattern.size()-1; idx >= 0; idx--) {
                regex = (RegularExpression)fPattern.elementAt(idx);
                if (!regex.matches(nvalue)){
                    throw new InvalidDatatypeValueException("cvc-pattern-valid",
                            new Object[]{content,
                            fPatternStr.elementAt(idx),

                            fTypeName});
View Full Code Here

    }
    if ( (fFacetsDefined & FACET_PATTERN ) != 0 ) {
      RegularExpression regex;
      for (int idx = fPattern.size()-1; idx >= 0; idx--) {
        regex = (RegularExpression)fPattern.elementAt(idx);
        if (!regex.matches(nvalue)){
          throw new InvalidDatatypeValueException("cvc-pattern-valid",
              new Object[]{content,
              fPatternStr.elementAt(idx),
             
              fTypeName});
View Full Code Here

            throw new ParseException(e.getMessage(),e.getLocation());
        }

        return new RegExp() {
            public boolean matches(String text) {
                return re.matches(text);
            }
        };
    }

}
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.