org.apache.xerces.impl.xs
Class ElementPSVImpl

java.lang.Object
  |
  +--org.apache.xerces.impl.xs.ElementPSVImpl
All Implemented Interfaces:
org.apache.xerces.xni.psvi.ElementPSVI, org.apache.xerces.xni.psvi.ItemPSVI

public class ElementPSVImpl
extends java.lang.Object
implements org.apache.xerces.xni.psvi.ElementPSVI

Element PSV infoset augmentations implementation. The following information will be available at the startElement call: name, namespace, type, notation, validation context The following information will be available at the endElement call: nil, specified, normalized value, member type, validity, error codes, default

Author:
Elena Litani IBM

Field Summary
protected  XSElementDecl fDeclaration
          element declaration
protected  java.lang.String[] fErrorCodes
          error codes
protected  XSSimpleType fMemberType
          member type definition against which element was validated
protected  boolean fNil
          true if clause 3.2 of Element Locally Valid (Element) (3.3.4) is satisfied, otherwise false
protected  java.lang.String fNormalizedValue
          schema normalized value property
protected  XSNotationDecl fNotation
          http://www.w3.org/TR/xmlschema-1/#e-notation
protected  boolean fSpecified
          false if the element value was provided by the schema; true otherwise.
protected  XSTypeDecl fTypeDecl
          type of element, could be xsi:type
protected  short fValidationAttempted
          validation attempted: none, partial, full
protected  java.lang.String fValidationContext
          validation context: could be QName or XPath expression
protected  short fValidity
          validity: valid, invalid, unknown
 
Fields inherited from interface org.apache.xerces.xni.psvi.ItemPSVI
FULL_VALIDATION, INVALID_VALIDITY, NO_VALIDATION, PARTIAL_VALIDATION, UNKNOWN_VALIDITY, VALID_VALIDITY
 
Constructor Summary
ElementPSVImpl()
           
 
Method Summary
 java.lang.String[] getErrorCodes()
          A list of error codes generated from validation attempts.
 java.lang.String getMemberTypeName()
          [member type definition name]
 java.lang.String getMemberTypeNamespace()
          [member type definition namespace]
 java.lang.String getNotationPublicId()
          [notation public]
 java.lang.String getNotationSystemId()
          [notation system]
 java.lang.String getSchemaDefault()
          [schema default]
 java.lang.String getSchemaNamespace()
          [schema namespace]
 java.lang.String getSchemaNormalizedValue()
          [schema normalized value]
 short getTypeDefinitionType()
          [type definition type]
 java.lang.String getTypeName()
          [type definition name]
 java.lang.String getTypeNamespace()
          [type definition namespace]
 short getValidationAttempted()
          Determines the extent to which the document has been validated
 java.lang.String getValidationContext()
          [validation context] // REVISIT: what the return type should be? Should we return QName/XPath/ or element info item..?
 short getValidity()
          Determine the validity of the node with respect to the validation being attempted
 boolean isMemberTypeAnonymous()
          [member type definition anonymous]
 boolean isNil()
          [nil]
 boolean isSpecified()
          [schema specified]
 boolean isTypeAnonymous()
          [type definition anonymous]
 void reset()
          Reset() should be called in validator startElement(..) method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

fDeclaration

protected XSElementDecl fDeclaration
element declaration

fTypeDecl

protected XSTypeDecl fTypeDecl
type of element, could be xsi:type

fNil

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

fSpecified

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

fNormalizedValue

protected java.lang.String fNormalizedValue
schema normalized value property

fNotation

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

fMemberType

protected XSSimpleType fMemberType
member type definition against which element was validated

fValidationAttempted

protected short fValidationAttempted
validation attempted: none, partial, full

fValidity

protected short fValidity
validity: valid, invalid, unknown

fErrorCodes

protected java.lang.String[] fErrorCodes
error codes

fValidationContext

protected java.lang.String fValidationContext
validation context: could be QName or XPath expression
Constructor Detail

ElementPSVImpl

public ElementPSVImpl()
Method Detail

isMemberTypeAnonymous

public boolean isMemberTypeAnonymous()
[member type definition anonymous]
Specified by:
isMemberTypeAnonymous in interface org.apache.xerces.xni.psvi.ItemPSVI
Returns:
true if the {name} of the actual member type definition is absent, otherwise false.

getMemberTypeName

public java.lang.String getMemberTypeName()
[member type definition name]
Specified by:
getMemberTypeName in interface org.apache.xerces.xni.psvi.ItemPSVI
Returns:
The {name} of the actual member type definition, if it is not absent. If it is absent, schema processors may, but need not, provide a value unique to the definition.
See Also:

getMemberTypeNamespace

public java.lang.String getMemberTypeNamespace()
[member type definition namespace]
Specified by:
getMemberTypeNamespace in interface org.apache.xerces.xni.psvi.ItemPSVI
Returns:
The {target namespace} of the actual member type definition.
See Also:

getSchemaDefault

public java.lang.String getSchemaDefault()
[schema default]
Specified by:
getSchemaDefault in interface org.apache.xerces.xni.psvi.ItemPSVI
Returns:
The canonical lexical representation of the declaration's {value constraint} value.
See Also:

getSchemaNormalizedValue

public java.lang.String getSchemaNormalizedValue()
[schema normalized value]
Specified by:
getSchemaNormalizedValue in interface org.apache.xerces.xni.psvi.ItemPSVI
Returns:
the normalized value of this item after validation
See Also:

isSpecified

public boolean isSpecified()
[schema specified]
Specified by:
isSpecified in interface org.apache.xerces.xni.psvi.ItemPSVI
Returns:
false value was specified in schema, true value comes from the infoset
See Also:
XML Schema Part 1: Structures [schema specified]

isTypeAnonymous

public boolean isTypeAnonymous()
[type definition anonymous]
Specified by:
isTypeAnonymous in interface org.apache.xerces.xni.psvi.ItemPSVI
Returns:
true if the {name} of the type definition is absent, otherwise false.
See Also:

getTypeName

public java.lang.String getTypeName()
[type definition name]
Specified by:
getTypeName in interface org.apache.xerces.xni.psvi.ItemPSVI
Returns:
The {name} of the type definition, if it is not absent. If it is absent, schema processors may, but need not, provide a value unique to the definition.
See Also:

getTypeNamespace

public java.lang.String getTypeNamespace()
[type definition namespace]
Specified by:
getTypeNamespace in interface org.apache.xerces.xni.psvi.ItemPSVI
Returns:
The {target namespace} of the type definition.
See Also:

getTypeDefinitionType

public short getTypeDefinitionType()
[type definition type]
Specified by:
getTypeDefinitionType in interface org.apache.xerces.xni.psvi.ItemPSVI
Returns:
simple or complex, depending on the type definition.
See Also:
XML Schema Part 1: Structures [type definition type]

getValidationAttempted

public short getValidationAttempted()
Determines the extent to which the document has been validated
Specified by:
getValidationAttempted in interface org.apache.xerces.xni.psvi.ItemPSVI
Returns:
return the [validation attempted] property. The possible values are NO_VALIDATION, PARTIAL_VALIDATION and FULL_VALIDATION

getValidity

public short getValidity()
Determine the validity of the node with respect to the validation being attempted
Specified by:
getValidity in interface org.apache.xerces.xni.psvi.ItemPSVI
Returns:
return the [validity] property. Possible values are: UNKNOWN_VALIDITY, INVALID_VALIDITY, VALID_VALIDITY

getErrorCodes

public java.lang.String[] getErrorCodes()
A list of error codes generated from validation attempts. Need to find all the possible subclause reports that need reporting
Specified by:
getErrorCodes in interface org.apache.xerces.xni.psvi.ItemPSVI
Returns:
Array of error codes

getValidationContext

public java.lang.String getValidationContext()
Description copied from interface: org.apache.xerces.xni.psvi.ItemPSVI
[validation context] // REVISIT: what the return type should be? Should we return QName/XPath/ or element info item..?
Specified by:
getValidationContext in interface org.apache.xerces.xni.psvi.ItemPSVI
Following copied from interface: org.apache.xerces.xni.psvi.ItemPSVI
Returns:
The nearest ancestor element information item with a [schema information] property (or this element item itself if it has such a property)
See Also:
XML Schema Part 1: Structures [validation context]

isNil

public boolean isNil()
[nil]
Specified by:
isNil in interface org.apache.xerces.xni.psvi.ElementPSVI
Returns:
true if clause 3.2 of Element Locally Valid (Element) (3.3.4) above is satisfied, otherwise false
See Also:

getNotationPublicId

public java.lang.String getNotationPublicId()
[notation public]
Specified by:
getNotationPublicId in interface org.apache.xerces.xni.psvi.ElementPSVI
Returns:
The value of the {public identifier} of that notation declaration.
See Also:
XML Schema Part 1: Structures [notation]

getNotationSystemId

public java.lang.String getNotationSystemId()
[notation system]
Specified by:
getNotationSystemId in interface org.apache.xerces.xni.psvi.ElementPSVI
Returns:
The value of the {system identifier} of that notation declaration.
See Also:

getSchemaNamespace

public java.lang.String getSchemaNamespace()
[schema namespace]
Specified by:
getSchemaNamespace in interface org.apache.xerces.xni.psvi.ElementPSVI
Returns:
A namespace name or absent.
See Also:
XML Schema Part 1: Structures [schema information]

reset

public void reset()
Reset() should be called in validator startElement(..) method.


Copyright © 1999-2001 Apache XML Project. All Rights Reserved.