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.engine.naming;
18:
19: /**
20: * The property naming strategy that compass will use for hidden properties.
21: * Created using {@link PropertyNamingStrategyFactory}
22: *
23: * @author kimchy
24: * @see PropertyNamingStrategyFactory
25: * @see StaticPropertyNamingStrategy
26: * @see DynamicPropertyNamingStrategy
27: */
28: public interface PropertyNamingStrategy {
29:
30: /**
31: * Returns true if the property name is an internal property.
32: *
33: * @param name
34: * @return <code>true</code> if the name stands for an internal property.
35: */
36: boolean isInternal(String name);
37:
38: /**
39: * Returns the root path for hidden properties.
40: *
41: * @return The root path for intenral properties.
42: */
43: PropertyPath getRootPath();
44:
45: /**
46: * Builds the path for a root property, base on the root part and the
47: * property name.
48: *
49: * @param root The root path to build the path from
50: * @param name The name to add to the path
51: * @return The generated path from the root and the name
52: */
53: PropertyPath buildPath(PropertyPath root, String name);
54:
55: }
|