public class ValidatorSuite extends Object
Validators 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.| コンストラクタと説明 |
|---|
ValidatorSuite(String suiteId)
Constructor.
|
| 修飾子とタイプ | メソッドと説明 |
|---|---|
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 © 2012. All Rights Reserved.