All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.apache.maven.doxia.Converter Maven / Gradle / Ivy

There is a newer version: 1.3
Show newest version
package org.apache.maven.doxia;

/*
 * Licensed to the Apache Software Foundation (ASF) under one
 * or more contributor license agreements.  See the NOTICE file
 * distributed with this work for additional information
 * regarding copyright ownership.  The ASF licenses this file
 * to you under the Apache License, Version 2.0 (the
 * "License"); you may not use this file except in compliance
 * with the License.  You may obtain a copy of the License at
 *
 *   http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing,
 * software distributed under the License is distributed on an
 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 * KIND, either express or implied.  See the License for the
 * specific language governing permissions and limitations
 * under the License.
 */

import org.apache.maven.doxia.logging.LogEnabled;
import org.apache.maven.doxia.wrapper.InputFileWrapper;
import org.apache.maven.doxia.wrapper.InputReaderWrapper;
import org.apache.maven.doxia.wrapper.OutputFileWrapper;
import org.apache.maven.doxia.wrapper.OutputStreamWrapper;

/**
 * Interface to convert a Doxia input wrapper to a Doxia output wrapper.
 *
 * @author Vincent Siveton
 * @version $Id: Converter.java 712860 2008-11-10 22:54:37Z hboutemy $
 */
public interface Converter
    extends LogEnabled
{
    /**
     * @return a not null array containing supported input formats, i.e. apt.
     */
    String[] getInputFormats();

    /**
     * @return a not null array containing supported output formats, i.e. xhtml.
     */
    String[] getOutputFormats();

    /**
     * @param input an input file wrapper, not null.
     * @param output an output file wrapper, not null.
     * @throws UnsupportedFormatException if any
     * @throws ConverterException if any
     */
    void convert( InputFileWrapper input, OutputFileWrapper output )
        throws UnsupportedFormatException, ConverterException;

    /**
     * @param input an input reader wrapper, not null.
     * @param output an output writer wrapper, not null.
     * @throws UnsupportedFormatException if any
     * @throws ConverterException if any
     */
    void convert( InputReaderWrapper input, OutputStreamWrapper output )
        throws UnsupportedFormatException, ConverterException;

    /**
     * Make the generated files human readable.
     * 
* Note: actually, only XML based outputs could be formatted. * * @param formatOutput true to format the generated files, false otherwise. */ void setFormatOutput( boolean formatOutput ); }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy