Package org.apache.xerces.impl.validation.datatypes.regex

Examples of org.apache.xerces.impl.validation.datatypes.regex.RegularExpression


            continue;
         }
         // next is $name
         String ithSubMatchName = (String) currentMatchSubParts.elementAt(i);
         Match m = new Match();
         RegularExpression re = (RegularExpression) ht.get(ithSubMatchName + "RE");
         if (re == null) {
            continue;
         }
         if (!re.matches(str, m)) {
            continue;
         }
         stack.insertElementAt(new NamedMatch(ithSubMatchName, m), 0);
         String result = getComponent(request);
         if (result != null) {
View Full Code Here


         return false;
      }
      stack.removeAllElements();
      Match m = new Match();
      stack.insertElementAt(new NamedMatch("$" + type, m), 0);
      RegularExpression re = (RegularExpression )ht.get("$" + type + "RE");
      return valid = re.matches(str, m);
   }
View Full Code Here

      }
      if ( obj == null ) {
         return null;
      }
      String target = (String) obj;
      RegularExpression re;
      Object match = Boolean.TRUE;
      if ( constraint instanceof RegularExpression ) {
         re = (RegularExpression) constraint;
         rv =  re . matches( target );
      } else {

         re = (RegularExpression) ((Object[])constraint)[ 0 ];
         match = ((Object[])constraint)[ 1 ];
         rv = re . matches( target , (Match) match );
      }
      return( rv ) ? match : null;
   }
View Full Code Here

   /**
    * Returns pattern (Perl 5 syntax) which restricts form of valid strings
    * @return java.lang.String
    */
   public String getPattern() {
      RegularExpression re = (RegularExpression) getSubProp( PATTERN , Property.constraint );
      return( re == null ) ? null : re . getPattern();
   }
View Full Code Here

   /**
    * Returns options assoc with pattern (Perl 5 syntax) (regex.jar)
    * @return java.lang.String
    */
   public String getPatternOptions() {
      RegularExpression re = (RegularExpression) getSubProp( PATTERN , Property.constraint );
      return( re == null ) ? null : re . getOptions();
   }
View Full Code Here

      setPattern( newPattern , null );
   }
   public void setPattern(String newPattern , String options){
      enableSubProp( "BasicStringProperty.PATTERN" );
      if ( newPattern != null ) {
         setSubProp( new RegularExpression( newPattern , options ),
                     PATTERN ,
                     Property.constraint );
      } else {
         setSubProp( null , PATTERN , Property.constraint );           
      }
View Full Code Here

      }
      boolean sign = s.charAt(0)=='+' || s.charAt(0)=='-' ;
      if ( sign ) {
         s = s . substring(1);
      }
      return( ( new RegularExpression("^\\d+$") ) . matches( s ) ) ?
      Boolean.TRUE : null;
   }
View Full Code Here

                    if (key.equals(SchemaSymbols.ELT_PATTERN)) {
                        fFacetsDefined += DatatypeValidator.FACET_PATTERN;
                        fPattern = (String)facets.get(key);
                        if ( fPattern != null )
                            fRegex = new RegularExpression(fPattern, "X" );


                    } else if (key.equals(SchemaSymbols.ELT_ENUMERATION)) {
                        fFacetsDefined += DatatypeValidator.FACET_ENUMERATION;
                        continue; //Treat the enumaration after this for loop
View Full Code Here

                    String key = (String) e.nextElement();
                    if (key.equals(SchemaSymbols.ELT_PATTERN)) {
                        fFacetsDefined += DatatypeValidator.FACET_PATTERN;
                        fPattern = (String)facets.get(key);
                        if ( fPattern != null )
                            fRegex = new RegularExpression(fPattern, "X" );

                    } else if (key.equals(SchemaSymbols.ELT_ENUMERATION)) {
                        fFacetsDefined += DatatypeValidator.FACET_ENUMERATION;
                        continue; //Treat the enumaration after this for loop
                    } else if (key.equals(SchemaSymbols.ELT_MAXINCLUSIVE)) {
View Full Code Here

                        }
                    } else if (key.equals(SchemaSymbols.ELT_PATTERN)) {
                        fFacetsDefined += DatatypeValidator.FACET_PATTERN;
                        fPattern = (String)facets.get(key);
                        if ( fPattern != null )
                            fRegex = new RegularExpression(fPattern, "X" );

                    } else if (key.equals(SchemaSymbols.ELT_ENUMERATION)) {
                        fFacetsDefined += DatatypeValidator.FACET_ENUMERATION;
                        fEnumeration = (Vector)facets.get(key);
                    } else {
View Full Code Here

TOP

Related Classes of org.apache.xerces.impl.validation.datatypes.regex.RegularExpression

Copyright © 2018 www.massapicom. 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.