public class ValidationContext extends SchemaContextTracker implements ISkipElements
m_nameRegister| Constructor and Description |
|---|
ValidationContext()
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
addError(String msg,
Object obj)
Add error item.
|
void |
addFatal(String msg,
Object obj)
Add fatal item.
|
void |
addProblem(ValidationProblem problem)
Add problem report.
|
protected void |
addSkip(Object skip)
Add element to set to be skipped.
|
void |
addUnimplemented(String msg,
Object obj)
Add unimplemented feature item for current element.
|
void |
addWarning(String msg,
Object obj)
Add warning item.
|
AttributeElement |
findAttribute(QName qname)
Find global attribute by name.
|
AttributeGroupElement |
findAttributeGroup(QName qname)
Find attribute group by name.
|
ElementElement |
findElement(QName qname)
Find global element by name.
|
GroupElement |
findGroup(QName qname)
Find group by name.
|
CommonTypeDefinition |
findType(QName qname)
Find global type by name.
|
int |
getErrorCount()
Get number of error problems reported.
|
int |
getFatalCount()
Get number of fatal problems reported.
|
ArrayList |
getProblems()
Get list of problems.
|
SchemaElement |
getSchemaById(String id)
Get schema element by identifier.
|
SchemaElement |
getSchemaByNamespace(String uri)
Get schema element by target namespace.
|
int |
getSchemaCount()
Get the number of schemas processed by this context.
|
int |
getUnimplementedCount()
Get number of unimplemented feature problems reported.
|
int |
getWarningCount()
Get number of warning problems reported.
|
boolean |
isSkipped(Object obj)
Check if a component is being skipped due to a fatal error.
|
Iterator |
iterateSchemas()
Get iterator for all schemas defined in this context.
|
void |
registerAttribute(QName qname,
AttributeElement def)
Register global attribute in the current schema definition.
|
void |
registerAttributeGroup(QName qname,
AttributeGroupElement def)
Register global attribute group in the current schema definition.
|
void |
registerElement(QName qname,
ElementElement def)
Register global element in the current schema definition.
|
void |
registerGroup(QName qname,
GroupElement def)
Register global group in the current schema definition.
|
void |
registerType(QName qname,
CommonTypeDefinition def)
Register global type in the current schema definition.
|
boolean |
reportProblems(ProblemHandler handler)
Report problems using handler.
|
void |
reset()
Reset context for reuse.
|
void |
setSchema(String id,
SchemaElement schema)
Add schema element with identifier.
|
clearTraversed, enterSchema, exitSchema, getCurrentSchema, getNameRegister, setNameRegisterpublic void reset()
public SchemaElement getSchemaByNamespace(String uri)
uri - unique namespace URInull if not loaded or non-unique namespacepublic SchemaElement getSchemaById(String id)
id - null if not loadedpublic Iterator iterateSchemas()
public void setSchema(String id, SchemaElement schema)
id - schema - public int getSchemaCount()
public int getUnimplementedCount()
public int getWarningCount()
public int getErrorCount()
public int getFatalCount()
public void registerAttribute(QName qname, AttributeElement def)
qname - namedef - attribute definitionpublic void registerAttributeGroup(QName qname, AttributeGroupElement def)
qname - namedef - attribute definitionpublic void registerElement(QName qname, ElementElement def)
qname - namedef - element definitionpublic void registerGroup(QName qname, GroupElement def)
qname - namedef - attribute definitionpublic void registerType(QName qname, CommonTypeDefinition def)
qname - namedef - attribute definitionpublic AttributeElement findAttribute(QName qname)
qname - namenull if not registeredpublic AttributeGroupElement findAttributeGroup(QName qname)
qname - namenull if not registeredpublic ElementElement findElement(QName qname)
qname - namenull if not registeredpublic GroupElement findGroup(QName qname)
qname - namenull if not registeredpublic CommonTypeDefinition findType(QName qname)
qname - namenull if not registeredpublic void addUnimplemented(String msg, Object obj)
msg - problem descriptionobj - source object for validation errorpublic void addWarning(String msg, Object obj)
msg - problem descriptionobj - source object for validation errorpublic boolean addError(String msg, Object obj)
msg - problem descriptionobj - source object for validation errortrue if to continue validation, false if notpublic void addFatal(String msg, Object obj)
msg - problem descriptionobj - source object for validation error (should be an element)public void addProblem(ValidationProblem problem)
problem - details of problem reportpublic ArrayList getProblems()
protected void addSkip(Object skip)
skip - public boolean reportProblems(ProblemHandler handler)
handler - problem handlertrue if one or more errors, false if notpublic boolean isSkipped(Object obj)
ISkipElementsisSkipped in interface ISkipElementsobj - component to be checkedCopyright © 2005-2013 jibx.org. All Rights Reserved.