public RuleSetModel(Element model, Instances dataDictionary,
      MiningSchema miningSchema) throws Exception {
    
    super(dataDictionary, miningSchema);
    
    if (!getPMMLVersion().equals("3.2")) {
      // TODO: might have to throw an exception and only support 3.2
    }
    
    String fn = model.getAttribute("functionName");
    if (fn.equals("regression")) {
      m_functionType = MiningFunction.REGRESSION;
    }
    
    String modelName = model.getAttribute("modelName");
    if (modelName != null && modelName.length() > 0) {
      m_modelName = modelName;
    }
    
    String algoName = model.getAttribute("algorithmName");
    if (algoName != null && algoName.length() > 0) {
      m_algorithmName = algoName;
    }    
    
    NodeList ruleset = model.getElementsByTagName("RuleSet");
    if (ruleset.getLength() == 1) {
      Node ruleSetNode = ruleset.item(0);
      if (ruleSetNode.getNodeType() == Node.ELEMENT_NODE) {
        m_ruleSet = new RuleSet((Element)ruleSetNode, miningSchema);
      }
    } else {
      throw new Exception ("[RuleSetModel] Should only have a single RuleSet!");
    }
  }