tagPatterns = new HashMap();
errEntry = new ErrorLogEntry(this, VERSION);
msgEntry = new MessageLogEntry(this, VERSION);
FileUtils fileUtils =
(FileUtils) initMapHolder.getEntry(
InitMapHolder.FILE_UTILS);
logger = (Logger) initMapHolder.getEntry(InitMapHolder.LOGGER);
characters = new Characters(initMapHolder);
Node processorNode =
(Node)initMapHolder.getEntry(InitMapHolder.PROCESSOR_NODE);
// Get properties associated with the news processor
// in the system config file.
NodeList childNodeList = processorNode.getChildNodes();
if (childNodeList.getLength() > 0 &&
processorNode.getNodeType() == Node.ELEMENT_NODE) {
this.propsKeyList = new ArrayList();
this.propsMap = new HashMap();
// Load the "Property" elements into Hashmap/List.
String errMsg =
xmlParseUtils.readPropertiesFromElement((Element)processorNode,
propsKeyList,
propsMap);
// If error, log it and quit.
if (errMsg != null) {
msgEntry.setAppContext("init()");
msgEntry.setError(errMsg);
logger.logWarning(msgEntry);
return false;
}
}
// Get the preparser config file and DTD.
String preParserConfigDocumentStr =
fileUtils.readFile(new File(preParserConfigFileName));
String preParserConfigDTDFile = fileUtils.addRoot(
NewsPreParserConfig.PREPARSER_CFG_DTD_FILE);
// Add the DTD with root to the config file.
if (strings.matches(" SYSTEM\\s+\".+\"\\s*>",
preParserConfigDocumentStr)) {