1 13 14 package mondrian.olap; 15 16 import mondrian.olap.type.Type; 17 18 import org.apache.log4j.Logger; 19 20 27 class SetBase extends OlapElementBase implements NamedSet { 28 29 private static final Logger LOGGER = Logger.getLogger(SetBase.class); 30 31 private String name; 32 private final Exp exp; 33 34 SetBase(String name, Exp exp) { 35 this.name = name; 36 this.exp = exp; 37 } 38 39 public Object clone() { 40 return new SetBase(name, (Exp) exp.clone()); 41 } 42 43 protected Logger getLogger() { 44 return LOGGER; 45 } 46 47 public String getUniqueName() { 48 return "[" + name + "]"; 49 } 50 51 public String getName() { 52 return name; 53 } 54 55 public String getQualifiedName() { 56 return null; 57 } 58 59 public String getDescription() { 60 return null; 61 } 62 63 public Hierarchy getHierarchy() { 64 return exp.getType().getHierarchy(); 65 } 66 67 public Dimension getDimension() { 68 return getHierarchy().getDimension(); 69 } 70 71 public OlapElement lookupChild(SchemaReader schemaReader, String s) { 72 return null; 73 } 74 75 public OlapElement lookupChild( 76 SchemaReader schemaReader, String s, MatchType matchType) { 77 return null; 78 } 79 80 public void setName(String name) { 81 this.name = name; 82 } 83 84 public Exp getExp() { 85 return exp; 86 } 87 88 public NamedSet validate(Validator validator) { 89 Exp exp2 = validator.validate(exp, false); 90 return new SetBase(name, exp2); 91 } 92 93 public Type getType() { 94 return exp.getType(); 95 } 96 } 97 98 | Popular Tags |