/** * Returns a new FopFactory instance that is configured using the {@link FopFactoryConfig} object that * is created when the fopConf is parsed. * * @param fopConf the fop conf configuration file to parse * @return the requested FopFactory instance. * @throws IOException * @throws SAXException */ public static FopFactory newInstance(File fopConf) throws SAXException, IOException { return new FopConfParser(fopConf).getFopFactoryBuilder().build(); }
/** * Returns a new FopFactory instance that is configured using the {@link FopFactoryConfig} object that * is created when the fopConf is parsed. * * @param baseURI the base URI to resolve resource URIs against * @param confStream the fop conf configuration stream to parse * @return the requested FopFactory instance. * @throws SAXException * @throws IOException */ public static FopFactory newInstance(URI baseURI, InputStream confStream) throws SAXException, IOException { return new FopConfParser(confStream, baseURI).getFopFactoryBuilder().build(); }
FOPTaskStarter(Fop task) throws SAXException, IOException { this.task = task; //Set base directory if (task.getBasedir() != null) { this.baseUri = task.getBasedir().toURI(); } else { if (task.getFofile() != null) { this.baseUri = task.getFofile().getParentFile().toURI(); } } if (task.getUserconfig() != null) { FopFactoryBuilder confBuilder = new FopConfParser( task.getUserconfig()).getFopFactoryBuilder(); confBuilder.setBaseURI(baseUri); fopFactory = confBuilder.build(); } else { fopFactory = FopFactory.newInstance(baseUri); } }
} else { try { FopConfParser fopConfParser = new FopConfParser(userConfigFile, baseURI); fopFactoryBuilder = fopConfParser.getFopFactoryBuilder(); if (this.overrideTargetResolution) {