public class ValidatorSuite extends Object
Validator
s must be stateless. The xmlObjectTarget may be the
XMLObject's element QName retrieved by XMLObject.getElementQName()
or schema type, retrieved
by XMLObject.getSchemaType()
, with schema type registered checks performed first.Constructor and Description |
---|
ValidatorSuite(String suiteId)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
deregisterValidator(QName xmlObjectTarget,
Validator validator)
Removes a validator from this suite.
|
String |
getId()
Gets a unique ID for this suite.
|
List<Validator> |
getValidators(QName xmlObjectTarget)
Gets an immutable list of validators for a given XMLObject target.
|
void |
registerValidator(QName xmlObjectTarget,
Validator validator)
Registers a new validator in the suite.
|
void |
validate(XMLObject xmlObject)
Evaluates the registered validators against the given XMLObject and it's children.
|
public ValidatorSuite(String suiteId)
suiteId
- unique ID for this suitepublic String getId()
public void validate(XMLObject xmlObject) throws ValidationException
xmlObject
- the XMLObject to validateValidationException
- thrown if the element is not validpublic List<Validator> getValidators(QName xmlObjectTarget)
xmlObjectTarget
- the XMLObject the returned list of validators operates onpublic void registerValidator(QName xmlObjectTarget, Validator validator)
validator
- the validatorxmlObjectTarget
- the XMLObject the validator should operate onCopyright © 2018 JBoss by Red Hat. All rights reserved.