Ejemplo n.º 1
0
  /**
   * Uses the default configuration to re-set the default factories used by the system (attribute,
   * combining algorithm, and function). If a default is not provided for a given factory, then that
   * factory will not be set as the system's default.
   */
  public void useDefaultFactories() {
    logger.fine("Switching to default factories from configuration");

    // set the default attribute factory, if it exists here
    if (defaultAttributeFactory != null) {
      AttributeFactory.setDefaultFactory(new AFProxy(defaultAttributeFactory));
    }

    // set the default combining algorithm factory, if it exists here
    if (defaultCombiningFactory != null) {
      CombiningAlgFactory.setDefaultFactory(new CAFProxy(defaultCombiningFactory));
    }

    // set the default function factories, if they exists here
    if (defaultFunctionFactoryProxy != null)
      FunctionFactory.setDefaultFactory(defaultFunctionFactoryProxy);
  }