01: /**
02: * Copyright 2008 Jens Dietrich Licensed under the Apache License, Version 2.0 (the "License");
03: * you may not use this file except in compliance with the License.
04: * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
05: * Unless required by applicable law or agreed to in writing, software distributed under the
06: * License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
07: * either express or implied. See the License for the specific language governing permissions
08: * and limitations under the License.
09: */package nz.org.take.nscript;
10:
11: /**
12: * This policy defines whether global annotations will
13: * be propagated to be local annotations attached to all
14: * elements within the KB. Note that local annotations with the same key will
15: * override global annotations.
16: * @author <a href="http://www-ist.massey.ac.nz/JBDietrich/">Jens Dietrich</a>
17: */
18: public interface AnnotationPropagationPolicy {
19: public boolean propagateAnnotation(String key);
20:
21: public static AnnotationPropagationPolicy ALL = new AnnotationPropagationPolicy() {
22: public boolean propagateAnnotation(String key) {
23: return true;
24: }
25: };
26: public static AnnotationPropagationPolicy NONE = new AnnotationPropagationPolicy() {
27: public boolean propagateAnnotation(String key) {
28: return false;
29: }
30: };
31: }
|