public XPathPlusExecutor(String command, boolean arcsFilter, boolean filePrint, int base) throws ParserConfigurationException, SAXException, IOException, SQLException, ClassNotFoundException { this.filePrint = filePrint; this.arcsFilter = arcsFilter; this.base = base; if (this.base == StartPoint.OPERATOR_DEFINITION) { this.configFileName = command; // neste caso, o command será antes o path do configFile command = XMLUtil.getCommandOperatorDefinition(new File(this.configFileName)); } this.context = this.filePrint ? new Context() : null; execute(command); }
public XPathPlusExecutor(String configFileName) throws ParserConfigurationException, SAXException, IOException, SQLException, ClassNotFoundException { this.configFileName = configFileName; if (this.configFileName != null) { this.startpoint = XMLUtil.getStartPoint(new File(this.configFileName)); if (this.startpoint != null) { this.arcsFilter = this.startpoint.isFilter(); this.filePrint = this.startpoint.isPrint(); this.base = this.startpoint.getBase(); } else { this.filePrint = true; this.arcsFilter = true; } } this.context = this.filePrint ? new Context() : null; if (this.startpoint != null) execute(this.startpoint.getExpression()); }