## org.apache.xerces.impl.dv
Class ValidatedInfo

    java.lang.Object
      org.apache.xerces.impl.dv.ValidatedInfo

All Implemented Interfaces:
  org.apache.xerces.xs.XSValue

    public class ValidatedInfo

extends java.lang.Object
implements org.apache.xerces.xs.XSValue

Class to get the information back after content is validated. This info would be filled by validate().

Version:
  $Id: ValidatedInfo.java 1026362 2010-10-22 15:15:18Z sandygao $
Author:
  Neeraj Bajaj, Sun Microsystems, inc.

# INTERNAL:

  Usage of this class is not supported. It may be altered or removed at any time.

Field Summary
`XSSimpleType` `actualType` The declared type of the value.
`java.lang.Object` `actualValue` The actual value from a string value (QName, Boolean, etc.) An array of Objects if the type is a list.
`short` `actualValueType` The type of the actual value.
`org.apache.xerces.xs.ShortList` `itemValueTypes` In the case the value is a list or a list of unions, this value indicates the type(s) of the items in the list.
`XSSimpleType` `memberType` If the type is a union type, then the member type which actually validated the string value.
`XSSimpleType[]` `memberTypes` If 1.
`java.lang.String` `normalizedValue` The normalized value of a string value

Constructor Summary
`ValidatedInfo()`

Method Summary
`void` `copyFrom(org.apache.xerces.xs.XSValue o)`
`java.lang.Object` `getActualValue()` The actual value.
`short` `getActualValueType()` The actual value built-in datatype, e.g.
`org.apache.xerces.xs.ShortList` `getListValueTypes()` In the case the actual value represents a list, i.e.
`org.apache.xerces.xs.XSSimpleTypeDefinition` `getMemberTypeDefinition()` If the declared simple type definition is a union, return the member type actually used to validate the value.
`org.apache.xerces.xs.XSObjectList` `getMemberTypeDefinitions()` If `getTypeDefinition()` returns a list type whose item type is a union type, then this method returns a list with the same length as the value list, for simple types that actually validated the corresponding item in the value.
`java.lang.String` `getNormalizedValue()` The schema normalized value.
`org.apache.xerces.xs.XSSimpleTypeDefinition` `getTypeDefinition()` The declared simple type definition used to validate this value.
`static boolean` `isComparable(ValidatedInfo info1, ValidatedInfo info2)` Returns true if the two ValidatedInfo objects can be compared in the same value space.
`void` `reset()` reset the state of this object
`java.lang.String` `stringValue()` Return a string representation of the value.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### normalizedValue

    public java.lang.String normalizedValue

  The normalized value of a string value

### actualValue

    public java.lang.Object actualValue

  The actual value from a string value (QName, Boolean, etc.) An array of Objects if the type is a list.

### actualValueType

    public short actualValueType

  The type of the actual value. It's one of the _DT constants defined in XSConstants.java. The value is used to indicate the most specific built-in type. (i.e. short instead of decimal or integer).

### actualType

    public XSSimpleType actualType

  The declared type of the value.

### memberType

    public XSSimpleType memberType

  If the type is a union type, then the member type which actually validated the string value.

### memberTypes

    public XSSimpleType[] memberTypes

  If 1. the type is a union type where one of the member types is a list, or if the type is a list; and 2. the item type of the list is a union type then an array of member types used to validate the values.

### itemValueTypes

    public org.apache.xerces.xs.ShortList itemValueTypes

  In the case the value is a list or a list of unions, this value indicates the type(s) of the items in the list. For a normal list, the length of the array is 1; for list of unions, the length of the array is the same as the length of the list.

Constructor Detail

### ValidatedInfo

    public ValidatedInfo()

Method Detail

### reset

    public void reset()

  reset the state of this object

### stringValue

    public java.lang.String stringValue()

  Return a string representation of the value. If there is an actual value, use toString; otherwise, use the normalized value.

### isComparable

    public static boolean isComparable(ValidatedInfo info1,
                                       ValidatedInfo info2)

  Returns true if the two ValidatedInfo objects can be compared in the same value space.

### getActualValue

    public java.lang.Object getActualValue()

  Description copied from interface: `org.apache.xerces.xs.XSValue`
  The actual value. `null` if the value is in error.

  Specified by:
    `getActualValue` in interface `org.apache.xerces.xs.XSValue`

### getActualValueType

    public short getActualValueType()

  Description copied from interface: `org.apache.xerces.xs.XSValue`
  The actual value built-in datatype, e.g. `STRING_DT, SHORT_DT`. If the type definition of this value is a list type definition, this method returns `LIST_DT`. If the type definition of this value is a list type definition whose item type is a union type definition, this method returns `LISTOFUNION_DT`. To query the actual value of the list or list of union type definitions use `itemValueTypes()`.

  Specified by:
    `getActualValueType` in interface `org.apache.xerces.xs.XSValue`

### getListValueTypes

    public org.apache.xerces.xs.ShortList getListValueTypes()

  Description copied from interface: `org.apache.xerces.xs.XSValue`
  In the case the actual value represents a list, i.e. the `actualNormalizedValueType` is `LIST_DT`, the returned array consists of one type kind which represents the itemType . For example:

       <simpleType name="listtype"> <list
       itemType="positiveInteger"/> </simpleType> <element
       name="list" type="listtype"/> ... <list>1 2 3</list>

  The `schemaNormalizedValue` value is "1 2 3", the `actualNormalizedValueType` value is `LIST_DT`, and the `itemValueTypes` is an array of size 1 with the value `POSITIVEINTEGER_DT`.
  If the actual value represents a list type definition whose item type is a union type definition, i.e. `LISTOFUNION_DT`, for each actual value in the list the array contains the corresponding memberType kind. For example:

       <simpleType
       name='union_type' memberTypes="integer string"/> <simpleType
       name='listOfUnion'> <list itemType='union_type'/>
       </simpleType> <element name="list" type="listOfUnion"/>
       ... <list>1 2 foo</list>

  The `schemaNormalizedValue` value is "1 2 foo", the `actualNormalizedValueType` is `LISTOFUNION_DT` , and the `itemValueTypes` is an array of size 3 with the following values: `INTEGER_DT, INTEGER_DT, STRING_DT`.

  Specified by:
    `getListValueTypes` in interface `org.apache.xerces.xs.XSValue`

### getMemberTypeDefinitions

    public org.apache.xerces.xs.XSObjectList getMemberTypeDefinitions()

  Description copied from interface: `org.apache.xerces.xs.XSValue`
  If `getTypeDefinition()` returns a list type whose item type is a union type, then this method returns a list with the same length as the value list, for simple types that actually validated the corresponding item in the value.

  Specified by:
    `getMemberTypeDefinitions` in interface `org.apache.xerces.xs.XSValue`

### getNormalizedValue

    public java.lang.String getNormalizedValue()

  Description copied from interface: `org.apache.xerces.xs.XSValue`
  The schema normalized value.

  Specified by:
    `getNormalizedValue` in interface `org.apache.xerces.xs.XSValue`

### getTypeDefinition

    public org.apache.xerces.xs.XSSimpleTypeDefinition getTypeDefinition()

  Description copied from interface: `org.apache.xerces.xs.XSValue`
  The declared simple type definition used to validate this value. It can be a union type.

  Specified by:
    `getTypeDefinition` in interface `org.apache.xerces.xs.XSValue`

### getMemberTypeDefinition

    public org.apache.xerces.xs.XSSimpleTypeDefinition getMemberTypeDefinition()

  Description copied from interface: `org.apache.xerces.xs.XSValue`
  If the declared simple type definition is a union, return the member type actually used to validate the value. Otherwise null.

  Specified by:
    `getMemberTypeDefinition` in interface `org.apache.xerces.xs.XSValue`

### copyFrom

    public void copyFrom(org.apache.xerces.xs.XSValue o)

Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.