Beispiel #1
0
 public Object property(String key) {
   Object o = super.property(key);
   if (o == null) {
     if (!calculatedNominal && NominalStats.creates(key)) {
       makeNominalStats();
       o = super.property(key);
     }
     if (!calculatedNumeric && NumericStats.creates(key)) {
       if (!calculatedNominal) makeNominalStats();
       makeNumericStats();
       o = super.property(key);
     }
     if (!calculatedDate && DateStats.creates(key)) {
       if (!calculatedNominal) makeNominalStats();
       if (!calculatedNumeric) makeNumericStats();
       makeDateStats();
       o = super.property(key);
     }
   }
   return o;
 }
Beispiel #2
0
  Field(String name, String label, Provider provider, Field base) {
    this.name = name;
    this.label = label == null ? name : label;
    this.provider = provider;

    // Information is provided in the base field
    if (base != null) {
      if (provider == null) {
        // Ensure that the base field has everything calculated because we cannot calculate lazily
        // later
        base.makeNominalStats();
        base.makeNumericStats();
        base.makeDateStats();
      }
      copyPropertiesFrom(base);
    }
  }