View Javadoc

1   /*
2    * Copyright (C) 2013 Room Work eXperience
3    *
4    * This program is free software: you can redistribute it and/or modify
5    * it under the terms of the GNU General Public License as published by
6    * the Free Software Foundation, either version 3 of the License, or
7    * (at your option) any later version.
8    *
9    * This program is distributed in the hope that it will be useful,
10   * but WITHOUT ANY WARRANTY; without even the implied warranty of
11   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12   * GNU General Public License for more details.
13   *
14   * You should have received a copy of the GNU General Public License
15   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16   */
17  package net.rwx.maven.asciidoc.backends;
18  
19  import java.io.IOException;
20  import org.apache.commons.io.FilenameUtils;
21  
22  /**
23   *
24   * @author Arnaud Fonce <arnaud.fonce@r-w-x.net>
25   */
26  public class AsciidocBackendTransformation {
27  
28      private String extension;
29      private String xsl;
30  
31      public AsciidocBackendTransformation( String extension, String xsl ) {
32          
33          this.extension = extension;
34          this.xsl = xsl;
35      }
36      
37      public String getOutputFile( String inputName ) throws IOException {
38  
39          String atomicName = FilenameUtils.removeExtension( inputName );
40          return net.rwx.maven.asciidoc.utils.FileUtils.getAsciidocTemporaryPath( atomicName, extension );
41      }
42  
43      
44      public String getExtension() {
45          return extension;
46      }
47  
48      public void setExtension( String extension ) {
49          this.extension = extension;
50      }
51  
52      public String getXsl() {
53          return xsl;
54      }
55  
56      public void setXsl( String xsl ) {
57          this.xsl = xsl;
58      }
59  }