Top Description Fields Constructors Methods
org.apache.xerces.dom

public Class PSVIElementNSImpl

extends ElementNSImpl
implements ElementPSVI
Class Inheritance
All Implemented Interfaces
org.apache.xerces.xs.ElementPSVI, org.apache.xerces.xs.ItemPSVI
Imports
java.io.IOException, .NotSerializableException, .ObjectInputStream, .ObjectOutputStream, org.apache.xerces.impl.dv.ValidatedInfo, org.apache.xerces.impl.xs.ElementPSVImpl, org.apache.xerces.impl.xs.util.StringListImpl, org.apache.xerces.xs.ElementPSVI, .ItemPSVI, .ShortList, .StringList, .XSComplexTypeDefinition, .XSElementDeclaration, .XSModel, .XSNotationDeclaration, .XSSimpleTypeDefinition, .XSTypeDefinition, .XSValue

Element namespace implementation; stores PSVI element items.
Author
Sandy Gao, IBM
Version
$Id: PSVIElementNSImpl.java 1065753 2011-01-31 20:31:00Z mrglavas $

Field Summary

Modifier and TypeField and Description
protected XSElementDeclaration
fDeclaration

element declaration

protected StringList
fErrorCodes

error codes

protected StringList
fErrorMessages

error messages

protected boolean
fNil

true if clause 3.2 of Element Locally Valid (Element) (3.3.4) is satisfied, otherwise false

protected XSNotationDeclaration
fNotation

http://www.w3.org/TR/xmlschema-1/#e-notation

protected XSModel
fSchemaInformation

the schema information property

protected boolean
fSpecified

false if the element value was provided by the schema; true otherwise.

protected XSTypeDefinition
fTypeDecl

type of element, could be xsi:type

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

pack-priv static final long
Inherited from org.apache.xerces.dom.ElementNSImpl:
localNamenamespaceURItypexmlURI

Constructor Summary

AccessConstructor and Description
public
PSVIElementNSImpl(CoreDocumentImpl ownerDocument, String namespaceURI, String qualifiedName, String localName)

Construct an element node.

public
PSVIElementNSImpl(CoreDocumentImpl ownerDocument, String namespaceURI, String qualifiedName)

Construct an element node.

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 XSElementDeclaration

Returns:

an element declaration
getElementDeclaration
()

Implements org.apache.xerces.xs.ElementPSVI.getElementDeclaration.

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

Returns:

Array 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:

false value was specified in schema, true 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 boolean

Returns:

true if clause 3.2 of Element Locally Valid (Element) (3.3.4) above is satisfied, otherwise false
getNil
()

Implements org.apache.xerces.xs.ElementPSVI.getNil.

[nil]
public XSNotationDeclaration

Returns:

The notation declaration.
getNotation
()

Implements org.apache.xerces.xs.ElementPSVI.getNotation.

[notation]
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 XSModel

Returns:

The schema information property if it's the validation root, null otherwise.
getSchemaInformation
()

Implements org.apache.xerces.xs.ElementPSVI.getSchemaInformation.

[schema information]
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.
private void
public void
setPSVI(ElementPSVI
the source of element PSVI items
elem
)

Copy PSVI properties from another psvi item.

private void
Inherited from org.apache.xerces.dom.ElementNSImpl:
getLocalNamegetNamespaceURIgetPrefixgetTypeNamegetTypeNamespacegetXMLBaseAttributeisDerivedFromrenamesetPrefixsetType

Field Detail

fDeclarationback to summary
protected XSElementDeclaration fDeclaration

element declaration

fErrorCodesback to summary
protected StringList fErrorCodes

error codes

fErrorMessagesback to summary
protected StringList fErrorMessages

error messages

fNilback to summary
protected boolean fNil

true if clause 3.2 of Element Locally Valid (Element) (3.3.4) is satisfied, otherwise false

fNotationback to summary
protected XSNotationDeclaration fNotation

http://www.w3.org/TR/xmlschema-1/#e-notation

fSchemaInformationback to summary
protected XSModel fSchemaInformation

the schema information property

fSpecifiedback to summary
protected boolean fSpecified

false if the element value was provided by the schema; true otherwise.

fTypeDeclback to summary
protected XSTypeDefinition fTypeDecl

type of element, could be xsi:type

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

serialVersionUIDback to summary
pack-priv static final long serialVersionUID

Hides org.apache.xerces.dom.ElementNSImpl.serialVersionUID.

Serialization version.

Constructor Detail

PSVIElementNSImplback to summary
public PSVIElementNSImpl(CoreDocumentImpl ownerDocument, String namespaceURI, String qualifiedName, String localName)

Construct an element node.

PSVIElementNSImplback to summary
public PSVIElementNSImpl(CoreDocumentImpl ownerDocument, String namespaceURI, String qualifiedName)

Construct an element node.

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.

getElementDeclarationback to summary
public XSElementDeclaration getElementDeclaration()

Implements org.apache.xerces.xs.ElementPSVI.getElementDeclaration.

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

Returns:XSElementDeclaration

an element 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

Array 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

false value was specified in schema, true 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

getNilback to summary
public boolean getNil()

Implements org.apache.xerces.xs.ElementPSVI.getNil.

[nil]

Returns:boolean

true if clause 3.2 of Element Locally Valid (Element) (3.3.4) above is satisfied, otherwise false

See Also
getNotationback to summary
public XSNotationDeclaration getNotation()

Implements org.apache.xerces.xs.ElementPSVI.getNotation.

[notation]

Returns:XSNotationDeclaration

The notation declaration.

See Also
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
getSchemaInformationback to summary
public XSModel getSchemaInformation()

Implements org.apache.xerces.xs.ElementPSVI.getSchemaInformation.

[schema information]

Returns:XSModel

The schema information property if it's the validation root, null otherwise.

See Also
XML Schema Part 1: Structures [schema information]
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.

readObjectback to summary
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException

Hides org.apache.xerces.dom.ParentNode.readObject.

Doc from org.apache.xerces.dom.ParentNode.readObject.

Deserialize object.

setPSVIback to summary
public void setPSVI(ElementPSVI elem)

Copy PSVI properties from another psvi item.

Parameters
elem:ElementPSVI

the source of element PSVI items

writeObjectback to summary
private void writeObject(ObjectOutputStream out) throws IOException

Hides org.apache.xerces.dom.ParentNode.writeObject.

Doc from org.apache.xerces.dom.ParentNode.writeObject.

Serialize object.