|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.eclipse.xsd.impl.XSDSimpleTypeDefinitionImpl.AssessmentImpl
public static class XSDSimpleTypeDefinitionImpl.AssessmentImpl
This is used to gather selectively
the information determined when assessing a literal string
with respect to a XSDSimpleTypeDefinition
.
It is intended to be very light-weight and flexible.
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 value 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 in the preceeding case.
You may begin assessment with a literal
by not setting a node.
And you may begin assessment with a normalizedLiteral
by setting neither the node nor the literal.
Unless additional yield
flags are set,
assessment will perform but one function:
it will set the diagnostics
to Collections.EMPTY_LIST when the literal fails to assess as valid.
Hence, this most-light-weight invocation will only determine validity.
You may choose for assessment to yield additional results,
i.e., the value
, the canonicalLiteral
, and the diagnostics
,
using the flags YIELD_VALUE
, YIELD_CANONICAL_LITERAL
, YIELD_DIAGNOSTICS
.
Field Summary | |
---|---|
java.util.Collection<XSDSimpleTypeDefinition.Assessment> |
assessments
This records any nested assessments that were performed. |
java.lang.String |
canonicalLiteral
This is the canonical literal representation of the literal. |
java.util.Collection<XSDDiagnostic> |
diagnostics
These are the diagnostics that are collected. |
java.lang.String |
literal
This is the literal that is being assessed. |
org.w3c.dom.Node |
node
This is the node whose literal is being assessed. |
java.lang.String |
normalizedLiteral
This is the normalized value of the literal being assessed. |
java.lang.Object |
value
This is the value of the normalized literal in the Java representation of the value space. |
XSDAnySimpleType |
xsdAnySimpleType
This is the simple type definition doing the assessment for an atomic type. |
XSDSimpleTypeDefinitionImpl |
xsdSimpleTypeDefinition
This is the simple type definition doing the assessment. |
int |
yield
This determines the results that will be yielded during assessment. |
static int |
YIELD_CANONICAL_LITERAL
|
static int |
YIELD_DIAGNOSTICS
|
static int |
YIELD_VALUE
|
Constructor Summary | |
---|---|
XSDSimpleTypeDefinitionImpl.AssessmentImpl()
This creates an empty instance; minimally, the node or literal would need to be set before using this. |
|
XSDSimpleTypeDefinitionImpl.AssessmentImpl(org.w3c.dom.Node node,
int yield)
This creates an instance to assess the given node and to yield the specified results. |
|
XSDSimpleTypeDefinitionImpl.AssessmentImpl(java.lang.String literal,
int yield)
This creates an instance to assess the given literal and to yield the specified results. |
Method Summary | |
---|---|
void |
assignDiagnostics(XSDConcreteComponent xsdConcreteComponent,
org.w3c.dom.Element element,
java.lang.String attributeName)
|
protected java.lang.Object[] |
createSubstitutions(int length)
|
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"). |
protected void |
getAllDiagnostics(java.util.Collection<XSDDiagnostic> result)
|
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. |
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. |
XSDSimpleTypeDefinition |
getMemberTypeDefinition()
|
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. |
void |
reportDatatypeDiagnostic()
|
protected static java.lang.String |
requote(java.lang.String message)
|
void |
validate(XSDConstrainingFacet xsdConstrainingFacet)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int YIELD_VALUE
public static final int YIELD_CANONICAL_LITERAL
public static final int YIELD_DIAGNOSTICS
public XSDSimpleTypeDefinitionImpl xsdSimpleTypeDefinition
public XSDAnySimpleType xsdAnySimpleType
public org.w3c.dom.Node node
public java.lang.String literal
public java.lang.String normalizedLiteral
public int yield
public java.lang.Object value
public java.lang.String canonicalLiteral
public java.util.Collection<XSDDiagnostic> diagnostics
public java.util.Collection<XSDSimpleTypeDefinition.Assessment> assessments
Constructor Detail |
---|
public XSDSimpleTypeDefinitionImpl.AssessmentImpl()
public XSDSimpleTypeDefinitionImpl.AssessmentImpl(org.w3c.dom.Node node, int yield)
public XSDSimpleTypeDefinitionImpl.AssessmentImpl(java.lang.String literal, int yield)
Method Detail |
---|
public XSDSimpleTypeDefinition getTypeDefinition()
XSDSimpleTypeDefinition.Assessment
getTypeDefinition
in interface XSDSimpleTypeDefinition.Assessment
public org.w3c.dom.Node getNode()
XSDSimpleTypeDefinition.Assessment
getNode
in interface XSDSimpleTypeDefinition.Assessment
public java.lang.String getLiteral()
XSDSimpleTypeDefinition.Assessment
getLiteral
in interface XSDSimpleTypeDefinition.Assessment
public java.lang.String getNormalizedLiteral()
XSDSimpleTypeDefinition.Assessment
getNormalizedLiteral
in interface XSDSimpleTypeDefinition.Assessment
public java.lang.Object getValue()
XSDSimpleTypeDefinition.Assessment
getValue
in interface XSDSimpleTypeDefinition.Assessment
public java.lang.String getCanonicalLiteral()
XSDSimpleTypeDefinition.Assessment
getCanonicalLiteral
in interface XSDSimpleTypeDefinition.Assessment
public XSDSimpleTypeDefinition getMemberTypeDefinition()
public java.util.Collection<XSDDiagnostic> getLocalDiagnostics()
XSDSimpleTypeDefinition.Assessment
getLocalDiagnostics
in interface XSDSimpleTypeDefinition.Assessment
public java.util.Collection<XSDSimpleTypeDefinition.Assessment> getAssessments()
XSDSimpleTypeDefinition.Assessment
getAssessments
in interface XSDSimpleTypeDefinition.Assessment
public java.util.Collection<XSDDiagnostic> getDiagnostics()
XSDSimpleTypeDefinition.Assessment
getDiagnostics
in interface XSDSimpleTypeDefinition.Assessment
protected void getAllDiagnostics(java.util.Collection<XSDDiagnostic> result)
public void format(java.lang.String noun, java.lang.String name)
XSDSimpleTypeDefinition.Assessment
format
in interface XSDSimpleTypeDefinition.Assessment
noun
- a noun.name
- a proper noun.public void assignDiagnostics(XSDConcreteComponent xsdConcreteComponent, org.w3c.dom.Element element, java.lang.String attributeName)
public void validate(XSDConstrainingFacet xsdConstrainingFacet)
protected java.lang.Object[] createSubstitutions(int length)
protected static java.lang.String requote(java.lang.String message)
public void reportDatatypeDiagnostic()
|
Copyright 2001-2006 IBM Corporation and others. All Rights Reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |