01: package org.compass.core.engine.naming;
02:
03: /**
04: * A naming strategy that uses {@link DynamicPropertyPath} when building
05: * {@link PropertyPath}.
06: *
07: * @author kimchy
08: * @author lexi
09: * @see PropertyPath
10: * @see DynamicPropertyPath
11: * @see PropertyNamingStrategyFactory
12: * @see DefaultPropertyNamingStrategyFactory
13: */
14: public class DynamicPropertyNamingStrategy implements
15: PropertyNamingStrategy {
16:
17: public boolean isInternal(String name) {
18: return name.charAt(0) == '$';
19: }
20:
21: public PropertyPath getRootPath() {
22: return new StaticPropertyPath("$");
23: }
24:
25: public PropertyPath buildPath(PropertyPath root, String name) {
26: return new DynamicPropertyPath(root, name);
27: }
28: }
|