|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.policy.io.xmlchecking.W3CXMLSchemaValidator
public class W3CXMLSchemaValidator
Class that abstracts the W3C XML Schema validation process. It is an implementation of the SchemaValidatorInterface.
Constructor Summary | |
---|---|
W3CXMLSchemaValidator()
Creates a validator with the default schema. |
|
W3CXMLSchemaValidator(Schema schema)
Creates a validator for the specified schema. |
Method Summary | |
---|---|
protected static Schema |
getDefaultSchema()
Creates the default XML Schema used for validation purposes. |
static String |
validate(File file)
Checks the file if it matches the XML scheme. |
void |
validate(Node r)
Checks if xml represented by a node is valid according to the current schema. |
void |
validate(Reader r)
Checks if xml content represented by a Reader is valid according to the current schema. |
void |
validate(Source source)
Check if xml represented by a Source is valid according to the current schema. |
void |
validate(String s)
Checks if a given xml string is valid according to the current schema. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public W3CXMLSchemaValidator() throws IllegalArgumentException
IllegalArgumentException
- if the default schema cannot be loaded.public W3CXMLSchemaValidator(Schema schema) throws IllegalArgumentException
schema
- the schema to use for validation, must not be null
.
IllegalArgumentException
- if a null
schema is passed in.Method Detail |
---|
public static String validate(File file)
file
- File to check
protected static final Schema getDefaultSchema()
public void validate(String s) throws SAXException, IOException
s
- String to be validated
SAXException
- If parsing of the schema instance fails
IOException
- Thrown on IO errorpublic void validate(Reader r) throws SAXException, IOException
r
- Reader accessing the xml content
SAXException
- If parsing of the schema instance fails
IOException
- Thrown on IO errorpublic void validate(Node r) throws SAXException, IOException
r
- XML Node that is to be validated
SAXException
- If parsing of the schema instance fails
IOException
- Thrown on IO errorpublic void validate(Source source) throws SAXException, IOException
source
- Source to be validated
SAXException
- If parsing of the schema instance fails
IOException
- Thrown on IO error
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:16:59
Copyright (c) 2002-2007 Ergon Informatik AG