private XMLResourceGenerator repository() { XMLResourceGenerator repository = new XMLResourceGenerator(); List<Resource> resources = getResources(); repository.resources(resources); if (name != null) { repository.name(name); } if (increment > -1) { repository.increment(increment); } if (compress) { repository.compress(); } return repository; }
private XMLResourceGenerator repository() { XMLResourceGenerator repository = new XMLResourceGenerator(); List<Resource> resources = getResources(); repository.resources(resources); if (name != null) { repository.name(name); } if (increment > -1) { repository.increment(increment); } if (compress) { repository.compress(); } return repository; }
public void _index(IndexOptions options) throws Exception { ResourcesRepository repo = new ResourcesRepository(); List<URI> files = getFiles(); logger.debug("index files : {}", files); files.forEach(jar -> parse(repo, jar)); XMLResourceGenerator xrg = new XMLResourceGenerator().indent(2); if (options.name() != null) xrg.name(options.name()); if (options.referal() != null) xrg.referral(options.referal(), options.depth() <= 0 ? 3 : options.depth()); xrg.repository(repo); if (options.output() != null) { File f = IO.getFile(options.output()); f.getParentFile() .mkdirs(); xrg.compress() .save(f); } else { xrg.indent(2); xrg.save(System.out); } }
public void _index(IndexOptions options) throws Exception { ResourcesRepository repo = new ResourcesRepository(); List<URI> files = getFiles(); logger.debug("index files : {}", files); files.forEach(jar -> parse(repo, jar)); XMLResourceGenerator xrg = new XMLResourceGenerator().indent(2); if (options.name() != null) xrg.name(options.name()); if (options.referal() != null) xrg.referral(options.referal(), options.depth() <= 0 ? 3 : options.depth()); xrg.repository(repo); if (options.output() != null) { File f = IO.getFile(options.output()); f.getParentFile() .mkdirs(); xrg.compress() .save(f); } else { xrg.indent(2); xrg.save(System.out); } }