Top Description Fields Constructors Methods
org.apache.xerces.impl.xs

public Class AttributePSVImpl

extends Object
implements AttributePSVI
Class Inheritance
All Implemented Interfaces
org.apache.xerces.xs.AttributePSVI, org.apache.xerces.xs.ItemPSVI
Imports
org.apache.xerces.impl.dv.ValidatedInfo, org.apache.xerces.impl.xs.util.StringListImpl, org.apache.xerces.xs.AttributePSVI, .ItemPSVI, .ShortList, .StringList, .XSAttributeDeclaration, .XSSimpleTypeDefinition, .XSTypeDefinition, .XSValue

Attribute PSV infoset augmentations implementation. The PSVI information for attributes will be available at the startElement call.
Author
Elena Litani IBM
Version
$Id: AttributePSVImpl.java 1065753 2011-01-31 20:31:00Z mrglavas $

Field Summary

Modifier and TypeField and Description
protected XSAttributeDeclaration
fDeclaration

attribute declaration

protected String[]
fErrors

error codes and error messages

protected boolean
fIsConstant

true if this object is immutable

protected boolean
fSpecified

If this attribute was explicitly given a value in the original document, this is false; otherwise, it is true

protected XSTypeDefinition
fTypeDecl

type of attribute, simpleType

protected short
fValidationAttempted

validation attempted: none, partial, full

protected String
fValidationContext

validation context: could be QName or XPath expression

protected short
fValidity

validity: valid, invalid, unknown

protected ValidatedInfo
fValue

Schema value

Constructor Summary

AccessConstructor and Description
public
public
AttributePSVImpl(boolean isConstant, AttributePSVI attrPSVI)

Method Summary

Modifier and TypeMethod and Description
public ItemPSVI
constant()

Implements org.apache.xerces.xs.ItemPSVI.constant.

Returns a reference to an immutable instance with the same data that this instance of ItemPSVI currently has.
public Object
getActualNormalizedValue()

Implements org.apache.xerces.xs.ItemPSVI.getActualNormalizedValue.

[schema normalized value]: Binding specific actual value or null if the value is in error.
public short
getActualNormalizedValueType()

Implements org.apache.xerces.xs.ItemPSVI.getActualNormalizedValueType.

The actual value built-in datatype, e.g. STRING_DT, SHORT_DT.
public XSAttributeDeclaration

Returns:

an attribute declaration
getAttributeDeclaration
()

Implements org.apache.xerces.xs.AttributePSVI.getAttributeDeclaration.

An item isomorphic to the attribute declaration used to validate this attribute.
public StringList

Returns:

list of error codes
getErrorCodes
()

Implements org.apache.xerces.xs.ItemPSVI.getErrorCodes.

A list of error codes generated from validation attempts.
public StringList
getErrorMessages()

Implements org.apache.xerces.xs.ItemPSVI.getErrorMessages.

A list of error messages generated from the validation attempt or an empty StringList if no errors occurred during the validation attempt.
public boolean

Returns:

true - value was specified in schema, false - value comes from the infoset
getIsSchemaSpecified
()

Implements org.apache.xerces.xs.ItemPSVI.getIsSchemaSpecified.

[schema specified]
public ShortList
getItemValueTypes()

Implements org.apache.xerces.xs.ItemPSVI.getItemValueTypes.

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 .
public XSSimpleTypeDefinition

Returns:

a simple type declaration
getMemberTypeDefinition
()

Implements org.apache.xerces.xs.ItemPSVI.getMemberTypeDefinition.

If and only if that type definition is a simple type definition with {variety} union, or a complex type definition whose {content type} is a simple thype definition with {variety} union, then an item isomorphic to that member of the union's {member type definitions} which actually validated the element item's normalized value.
public String

Returns:

The canonical lexical representation of the declaration's {value constraint} value.
getSchemaDefault
()

Implements org.apache.xerces.xs.ItemPSVI.getSchemaDefault.

[schema default]
public String

Returns:

the normalized value of this item after validation
getSchemaNormalizedValue
()

Implements org.apache.xerces.xs.ItemPSVI.getSchemaNormalizedValue.

[schema normalized value]
public XSValue
getSchemaValue()

Implements org.apache.xerces.xs.ItemPSVI.getSchemaValue.

If this item has a simple type definition or a complex type with simple content, then return the value with respect to the simple type.
public XSTypeDefinition

Returns:

a type declaration
getTypeDefinition
()

Implements org.apache.xerces.xs.ItemPSVI.getTypeDefinition.

An item isomorphic to the type definition used to validate this element.
public short

Returns:

return the [validation attempted] property. The possible values are NO_VALIDATION, PARTIAL_VALIDATION and FULL_VALIDATION
getValidationAttempted
()

Implements org.apache.xerces.xs.ItemPSVI.getValidationAttempted.

Determines the extent to which the document has been validated
public String
getValidationContext()

Implements org.apache.xerces.xs.ItemPSVI.getValidationContext.

The nearest ancestor element information item with a [schema information] property (or this element item itself if it has such a property).
public short

Returns:

return the [validity] property. Possible values are: UNKNOWN_VALIDITY, INVALID_VALIDITY, VALID_VALIDITY
getValidity
()

Implements org.apache.xerces.xs.ItemPSVI.getValidity.

Determine the validity of the node with respect to the validation being attempted
public boolean
isConstant()

Implements org.apache.xerces.xs.ItemPSVI.isConstant.

Returns true if this specific instance of ItemPSVI is immutable, otherwise false.
public void
reset()

Reset()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

fDeclarationback to summary
protected XSAttributeDeclaration fDeclaration

attribute declaration

fErrorsback to summary
protected String[] fErrors

error codes and error messages

fIsConstantback to summary
protected boolean fIsConstant

true if this object is immutable

fSpecifiedback to summary
protected boolean fSpecified

If this attribute was explicitly given a value in the original document, this is false; otherwise, it is true

fTypeDeclback to summary
protected XSTypeDefinition fTypeDecl

type of attribute, simpleType

fValidationAttemptedback to summary
protected short fValidationAttempted

validation attempted: none, partial, full

fValidationContextback to summary
protected String fValidationContext

validation context: could be QName or XPath expression

fValidityback to summary
protected short fValidity

validity: valid, invalid, unknown

fValueback to summary
protected ValidatedInfo fValue

Schema value

Constructor Detail

AttributePSVImplback to summary
public AttributePSVImpl()
AttributePSVImplback to summary
public AttributePSVImpl(boolean isConstant, AttributePSVI attrPSVI)

Method Detail

constantback to summary
public ItemPSVI constant()

Implements org.apache.xerces.xs.ItemPSVI.constant.

Doc from org.apache.xerces.xs.ItemPSVI.constant.

Returns a reference to an immutable instance with the same data that this instance of ItemPSVI currently has.

getActualNormalizedValueback to summary
public Object getActualNormalizedValue()

Implements org.apache.xerces.xs.ItemPSVI.getActualNormalizedValue.

Doc from org.apache.xerces.xs.ItemPSVI.getActualNormalizedValue.

[schema normalized value]: Binding specific actual value or null if the value is in error.

getActualNormalizedValueTypeback to summary
public short getActualNormalizedValueType()

Implements org.apache.xerces.xs.ItemPSVI.getActualNormalizedValueType.

Doc from org.apache.xerces.xs.ItemPSVI.getActualNormalizedValueType.

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. If the actualNormalizedValue is null, this method returns UNAVAILABLE_DT.

getAttributeDeclarationback to summary
public XSAttributeDeclaration getAttributeDeclaration()

Implements org.apache.xerces.xs.AttributePSVI.getAttributeDeclaration.

An item isomorphic to the attribute declaration used to validate this attribute.

Returns:XSAttributeDeclaration

an attribute declaration

getErrorCodesback to summary
public StringList getErrorCodes()

Implements org.apache.xerces.xs.ItemPSVI.getErrorCodes.

A list of error codes generated from validation attempts. Need to find all the possible subclause reports that need reporting

Returns:StringList

list of error codes

getErrorMessagesback to summary
public StringList getErrorMessages()

Implements org.apache.xerces.xs.ItemPSVI.getErrorMessages.

A list of error messages generated from the validation attempt or an empty StringList if no errors occurred during the validation attempt. The indices of error messages in this list are aligned with those in the [schema error code] list.

getIsSchemaSpecifiedback to summary
public boolean getIsSchemaSpecified()

Implements org.apache.xerces.xs.ItemPSVI.getIsSchemaSpecified.

[schema specified]

Returns:boolean

true - value was specified in schema, false - value comes from the infoset

See Also
XML Schema Part 1: Structures [schema specified]
getItemValueTypesback to summary
public ShortList getItemValueTypes()

Implements org.apache.xerces.xs.ItemPSVI.getItemValueTypes.

Doc from org.apache.xerces.xs.ItemPSVI.getItemValueTypes.

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.
getMemberTypeDefinitionback to summary
public XSSimpleTypeDefinition getMemberTypeDefinition()

Implements org.apache.xerces.xs.ItemPSVI.getMemberTypeDefinition.

If and only if that type definition is a simple type definition with {variety} union, or a complex type definition whose {content type} is a simple thype definition with {variety} union, then an item isomorphic to that member of the union's {member type definitions} which actually validated the element item's normalized value.

Returns:XSSimpleTypeDefinition

a simple type declaration

getSchemaDefaultback to summary
public String getSchemaDefault()

Implements org.apache.xerces.xs.ItemPSVI.getSchemaDefault.

[schema default]

Returns:String

The canonical lexical representation of the declaration's {value constraint} value.

See Also
getSchemaNormalizedValueback to summary
public String getSchemaNormalizedValue()

Implements org.apache.xerces.xs.ItemPSVI.getSchemaNormalizedValue.

[schema normalized value]

Returns:String

the normalized value of this item after validation

See Also
getSchemaValueback to summary
public XSValue getSchemaValue()

Implements org.apache.xerces.xs.ItemPSVI.getSchemaValue.

Doc from org.apache.xerces.xs.ItemPSVI.getSchemaValue.

If this item has a simple type definition or a complex type with simple content, then return the value with respect to the simple type. If this item doesn't have a simple-typed value, the behavior of this method is not specified.

getTypeDefinitionback to summary
public XSTypeDefinition getTypeDefinition()

Implements org.apache.xerces.xs.ItemPSVI.getTypeDefinition.

An item isomorphic to the type definition used to validate this element.

Returns:XSTypeDefinition

a type declaration

getValidationAttemptedback to summary
public short getValidationAttempted()

Implements org.apache.xerces.xs.ItemPSVI.getValidationAttempted.

Determines the extent to which the document has been validated

Returns:short

return the [validation attempted] property. The possible values are NO_VALIDATION, PARTIAL_VALIDATION and FULL_VALIDATION

getValidationContextback to summary
public String getValidationContext()

Implements org.apache.xerces.xs.ItemPSVI.getValidationContext.

Doc from org.apache.xerces.xs.ItemPSVI.getValidationContext.

The nearest ancestor element information item with a [schema information] property (or this element item itself if it has such a property). For more information refer to element validation context and attribute validation context .

getValidityback to summary
public short getValidity()

Implements org.apache.xerces.xs.ItemPSVI.getValidity.

Determine the validity of the node with respect to the validation being attempted

Returns:short

return the [validity] property. Possible values are: UNKNOWN_VALIDITY, INVALID_VALIDITY, VALID_VALIDITY

isConstantback to summary
public boolean isConstant()

Implements org.apache.xerces.xs.ItemPSVI.isConstant.

Doc from org.apache.xerces.xs.ItemPSVI.isConstant.

Returns true if this specific instance of ItemPSVI is immutable, otherwise false.

resetback to summary
public void reset()

Reset()