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