use of org.apache.knox.gateway.topology.builder.TopologyBuilder in project knox by apache.
the class DefaultTopologyService method loadTopologyAttempt.
private Topology loadTopologyAttempt(File file) throws IOException, SAXException, URISyntaxException {
Topology topology;
Digester digester = digesterLoader.newDigester();
TopologyBuilder topologyBuilder = digester.parse(FileUtils.openInputStream(file));
if (null == topologyBuilder) {
return null;
}
topology = topologyBuilder.build();
topology.setUri(file.toURI());
topology.setName(FilenameUtils.removeExtension(file.getName()));
topology.setTimestamp(file.lastModified());
return topology;
}
Aggregations