if (extractorNodes != null && extractorNodes.getLength() > 0) {
extractors = new Vector<ExtractorSpec>();
for (int i = 0; i < extractorNodes.getLength(); i++) {
Element extractorElem = (Element) extractorNodes.item(i);
ExtractorSpec spec = new ExtractorSpec();
String className = extractorElem.getAttribute("class");
spec.setClassName(className);
// see if there are any configuration properties
Element configuration = XMLUtils.getFirstElement(
"configuration", extractorElem);
if (configuration != null) {
Properties config = new Properties();
NodeList propertyNodes = configuration
.getElementsByTagName("property");
if (propertyNodes != null
&& propertyNodes.getLength() > 0) {
for (int j = 0; j < propertyNodes.getLength(); j++) {
Element propertyElem = (Element) propertyNodes
.item(j);
String propertyName = propertyElem
.getAttribute("name");
String propertyValue = propertyElem
.getAttribute("value");
if (Boolean
.valueOf(
propertyElem
.getAttribute("envReplace"))
.booleanValue()) {
propertyValue = PathUtils
.replaceEnvVariables(propertyValue);
}
config.setProperty(propertyName, propertyValue);
}
spec.setConfiguration(config);
}
}
extractors.add(spec);
}