log.info("Reading configuration of SIREn's datatype analyzer");
try {
// pass the config resource loader to avoid building an empty one for no reason:
// in the current case though, the stream is valid so we wont load the resource by name
final Config schemaConf = new Config(loader, "datatypeConfig", is, "/datatypeConfig/");
final Document document = schemaConf.getDocument();
final XPath xpath = schemaConf.getXPath();
final Node nd = (Node) xpath.evaluate("/datatypeConfig/@name", document, XPathConstants.NODE);
if (nd == null) {
log.warn("datatypeConfig has no name!");
}
else {
name = nd.getNodeValue();
log.info("datatypeConfig name=" + name);
}
version = schemaConf.get("/datatypeConfig/@version");
final AbstractPluginLoader<Datatype> datatypeLoader =
new AbstractPluginLoader<Datatype>("[datatypeConfig] datatype",
Datatype.class, true, true) {