org.eclipse.xsd
Interface XSDSimpleTypeDefinition.Assessment

All Known Implementing Classes:
XSDSimpleTypeDefinitionImpl.AssessmentImpl
Enclosing interface:
XSDSimpleTypeDefinition

public static interface XSDSimpleTypeDefinition.Assessment

Information gathered during the assessment a literal with respect to a 'Simple Type Definition'.

You may begin assessment with a Node, which handles three cases: if the node is an attribute, it's value is used to determine the literal; if the node is a text node, it's data is used to determine the literal; if the node is an element, it's (one and only) child text node is used to determine the literal as in the preceeding case. You may also begin assessment with just a literal; in this case, the returned diagnostics will contain substitution variables.


Method Summary
 void format(java.lang.String noun, java.lang.String name)
          Called with a noun and a proper noun to perform substitution on the diagnostic messages, e.g., format("employee", "John Doe").
 java.util.Collection<XSDSimpleTypeDefinition.Assessment> getAssessments()
          Returns any nested assessments that were performed.
 java.lang.String getCanonicalLiteral()
          Returns the canonical literal representation of the assessed value.
 org.w3c.dom.Element getContext()
          Returns the element used as the context for this assessment; this is significant only for interpretting the prefix of QNames.
 java.util.Collection<XSDDiagnostic> getDiagnostics()
          Returns the diagnostics collected for this particular assessment and for any nested assessments.
 java.lang.String getLiteral()
          Returns the literal that is assessed.
 java.util.Collection<XSDDiagnostic> getLocalDiagnostics()
          Returns the diagnostics that are collected for just this particular assessment.
 org.w3c.dom.Node getNode()
          Returns the node whose literal value is assessed.
 java.lang.String getNormalizedLiteral()
          Returns the normalized value of the literal that is assessed.
 XSDSimpleTypeDefinition getTypeDefinition()
          Returns the type definition against which the literal is assessed.
 java.lang.Object getValue()
          Return the value of the normalized literal in the Java representation of the value space.
 

Method Detail

getTypeDefinition

XSDSimpleTypeDefinition getTypeDefinition()
Returns the type definition against which the literal is assessed.

Returns:
the type definition against which the literal is assessed.

getContext

org.w3c.dom.Element getContext()
Returns the element used as the context for this assessment; this is significant only for interpretting the prefix of QNames.

Returns:
the element used as the context for this assessment.
Since:
2.4

getNode

org.w3c.dom.Node getNode()
Returns the node whose literal value is assessed.

Returns:
the node whose literal value is assessed.

getLiteral

java.lang.String getLiteral()
Returns the literal that is assessed.

Returns:
the literal that is assessed.

getNormalizedLiteral

java.lang.String getNormalizedLiteral()
Returns the normalized value of the literal that is assessed.

Returns:
the normalized value of the literal that is assessed.

getValue

java.lang.Object getValue()
Return the value of the normalized literal in the Java representation of the value space.

Returns:
the value of the normalized literal.

getCanonicalLiteral

java.lang.String getCanonicalLiteral()
Returns the canonical literal representation of the assessed value.

Returns:
the canonical literal representation of the assessed value.

getDiagnostics

java.util.Collection<XSDDiagnostic> getDiagnostics()
Returns the diagnostics collected for this particular assessment and for any nested assessments.

Returns:
the diagnostics collected for this particular assessment and for any nested assessments.

getAssessments

java.util.Collection<XSDSimpleTypeDefinition.Assessment> getAssessments()
Returns any nested assessments that were performed. In the case of a union, there will be an assessment for the member type definition that was chosen to assess the literal. In the case of a list, there will be an assessment for every item in the list.

Returns:
any nested assessments that were performed.

getLocalDiagnostics

java.util.Collection<XSDDiagnostic> getLocalDiagnostics()
Returns the diagnostics that are collected for just this particular assessment.

Returns:
the diagnostics that are collected for just this particular assessment.

format

void format(java.lang.String noun,
            java.lang.String name)
Called with a noun and a proper noun to perform substitution on the diagnostic messages, e.g., format("employee", "John Doe"). If an element or attribute was originally specified, the word "element" or "attribute" and the URI of the element or attribute will already have been substituted.

Parameters:
noun - a noun.
name - a proper noun.

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.