fedora.server.validation
Class DOValidatorXMLSchema

java.lang.Object
  extended byfedora.server.validation.DOValidatorXMLSchema
All Implemented Interfaces:
org.xml.sax.EntityResolver

public class DOValidatorXMLSchema
extends java.lang.Object
implements org.xml.sax.EntityResolver

Title: DOValidatorXMLSchema.java

Description: XML Schema validation for Digital Objects

Version:
$Id: DOValidatorXMLSchema.java,v 1.20 2005/10/12 15:46:05 cwilper Exp $
Author:
payette@cs.cornell.edu

Constructor Summary
DOValidatorXMLSchema(java.lang.String schemaPath)
           
 
Method Summary
 org.xml.sax.InputSource resolveEntity(java.lang.String publicId, java.lang.String systemId)
          Resolve the entity if it's referring to a local schema.
 void validate(java.io.File objectAsFile)
           
 void validate(java.io.InputStream objectAsStream)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DOValidatorXMLSchema

public DOValidatorXMLSchema(java.lang.String schemaPath)
                     throws GeneralException
Method Detail

validate

public void validate(java.io.File objectAsFile)
              throws ObjectValidityException,
                     GeneralException
Throws:
ObjectValidityException
GeneralException

validate

public void validate(java.io.InputStream objectAsStream)
              throws ObjectValidityException,
                     GeneralException
Throws:
ObjectValidityException
GeneralException

resolveEntity

public org.xml.sax.InputSource resolveEntity(java.lang.String publicId,
                                             java.lang.String systemId)
Resolve the entity if it's referring to a local schema. Otherwise, return an empty InputSource. This behavior is required in order to ensure that Xerces never attempts to load external schemas specified with xsi:schemaLocation. It is not enough that we specify processContents="skip" in our own schema.

Specified by:
resolveEntity in interface org.xml.sax.EntityResolver