01: /*
02: * Copyright 2004-2006 the original author or authors.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
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:
17: package org.compass.core.mapping;
18:
19: /**
20: * A property of a {@link org.compass.core.Resource} that controlls the analyzer
21: * that will be used in conjuction with the resource. The controller provides the property
22: * name, which value will define the analyzer used. Also, a null analyzer can be provided
23: * in case the property has no value.
24: *
25: * @author kimchy
26: */
27: public interface ResourceAnalyzerController {
28:
29: /**
30: * Returns the name of the {@link org.compass.core.Resource}
31: * {@link org.compass.core.Property} which value will control
32: * the analyzer to be used for the resource.
33: */
34: String getAnalyzerResourcePropertyName();
35:
36: /**
37: * Returns the name of the analyzer to be used in case the {@link org.compass.core.Resource}
38: * {@link org.compass.core.Property} value is <code>null</code>.
39: */
40: String getNullAnalyzer();
41:
42: /**
43: * Returns <code>true</code> if the controller has a null analyzer configured.
44: */
45: boolean hasNullAnalyzer();
46:
47: }
|