Exemplo n.º 1
0
    public void startElement(String uri, String localName, String qName, Attributes attributes)
        throws SAXException {

      if ("include".equals(qName)) {
        String name = getAttribute(attributes, "table");
        if (null != name) {

          TableRule rule = new TableRule(name);
          String predicate = getAttribute(attributes, "where");
          if (null != predicate) {
            rule.setPredicate(predicate);
          }

          ruleSet.includeTable(rule);
          trace("Include table " + name);
        }
      }

      if ("exclude".equals(qName)) {
        String name = attributes.getValue("table");
        if (null != name && name.trim().length() > 0) {
          ruleSet.excludeTable(new TableRule(name));
          trace("Exclude table " + name);
        }
      }
    }
Exemplo n.º 2
0
    private void addCommandLineExcludeRules(String arg) {
      String newRules[] = arg.split("\\s*,\\s*");

      for (String rule : newRules) {
        rules.excludeTable(new TableRule(rule, false));
      }
    }