public class SchemaValidator extends Object implements SchemaValidatorIF
Modifier and Type | Field and Description |
---|---|
protected ValidationHandlerIF |
handler |
protected OSLSchema |
schema |
Modifier and Type | Method and Description |
---|---|
protected ConstraintIF |
findClass(TMObjectIF object,
Collection classes) |
protected ConstraintIF |
findClass(TopicIF topic,
Collection classes) |
protected ConstraintIF |
findClassFor(TopicIF tclass,
Collection classes) |
protected TopicIF |
getTopic(TopicClass klass,
TopicMapIF tm) |
ValidationHandlerIF |
getValidationHandler()
PUBLIC: Returns the validation handler that violations are
currently reported to.
|
void |
setValidationHandler(ValidationHandlerIF handler)
PUBLIC: Sets the validation handler that violations of the
schema will be reported to.
|
void |
validate(AssociationIF association)
PUBLIC: Validates an association against the schema.
|
protected void |
validate(AssociationRoleIF role,
AssociationRoleConstraint constraint) |
protected void |
validate(AssociationRoleIF role,
TopicRoleConstraint constraint) |
protected void |
validate(OccurrenceIF occ,
OccurrenceConstraint constraint) |
protected void |
validate(TMObjectIF container,
Collection constraints,
Collection objects) |
protected void |
validate(TMObjectIF container,
Collection constraints,
Collection objects,
boolean strict) |
protected void |
validate(TMObjectIF object,
ConstraintIF constraint) |
void |
validate(TopicIF topic)
PUBLIC: Validates a topic against the schema.
|
void |
validate(TopicMapIF topicmap)
PUBLIC: Validates a topic map against the schema.
|
protected void |
validate(TopicNameIF basename,
TopicNameConstraint constraint) |
protected void |
validate(VariantNameIF variant,
VariantConstraint constraint) |
protected void |
validateScope(TMObjectIF container,
ScopedIF scoped,
ScopedConstraintIF constraint) |
protected OSLSchema schema
protected ValidationHandlerIF handler
public void validate(TopicIF topic) throws SchemaViolationException
SchemaValidatorIF
validate
in interface SchemaValidatorIF
SchemaViolationException
public void validate(TopicMapIF topicmap) throws SchemaViolationException
SchemaValidatorIF
validate
in interface SchemaValidatorIF
SchemaViolationException
public void validate(AssociationIF association) throws SchemaViolationException
SchemaValidatorIF
validate
in interface SchemaValidatorIF
SchemaViolationException
public void setValidationHandler(ValidationHandlerIF handler)
SchemaValidatorIF
setValidationHandler
in interface SchemaValidatorIF
public ValidationHandlerIF getValidationHandler()
SchemaValidatorIF
getValidationHandler
in interface SchemaValidatorIF
protected void validate(TMObjectIF container, Collection constraints, Collection objects) throws SchemaViolationException
SchemaViolationException
protected void validate(TMObjectIF container, Collection constraints, Collection objects, boolean strict) throws SchemaViolationException
SchemaViolationException
protected void validate(TMObjectIF object, ConstraintIF constraint) throws SchemaViolationException
SchemaViolationException
protected void validate(TopicNameIF basename, TopicNameConstraint constraint) throws SchemaViolationException
SchemaViolationException
protected void validate(VariantNameIF variant, VariantConstraint constraint)
protected void validate(OccurrenceIF occ, OccurrenceConstraint constraint) throws SchemaViolationException
SchemaViolationException
protected void validate(AssociationRoleIF role, TopicRoleConstraint constraint) throws SchemaViolationException
SchemaViolationException
protected void validate(AssociationRoleIF role, AssociationRoleConstraint constraint) throws SchemaViolationException
SchemaViolationException
protected void validateScope(TMObjectIF container, ScopedIF scoped, ScopedConstraintIF constraint) throws SchemaViolationException
SchemaViolationException
protected ConstraintIF findClass(TMObjectIF object, Collection classes)
protected ConstraintIF findClass(TopicIF topic, Collection classes)
protected ConstraintIF findClassFor(TopicIF tclass, Collection classes)
protected TopicIF getTopic(TopicClass klass, TopicMapIF tm)