|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object issrg.editor2.PERMISPolicyValidator
public class PERMISPolicyValidator
This Class implements the Policy Validator Class Methods. It should verify that an XML document is valid PERMIS XML.
There is scope for this PERMISPolicyValidator
Class to be
improved upon on the way that it checks if a document is Valid or not.
At the moment it verifies documents by checking that the policy has the basic sub-policy elements in a specific order. If an error is encountered an error message will be displayed.
Further improvements could allow further checking, such as if the attributes of an element are allowed, or if further XML structure is erroneous.
Constructor Summary | |
---|---|
PERMISPolicyValidator()
|
Method Summary | |
---|---|
void |
createDocument()
Creates and sets a new valid and empty Document. |
static java.lang.String[] |
getChildElements(org.w3c.dom.Node elem)
Obtains the Child Elements of a Node. |
org.w3c.dom.Document |
getValidDocument()
Method that is used to return a good Valid PERMIS Document. |
void |
setDocument(org.w3c.dom.Document d)
The Document to verify is set using this method. |
void |
validateDocument()
Method that validates the current Document. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public PERMISPolicyValidator()
Method Detail |
---|
public void setDocument(org.w3c.dom.Document d)
setDocument
in interface PolicyValidator
d
- Document to be set.public void validateDocument() throws ValidationException
validateDocument
in interface PolicyValidator
a
- ValidationException if an error occurs.
ValidationException
public void createDocument()
public org.w3c.dom.Document getValidDocument()
After a document is obtained it will add the required tags, to make it valid.
getValidDocument
in interface PolicyValidator
public static java.lang.String[] getChildElements(org.w3c.dom.Node elem)
elem
- the Node Element to obtain the Child Elements of
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |