1 /* 2 * Copyright 1999-2005 The Apache Software Foundation. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package org.apache.cocoon.components.validation; 17 18 import org.apache.excalibur.source.SourceValidity; 19 import org.xml.sax.ContentHandler; 20 import org.xml.sax.ext.LexicalHandler; 21 22 /** 23 * <p>A {@link ValidationHandler} represents a {@link ContentHandler} validating 24 * SAX events according to a validation schema.</p> 25 * 26 * <p>As the handler might be tied to one (or more) resources from where the original 27 * schema was read from, the {@link #getValidity()} method provides a way to verify 28 * whether the validation instruction are still valid or not.</p> 29 * 30 * @author <a HREF="mailto:pier@betaversion.org">Pier Fumagalli</a> 31 */ 32 public interface ValidationHandler extends ContentHandler, LexicalHandler { 33 34 /** 35 * <p>Return a {@link SourceValidity} instance associated with the original 36 * resources of the schema describing the validation instructions.</p> 37 * 38 * <p>As the handler might be tied to one (or more) resources from where the 39 * original schema was read from, the {@link #getValidity()} method provides a 40 * way to verify whether the validation instruction are still valid or not.</p> 41 */ 42 public SourceValidity getValidity(); 43 44 } 45