< prev index next >

src/com/sun/org/apache/xerces/internal/impl/dv/xs/ListDV.java

Print this page
rev 2127 : 8048021: Remove @version tag in jaxp repo
Reviewed-by: joehw


  17  * See the License for the specific language governing permissions and
  18  * limitations under the License.
  19  */
  20 
  21 package com.sun.org.apache.xerces.internal.impl.dv.xs;
  22 
  23 import java.util.AbstractList;
  24 
  25 import com.sun.org.apache.xerces.internal.impl.dv.InvalidDatatypeValueException;
  26 import com.sun.org.apache.xerces.internal.impl.dv.ValidationContext;
  27 import com.sun.org.apache.xerces.internal.xs.datatypes.ObjectList;
  28 
  29 /**
  30  * Represent the schema list types
  31  *
  32  * @xerces.internal
  33  *
  34  * @author Neeraj Bajaj, Sun Microsystems, inc.
  35  * @author Sandy Gao, IBM
  36  *
  37  * @version $Id: ListDV.java,v 1.7 2010-11-01 04:39:47 joehw Exp $
  38  */
  39 public class ListDV extends TypeValidator{
  40 
  41     public short getAllowedFacets(){
  42           return (XSSimpleTypeDecl.FACET_LENGTH | XSSimpleTypeDecl.FACET_MINLENGTH | XSSimpleTypeDecl.FACET_MAXLENGTH | XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_ENUMERATION | XSSimpleTypeDecl.FACET_WHITESPACE );
  43     }
  44 
  45     // this method should never be called: XSSimpleTypeDecl is responsible for
  46     // calling the item type for the convertion
  47     public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException{
  48         return content;
  49     }
  50 
  51     // length of a list type is the number of items in the list
  52     public int getDataLength(Object value) {
  53         return ((ListData)value).getLength();
  54     }
  55 
  56     final static class ListData extends AbstractList implements ObjectList {
  57         final Object[] data;




  17  * See the License for the specific language governing permissions and
  18  * limitations under the License.
  19  */
  20 
  21 package com.sun.org.apache.xerces.internal.impl.dv.xs;
  22 
  23 import java.util.AbstractList;
  24 
  25 import com.sun.org.apache.xerces.internal.impl.dv.InvalidDatatypeValueException;
  26 import com.sun.org.apache.xerces.internal.impl.dv.ValidationContext;
  27 import com.sun.org.apache.xerces.internal.xs.datatypes.ObjectList;
  28 
  29 /**
  30  * Represent the schema list types
  31  *
  32  * @xerces.internal
  33  *
  34  * @author Neeraj Bajaj, Sun Microsystems, inc.
  35  * @author Sandy Gao, IBM
  36  *

  37  */
  38 public class ListDV extends TypeValidator{
  39 
  40     public short getAllowedFacets(){
  41           return (XSSimpleTypeDecl.FACET_LENGTH | XSSimpleTypeDecl.FACET_MINLENGTH | XSSimpleTypeDecl.FACET_MAXLENGTH | XSSimpleTypeDecl.FACET_PATTERN | XSSimpleTypeDecl.FACET_ENUMERATION | XSSimpleTypeDecl.FACET_WHITESPACE );
  42     }
  43 
  44     // this method should never be called: XSSimpleTypeDecl is responsible for
  45     // calling the item type for the convertion
  46     public Object getActualValue(String content, ValidationContext context) throws InvalidDatatypeValueException{
  47         return content;
  48     }
  49 
  50     // length of a list type is the number of items in the list
  51     public int getDataLength(Object value) {
  52         return ((ListData)value).getLength();
  53     }
  54 
  55     final static class ListData extends AbstractList implements ObjectList {
  56         final Object[] data;


< prev index next >