Package org.exolab.castor.xml.schema

Examples of org.exolab.castor.xml.schema.Facet


    {
        //-- copy valid facets
        Enumeration enumeration = getFacets(simpleType);
        while (enumeration.hasMoreElements()) {

            Facet facet = (Facet)enumeration.nextElement();
            String name = facet.getName();

            try {
                //-- maxExclusive
                if (Facet.MAX_EXCLUSIVE.equals(name))
                    this.setMaxExclusive(GYear.parseGYear(facet.getValue()));
                //-- maxInclusive
                else if (Facet.MAX_INCLUSIVE.equals(name))
                    this.setMaxInclusive(GYear.parseGYear(facet.getValue()));
                //-- minExclusive
                else if (Facet.MIN_EXCLUSIVE.equals(name))
                    this.setMinExclusive(GYear.parseGYear(facet.getValue()));
                //-- minInclusive
                else if (Facet.MIN_INCLUSIVE.equals(name))
                    this.setMinInclusive(GYear.parseGYear(facet.getValue()));
                //-- pattern
                else if (Facet.PATTERN.equals(name)) {
                    //do nothing for the moment
                    System.out.println("Warning: The facet 'pattern' is not currently supported for XSGYear.");
                }
View Full Code Here


        //-- copy valid facets
        Enumeration enumeration = getFacets(simpleType);
        while (enumeration.hasMoreElements()) {

            Facet facet = (Facet)enumeration.nextElement();
            String name = facet.getName();

            //-- maxExclusive
            if (Facet.MAX_EXCLUSIVE.equals(name))
                setMaxExclusive(facet.toInt());
            //-- maxInclusive
            else if (Facet.MAX_INCLUSIVE.equals(name))
                setMaxInclusive(facet.toInt());
            //-- minExclusive
            else if (Facet.MIN_EXCLUSIVE.equals(name))
                setMinExclusive(facet.toInt());
            //-- minInclusive
            else if (Facet.MIN_INCLUSIVE.equals(name))
                setMinInclusive(facet.toInt());
            else if (Facet.PATTERN.equals(name)) {
                setPattern(facet.getValue());
            }

        }

    } //-- toXSInt
View Full Code Here

    {
        //-- copy valid facets
        Enumeration enumeration = getFacets(simpleType);
        while (enumeration.hasMoreElements()) {

            Facet facet = (Facet)enumeration.nextElement();
            String name = facet.getName();

            try {
                //-- maxExclusive
                if (Facet.MAX_EXCLUSIVE.equals(name))
                    this.setMaxExclusive(GMonth.parseGMonth(facet.getValue()));
                //-- maxInclusive
                else if (Facet.MAX_INCLUSIVE.equals(name))
                    this.setMaxInclusive(GMonth.parseGMonth(facet.getValue()));
                //-- minExclusive
                else if (Facet.MIN_EXCLUSIVE.equals(name))
                    this.setMinExclusive(GMonth.parseGMonth(facet.getValue()));
                //-- minInclusive
                else if (Facet.MIN_INCLUSIVE.equals(name))
                    this.setMinInclusive(GMonth.parseGMonth(facet.getValue()));
                //-- pattern
                else if (Facet.PATTERN.equals(name)) {
                    //do nothing for the moment
                    System.out.println("Warning: The facet 'pattern' is not currently supported for XSGMonth.");
                }
View Full Code Here

    //-- copy valid facets
    Enumeration enumeration = getFacets(simpleType);
    while (enumeration.hasMoreElements()) {

      Facet facet = (Facet) enumeration.nextElement();
      String name = facet.getName();

      //-- maxExclusive
      if (Facet.MAX_EXCLUSIVE.equals(name))
        setMaxExclusive(facet.toLong());
      //-- maxInclusive
      else if (Facet.MAX_INCLUSIVE.equals(name))
        setMaxInclusive(facet.toLong());
      //-- minExclusive
      else if (Facet.MIN_EXCLUSIVE.equals(name))
        setMinExclusive(facet.toLong());
      //-- minInclusive
      else if (Facet.MIN_INCLUSIVE.equals(name))
        setMinInclusive(facet.toLong());
      //-- pattern
      else if (Facet.PATTERN.equals(name))
        setPattern(facet.getValue());
    } //setFacets

  } //-- readLongFacets
View Full Code Here

  public void setFacets(SimpleType simpleType) {
    //-- copy valid facets
    Enumeration enumeration = getFacets(simpleType);
    while (enumeration.hasMoreElements()) {

      Facet facet = (Facet) enumeration.nextElement();
      String name = facet.getName();

      //-- maxLength
      if (Facet.MAX_LENGTH.equals(name))
        setMaxLength(facet.toInt());
      //-- minLength
      else if (Facet.MIN_LENGTH.equals(name))
        setMinLength(facet.toInt());
      //-- length
      else if (Facet.LENGTH.equals(name))
        setLength(facet.toInt());
      else if (Facet.PATTERN.equals(name))
        setPattern(facet.getValue());

    }
  }
View Full Code Here

  public void setFacets(SimpleType simpleType) {
    //-- copy valid facets
    Enumeration enumeration = getFacets(simpleType);
    while (enumeration.hasMoreElements()) {

      Facet facet = (Facet) enumeration.nextElement();
      String name = facet.getName();

      //-- maxLength
      if (Facet.MAX_LENGTH.equals(name))
        setMaxLength(facet.toInt());
      //-- minLength
      else if (Facet.MIN_LENGTH.equals(name))
        setMinLength(facet.toInt());
      //-- length
      else if (Facet.LENGTH.equals(name))
        setLength(facet.toInt());
      else if (Facet.PATTERN.equals(name))
        setPattern(facet.getValue());
      else if (Facet.WHITESPACE.equals(name))
        setWhiteSpace(facet.getValue());

    }
  }
View Full Code Here

    public void setFacets(SimpleType simpleType) {
     Enumeration enumeration = getFacets(simpleType);
            while (enumeration.hasMoreElements()) {

                Facet facet = (Facet)enumeration.nextElement();
                String name = facet.getName();

                //-- maxExclusive
                if (Facet.MAX_EXCLUSIVE.equals(name))
                    setMaxExclusive(new java.math.BigDecimal(facet.getValue()));
                //-- maxInclusive
                else if (Facet.MAX_INCLUSIVE.equals(name))
                    setMaxInclusive(new java.math.BigDecimal(facet.getValue()));
                //-- minExclusive
                else if (Facet.MIN_EXCLUSIVE.equals(name))
                    setMinExclusive(new java.math.BigDecimal(facet.getValue()));
                //-- minInclusive
                else if (Facet.MIN_INCLUSIVE.equals(name))
                    setMinInclusive(new java.math.BigDecimal(facet.getValue()));
                //--totalDigits
                else if (Facet.TOTALDIGITS.equals(name))
                    setTotalDigits(facet.toInt());
                //--fractionDigits
                else if (Facet.FRACTIONDIGITS.equals(name))
                   setFractionDigits(facet.toInt());
            }

    } //-- setFacets
View Full Code Here

    {
        //-- copy valid facets
        Enumeration enumeration = getFacets(simpleType);
        while (enumeration.hasMoreElements()) {

            Facet facet = (Facet)enumeration.nextElement();
            String name = facet.getName();

            try {
                //-- maxExclusive
                if (Facet.MAX_EXCLUSIVE.equals(name))
                    this.setMaxExclusive(GYearMonth.parseGYearMonth(facet.getValue()));
                //-- maxInclusive
                else if (Facet.MAX_INCLUSIVE.equals(name))
                    this.setMaxInclusive(GYearMonth.parseGYearMonth(facet.getValue()));
                //-- minExclusive
                else if (Facet.MIN_EXCLUSIVE.equals(name))
                    this.setMinExclusive(GYearMonth.parseGYearMonth(facet.getValue()));
                //-- minInclusive
                else if (Facet.MIN_INCLUSIVE.equals(name))
                    this.setMinInclusive(GYearMonth.parseGYearMonth(facet.getValue()));
                //-- pattern
                else if (Facet.PATTERN.equals(name)) {
                    //do nothing for the moment
                    System.out.println("Warning: The facet 'pattern' is not currently supported for XSGYearMonth.");
                }
View Full Code Here

  public void setFacets(SimpleType simpleType) {
    //-- copy valid facets
    Enumeration enumeration = getFacets(simpleType);
    while (enumeration.hasMoreElements()) {

      Facet facet = (Facet) enumeration.nextElement();
      String name = facet.getName();

      try {
        //-- maxExclusive
        if (Facet.MAX_EXCLUSIVE.equals(name))
          this.setMaxExclusive(Date.parseDate(facet.getValue()));
        //-- maxInclusive
        else if (Facet.MAX_INCLUSIVE.equals(name))
          this.setMaxInclusive(Date.parseDate(facet.getValue()));
        //-- minExclusive
        else if (Facet.MIN_EXCLUSIVE.equals(name))
          this.setMinExclusive(Date.parseDate(facet.getValue()));
        //-- minInclusive
        else if (Facet.MIN_INCLUSIVE.equals(name))
          this.setMinInclusive(Date.parseDate(facet.getValue()));
        //-- pattern
        else if (Facet.PATTERN.equals(name)) {
          //do nothing for the moment
          System.out.println(
            "Warning: The facet 'pattern' is not currently supported for Date.");
View Full Code Here

        //-- copy valid facets
        Enumeration enumeration = getFacets(simpleType);
        while (enumeration.hasMoreElements()) {

            Facet facet = (Facet)enumeration.nextElement();
            String name = facet.getName();

            //-- maxExclusive
            if (Facet.MAX_EXCLUSIVE.equals(name))
                setMaxExclusive(facet.toFloat());
            //-- maxInclusive
            else if (Facet.MAX_INCLUSIVE.equals(name))
                setMaxInclusive(facet.toFloat());
            //-- minExclusive
            else if (Facet.MIN_EXCLUSIVE.equals(name))
                setMinExclusive(facet.toFloat());
            //-- minInclusive
            else if (Facet.MIN_INCLUSIVE.equals(name))
                setMinInclusive(facet.toFloat());
            //-- pattern
            else if (Facet.PATTERN.equals(name))
                setPattern(facet.getValue());
        }
    }
View Full Code Here

TOP

Related Classes of org.exolab.castor.xml.schema.Facet

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.