public class Validation extends BaseList<Rule> implements IWithExtAttributes
| Constructor and Description |
|---|
Validation()
Creates an empty
Validation object. |
Validation(Validation original,
boolean markAsInherited)
Copy constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addDeclaration() |
int |
getDeclarationCount() |
ExtAttributes |
getExtAttributes()
Gets the
ExtAttributes object for the parent object. |
java.lang.String |
getExtAttributeValue(java.lang.String namespaceURI,
java.lang.String localName)
Gets the value for a given extension attribute.
|
boolean |
hasExtAttribute()
Indicates if at least one extension attribute is present.
|
boolean |
hasNonInheritedRule()
Indicates if this list of rules has at least one that is not inherited.
|
void |
prepare()
Prepare the rules for performing the validation tasks.
|
java.util.List<Issue> |
processRules(Unit unit,
java.lang.String fileId)
Applies the rules of this object on a given unit.
|
void |
setExtAttributes(ExtAttributes attributes)
Sets the
ExtAttributes object associated with this object. |
public Validation()
Validation object.public Validation(Validation original, boolean markAsInherited)
original - the original object to duplicate.markAsInherited - true to mark all rules in the clone as inherited, false to leave them as they are.public void setExtAttributes(ExtAttributes attributes)
IWithExtAttributesExtAttributes object associated with this object.setExtAttributes in interface IWithExtAttributesattributes - the ExtAttributes object associated with this object.
If null, a new ExtAttributes object is created.public ExtAttributes getExtAttributes()
IWithExtAttributesExtAttributes object for the parent object.
If none exists, one is created.getExtAttributes in interface IWithExtAttributesExtAttributes object for the parent object, never null.public boolean hasExtAttribute()
IWithExtAttributeshasExtAttribute in interface IWithExtAttributespublic java.lang.String getExtAttributeValue(java.lang.String namespaceURI,
java.lang.String localName)
IWithExtAttributesgetExtAttributeValue in interface IWithExtAttributesnamespaceURI - the URI of the namespace for the attribute.localName - the name of the attribute.public boolean hasNonInheritedRule()
public void prepare()
processRules(Unit, String).public java.util.List<Issue> processRules(Unit unit, java.lang.String fileId)
prepare() before calling this method (if a rule has changed
since the last call).unit - the unit to validate.fileId - the id of the file of the unit.public int getDeclarationCount()
public void addDeclaration()