Changeset 5679


Ignore:
Timestamp:
Jun 29, 2011, 1:47:33 PM (10 years ago)
Author:
Nicklas Nordborg
Message:

References #1589: Delete deprecated classes and methods

Removed deprecated options from raw data types and extended properties dtd:s

Location:
trunk/src/core/net/sf/basedb/core
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/core/net/sf/basedb/core/ExtendedProperties.java

    r5431 r5679  
    264264      boolean insertable = XMLUtil.getBooleanAttribute(property, "insert", true);
    265265      boolean updateable = XMLUtil.getBooleanAttribute(property, "update", true);
    266       boolean averagable = XMLUtil.getBooleanAttribute(property, "averagable", type.isNumerical());
    267266      String avgMethod = property.getAttributeValue("averagemethod");
    268267      Formula.AverageMethod averageMethod = null;
     
    271270        averageMethod = Formula.AverageMethod.valueOf(avgMethod.toUpperCase());
    272271      }
    273       else if (averagable)
     272      else if (type.isNumerical())
    274273      {
    275274        averageMethod = Formula.AverageMethod.ARITHMETIC_MEAN;
  • trunk/src/core/net/sf/basedb/core/RawDataTypes.java

    r5574 r5679  
    335335      String name = Values.getStringOrNull(el.getAttributeValue("name"));
    336336      String description = Values.getStringOrNull(el.getAttributeValue("description"));
    337       String storage = el.getAttributeValue("storage");
    338337      String table = Values.getStringOrNull(el.getAttributeValue("table"));
    339338      int channels = XMLUtil.getIntAttribute(el, "channels", 2);
     
    356355      usedNames.add("id:" + id);
    357356      usedNames.add("name:" + name);
    358       if ("database".equals(storage))
    359       {
    360         if (!engine.isValidTableName(table))
    361         {
    362           throw new InvalidDataException("Invalid table for raw data type '" +
    363               id +"' in file '" + xmlFile + "': table=" + table);
    364         }
    365         if (usedNames.contains("table:" + table))
    366         {
    367           throw new InvalidDataException("Duplicate table for raw data type '" +
    368               id +"' in file '" + xmlFile + "': table=" + table);
    369         }
    370         usedNames.add("table:" + table);
    371       }
    372       else
    373       {
    374         throw new ConfigurationException("Attribute storage='" + storage +
    375           "' is no longer supported. Please remove declaration for <rawdatatype id='" + id +
    376           "'> from file '" + xmlFile + "'");
    377       }
     357
     358      if (!engine.isValidTableName(table))
     359      {
     360        throw new InvalidDataException("Invalid table for raw data type '" +
     361            id +"' in file '" + xmlFile + "': table=" + table);
     362      }
     363      if (usedNames.contains("table:" + table))
     364      {
     365        throw new InvalidDataException("Duplicate table for raw data type '" +
     366            id +"' in file '" + xmlFile + "': table=" + table);
     367      }
     368      usedNames.add("table:" + table);
     369
    378370      if (channels <= 0)
    379371      {
     
    435427      if (type == Type.STRING && length > 255) type = Type.TEXT;
    436428      boolean nullable = XMLUtil.getBooleanAttribute(property, "null", true);
    437       boolean averagable = XMLUtil.getBooleanAttribute(property, "averagable", type.isNumerical());
    438429      String avgMethod = property.getAttributeValue("averagemethod");
    439430      Formula.AverageMethod averageMethod = null;
     
    442433        averageMethod = Formula.AverageMethod.valueOf(avgMethod.toUpperCase());
    443434      }
    444       else if (averagable)
     435      else if (type.isNumerical())
    445436      {
    446437        averageMethod = Formula.AverageMethod.ARITHMETIC_MEAN;
  • trunk/src/core/net/sf/basedb/core/dtd/extended-properties.dtd

    r5432 r5679  
    4141  insert (true|false) "true"
    4242  update (true|false) "true"
    43   averagable (true|false) #IMPLIED
    4443  averagemethod (none|arithmetic_mean|geometric_mean|quadratic_mean|min|max) #IMPLIED
    4544>
  • trunk/src/core/net/sf/basedb/core/dtd/raw-data-types.dtd

    r5432 r5679  
    2828  name CDATA #REQUIRED
    2929  channels CDATA #REQUIRED
    30   storage (file|database) "database"
    3130  table CDATA #IMPLIED
    3231  description CDATA #IMPLIED
     
    4342  length CDATA #IMPLIED
    4443  null (true|false) "true"
    45   averagable (true|false) #IMPLIED
    4644  averagemethod (none|arithmetic_mean|geometric_mean|quadratic_mean|min|max) #IMPLIED
    4745  channel CDATA #IMPLIED
Note: See TracChangeset for help on using the changeset viewer.