Package com.xmultra.processor

Examples of com.xmultra.processor.DestinationWriter


                return false;
            }
        }

        // Set up writer for previous output document.
        this.previousOutputDocumentWriter = new DestinationWriter();
        if ( !this.previousOutputDocumentWriter.init(imh, rssMergeEl, new DateUtils(),
                                                     XmultraConfig.PREVIOUS_OUTPUT_DOCUMENT_LOCATION_ELEMENT) ) {
            return false;
        }

        // Set up writer for previous source document.
        this.previousSourceDocumentWriter = new DestinationWriter();
        if ( !this.previousSourceDocumentWriter.init(imh, rssMergeEl, new DateUtils(),
                                                     XmultraConfig.PREVIOUS_SOURCE_DOCUMENT_LOCATION_ELEMENT) ) {
            return false;
        }
View Full Code Here


            srcDoneLocation = srcDoneLocFile.toString();
        }

        // Create and initialize the Class which will write the data to the destination
        // locations.
        destWriter = new DestinationWriter();
        if (!destWriter.init(imh, super.aProcessorNode, new DateUtils())){
            return false;
        }

        // Get the parent of the DestinationLocation elements.
View Full Code Here

        if (destWriter == null) {

            // Create and initialize the Class which will write the data
            // to the destination locations.
            destWriter = new DestinationWriter();
            try {
                if (!destWriter.init(this.initMapHolder, super.aProcessorNode, new DateUtils())) {
                    throw new InvalidConfigFileFormatException();
                }
            }
View Full Code Here

            this.buffer = new StringBuffer();
            NodeList watchedProceduresList = watchedProceduresNode.getChildNodes();
            procedureDestWriters = new HashMap<String,DestinationWriter>();
            Node procedureNode = null;
            String procedure = null;
            DestinationWriter destWriter = null;

            // Iterate through procedures for which data will be written
            // and build a map containing entries consisting of a
            // procedure name as the key and a destination writer as the value.

            for (int i = 0; i < watchedProceduresList.getLength(); i++) {
                procedureNode = watchedProceduresList.item(i);
                NamedNodeMap procedureAttributes = procedureNode.getAttributes();
                Node attribute =
                    procedureAttributes.getNamedItem(XmultraConfig.PROCEDURE_NAME_ATTRIBUTE);

                if (attribute != null) {
                    procedure = attribute.getNodeValue();
                    if ( procedure != null && !procedure.equals("") ) {
                        destWriter = new DestinationWriter();
                        destWriter.init( imh,
                                         procedureNode,
                                         (DateUtils)imh.getEntry(InitMapHolder.DATE_UTILS) );
                        procedureDestWriters.put(procedure, destWriter);
                    }
                }
View Full Code Here

     * @param name of stored procedure or function, used to look up
     *        DestinationWriter with file locations information
     */
    public void write(String fileName, String procedureName) {

        DestinationWriter destWriter = procedureDestWriters.get(procedureName);

        boolean copyStringData = true;
        boolean roundRobin = false;

        if (destWriter != null) {
            destWriter.writeToLocations(new File(fileName),
                                        this.buffer.toString(),
                                        copyStringData,
                                        roundRobin);
        }
        this.buffer.delete( 0, this.buffer.length() );
View Full Code Here

    private boolean initializeDestWriter() {

        if (this.destWriter == null) {

            // Create and initialize the class that writes the destination locations.
            this.destWriter = new DestinationWriter();
            try {
                if (!destWriter.init(this.initMapHolder, super.aProcessorNode, new DateUtils())) {
                    throw new InvalidConfigFileFormatException();
                }
            }
View Full Code Here

    private boolean initializeDestWriter() {

        if (this.destWriter == null) {

            // Create and initialize the class that writes the destination locations.
            this.destWriter = new DestinationWriter();
            try {
                if (!destWriter.init(this.initMapHolder, super.aProcessorNode, new DateUtils())) {
                    throw new InvalidConfigFileFormatException();
                }
            } catch (InvalidConfigFileFormatException e) {
View Full Code Here

        xmlParseUtils = (XmlParseUtils)initMapHolder.getEntry(InitMapHolder.XML_PARSE_UTILS);

        // Create and initialize the Class which will write the data to the destination
        // locations.
        destWriter = new DestinationWriter();
        if (!destWriter.init(imh, super.aProcessorNode, new DateUtils())){
            return false;
        }

        msgHolder = new MessageHolder();
View Full Code Here

        this.strings = new Strings();
        this.printer = new DOMPrinter(this.xmlParseUtils);

        Element rssMergeEl = (Element)n;

        this.destWriter = new DestinationWriter();

        if ( !this.destWriter.init(imh, rssMergeEl, new DateUtils()) ) {
            return false;
        }
View Full Code Here

        DateUtils dateUtils = new DateUtils(strings);
        initMapHolder.setEntry(this, InitMapHolder.DATE_UTILS, dateUtils);

        // Create and initialize the Class which will write the data to the destination
        // locations.
        destWriter = new DestinationWriter();
        if (!destWriter.init(imh, super.aProcessorNode, new DateUtils())){
            return false;
        }

        // Create Nitf instance and add it to the InitMapHolder.
View Full Code Here

TOP

Related Classes of com.xmultra.processor.DestinationWriter

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.