| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| Converter |
|
| 1.0;1 |
| 1 | package org.apache.maven.doxia; | |
| 2 | ||
| 3 | /* | |
| 4 | * Licensed to the Apache Software Foundation (ASF) under one | |
| 5 | * or more contributor license agreements. See the NOTICE file | |
| 6 | * distributed with this work for additional information | |
| 7 | * regarding copyright ownership. The ASF licenses this file | |
| 8 | * to you under the Apache License, Version 2.0 (the | |
| 9 | * "License"); you may not use this file except in compliance | |
| 10 | * with the License. You may obtain a copy of the License at | |
| 11 | * | |
| 12 | * http://www.apache.org/licenses/LICENSE-2.0 | |
| 13 | * | |
| 14 | * Unless required by applicable law or agreed to in writing, | |
| 15 | * software distributed under the License is distributed on an | |
| 16 | * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | |
| 17 | * KIND, either express or implied. See the License for the | |
| 18 | * specific language governing permissions and limitations | |
| 19 | * under the License. | |
| 20 | */ | |
| 21 | ||
| 22 | import org.apache.maven.doxia.logging.LogEnabled; | |
| 23 | import org.apache.maven.doxia.wrapper.InputFileWrapper; | |
| 24 | import org.apache.maven.doxia.wrapper.InputReaderWrapper; | |
| 25 | import org.apache.maven.doxia.wrapper.OutputFileWrapper; | |
| 26 | import org.apache.maven.doxia.wrapper.OutputStreamWrapper; | |
| 27 | ||
| 28 | /** | |
| 29 | * Interface to convert a Doxia input wrapper to a Doxia output wrapper. | |
| 30 | * | |
| 31 | * @author <a href="mailto:vincent.siveton@gmail.com">Vincent Siveton</a> | |
| 32 | * @version $Id: Converter.java 712860 2008-11-10 22:54:37Z hboutemy $ | |
| 33 | */ | |
| 34 | public interface Converter | |
| 35 | extends LogEnabled | |
| 36 | { | |
| 37 | /** | |
| 38 | * @return a not null array containing supported input formats, i.e. <code>apt</code>. | |
| 39 | */ | |
| 40 | String[] getInputFormats(); | |
| 41 | ||
| 42 | /** | |
| 43 | * @return a not null array containing supported output formats, i.e. <code>xhtml</code>. | |
| 44 | */ | |
| 45 | String[] getOutputFormats(); | |
| 46 | ||
| 47 | /** | |
| 48 | * @param input an input file wrapper, not null. | |
| 49 | * @param output an output file wrapper, not null. | |
| 50 | * @throws UnsupportedFormatException if any | |
| 51 | * @throws ConverterException if any | |
| 52 | */ | |
| 53 | void convert( InputFileWrapper input, OutputFileWrapper output ) | |
| 54 | throws UnsupportedFormatException, ConverterException; | |
| 55 | ||
| 56 | /** | |
| 57 | * @param input an input reader wrapper, not null. | |
| 58 | * @param output an output writer wrapper, not null. | |
| 59 | * @throws UnsupportedFormatException if any | |
| 60 | * @throws ConverterException if any | |
| 61 | */ | |
| 62 | void convert( InputReaderWrapper input, OutputStreamWrapper output ) | |
| 63 | throws UnsupportedFormatException, ConverterException; | |
| 64 | ||
| 65 | /** | |
| 66 | * Make the generated files human readable. | |
| 67 | * <br/> | |
| 68 | * <b>Note</b>: actually, only XML based outputs could be formatted. | |
| 69 | * | |
| 70 | * @param formatOutput <code>true</code> to format the generated files, <code>false</code> otherwise. | |
| 71 | */ | |
| 72 | void setFormatOutput( boolean formatOutput ); | |
| 73 | } |