Package com.xmultra.util

Examples of com.xmultra.util.XmlParseUtils


        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,
                               xmlParseUtils);

        // Get the System element.
        Node systemNode = xmlParseUtils.getSingletonNode(
View Full Code Here


        // 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,
                               xmlParseUtils);

        // Initialize the error log (must be done after the FileUtils and
        // XmlParseUtils objects are in the InitMapHolder.
View Full Code Here

        if ( !super.init(imh, configDocString) ) {
            return false;
        }

        Node processorNode = (Node)imh.getEntry(InitMapHolder.PROCESSOR_NODE);
        XmlParseUtils xmlParseUtils = (XmlParseUtils)imh.getEntry(InitMapHolder.XML_PARSE_UTILS);

        if (xmlParseUtils != null && processorNode != null) {
            this.databaseOwner =
                xmlParseUtils.getAttributeValueFromNode(processorNode,
                                                        XmultraConfig.DB_OWNER_ATTRIBUTE);
        }
        else {
            super.msgEntry.setAppContext("init()");
            super.msgEntry.setMessageText("Unable to get database owner from system " +
View Full Code Here

    if ( !super.init(imh, configDocString) ) {
        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 \"" +
          dbUtilsConfigDTDFile + "\">" + strings.getPostMatch();
    }

    // Convert the config String to an Xml Document.
    try {
      this.dbUtilsConfigDoc = xmlParseUtils.convertStringToXmlDocument(
          dbUtilsConfigDocString, true);
    }
    catch (SAXException e) {
      errEntry.setThrowable(e);
      errEntry.setAppContext("init()");
      errEntry.setDocInfo(configDocString);
      errEntry.setAppMessage("Error while parsing DbUtils config file.");
      logger.logError(errEntry);

      return false;
    }
    Element rootElem = dbUtilsConfigDoc.getDocumentElement();
    Element contentFactElem = xmlParseUtils.getSingletonElement(rootElem,
        "ContentFactoryClass");
    Element contentPersistenceElem = xmlParseUtils.getSingletonElement(rootElem,
        "ContentPersistenceClass");

    String contentFactoryString = xmlParseUtils.getTextFromNode(contentFactElem).
        trim();
    Console.displayDev("CMSDbUtils",
                       "ContentFactory class: " + contentFactoryString, true,
                       "scb");
    String contentPersistString = xmlParseUtils.getTextFromNode(
        contentPersistenceElem).trim();
    Console.displayDev("CMSDbUtils",
                       "Persistence class: " + contentPersistString, true,
                       "scb");

View Full Code Here

        String nDocument = nitfDoc.getDoc();
        int paragraphCount = 0;
        StringBuffer lead = new StringBuffer();
        Document xmlDoc = null;
        //get the parse utilities from the parent of this xformer
        XmlParseUtils xmlParser = super.getXmlParseUtils();
        try {
            xmlDoc = xmlParser.convertStringToXmlDocument(nDocument, false);
        } catch (SAXException e) {
            errEntry.setThrowable(e);
            errEntry.setAppContext("getLeadFromDOM()");
            errEntry.setDocInfo(super.nitfProcessorConfigFilename);
            errEntry.setAppMessage("Document format error while parsing: " + nitfDoc.getFileName()
View Full Code Here

TOP

Related Classes of com.xmultra.util.XmlParseUtils

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.