Package com.xmultra.util

Examples of com.xmultra.util.FileUtils


        // Create new Logger object.
        logger = new Logger(initMapHolder, managerNode, this);

        // Create FileUtils and store in InitMapHolder.

        fileUtils = new FileUtils(logger, xmultraRootDir);
        initMapHolder.setEntry(this, InitMapHolder.FILE_UTILS, fileUtils);

        // Get the XmlPaser object and store in InitMapHolder.
        xmlParseUtils = new XmlParseUtils(logger, fileUtils);
        initMapHolder.setEntry(this, InitMapHolder.XML_PARSE_UTILS,
View Full Code Here


    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)) {
View Full Code Here

        // Create new Logger object.
        logger = new Logger(initMapHolder, systemLogsNode, null);

        // Create the FileUtils object and store in InitMapHolder.
        fileUtils = new FileUtils(logger, xmultraRootDir);
        initMapHolder.setEntry(this, InitMapHolder.FILE_UTILS, fileUtils);

        // Create the XmlParseUtils object and store in InitMapHolder.
        xmlParseUtils = new XmlParseUtils(logger, fileUtils);
        initMapHolder.setEntry(this, InitMapHolder.XML_PARSE_UTILS,
View Full Code Here

        return false;
    }

    XmlParseUtils xmlParseUtils = (XmlParseUtils) imh.getEntry(InitMapHolder.
        XML_PARSE_UTILS);
    FileUtils fileUtils = (FileUtils) imh.getEntry(InitMapHolder.FILE_UTILS);
    Strings strings = new Strings();

    // Get the db_utils config file and DTD.
    configDocString = fileUtils.addRoot(configDocString);
    String dbUtilsConfigDocString =
        fileUtils.readFile(new File(configDocString));
    String dbUtilsConfigDTDFile = fileUtils.addRoot("defs/db_utils_cfg.dtd");

    // Add the DTD with root to the config file.
    if (strings.matches(" SYSTEM\\s+\".+\"\\s*>",
                        dbUtilsConfigDocString)) {
      dbUtilsConfigDocString = strings.getPreMatch() + " SYSTEM \"" +
View Full Code Here

TOP

Related Classes of com.xmultra.util.FileUtils

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.