issrg.pba.rbac.xmlpolicy.schemachecking
Interface SchemaValidatorInterface

All Known Implementing Classes:
W3CXMLSchemaValidator

public interface SchemaValidatorInterface

Interface defining the API used by PERMIS for schema checking.

Author:
Dmitry Bragin

Method Summary
 javax.xml.validation.Schema getSchema()
          Get the Schema used by the Validator to check instance documents.
 void setSchema(javax.xml.validation.Schema schema)
          Set the Schema used by the Validator to check instance documents.
 void validate(org.w3c.dom.Node r)
          Check if xml represented by a node is valid according to the current schema.
 void validate(java.io.Reader r)
          Check if xml content represented by a Reader is valid according to the current schema.
 void validate(javax.xml.transform.Source source)
          Check if XML represented by a Source is valid according to the current schema.
 void validate(java.lang.String s)
          Check if a given xml string is valid according to the current schema.
 

Method Detail

getSchema

javax.xml.validation.Schema getSchema()
Get the Schema used by the Validator to check instance documents.

Returns:
The Schema used by the Validator to check instance documents

setSchema

void setSchema(javax.xml.validation.Schema schema)
Set the Schema used by the Validator to check instance documents.

Parameters:
schema - Schema to be used for validation

validate

void validate(java.lang.String s)
              throws org.xml.sax.SAXException,
                     java.io.IOException
Check if a given xml string is valid according to the current schema.

Parameters:
s - String to be validated
Throws:
org.xml.sax.SAXException - If parsing of the schema instance fails
java.io.IOException - Thrown on IO error

validate

void validate(java.io.Reader r)
              throws org.xml.sax.SAXException,
                     java.io.IOException
Check if xml content represented by a Reader is valid according to the current schema.

Parameters:
r - Reader acessing the xml content
Throws:
org.xml.sax.SAXException - If parsing of the schema instance fails
java.io.IOException - Thrown on IO error

validate

void validate(org.w3c.dom.Node r)
              throws org.xml.sax.SAXException,
                     java.io.IOException
Check if xml represented by a node is valid according to the current schema.

Parameters:
r - XML Node that is to be validated
Throws:
org.xml.sax.SAXException - If parsing of the schema instance fails
java.io.IOException - Thrown on IO error

validate

void validate(javax.xml.transform.Source source)
              throws org.xml.sax.SAXException,
                     java.io.IOException
Check if XML represented by a Source is valid according to the current schema.

Parameters:
source - Source to be validated
Throws:
org.xml.sax.SAXException - If parsing of the schema instance fails
java.io.IOException - Thrown on IO error