fedora.server.validation
Class DOValidatorXMLSchema

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

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

XML Schema validation for Digital Objects.

Version:
$Id: DOValidatorXMLSchema.java 5218 2006-11-20 05:10:11Z cwilper $
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
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