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.File;
20  import java.io.IOException;
21  
22  /**
23   *
24   * @author Arnaud Fonce <arnaud.fonce@r-w-x.net>
25   */
26  public class Backend {
27  
28      public static final String HTML    = "html5";
29      public static final String XHTML   = "xhtml11";
30      public static final String HTML4   = "html4";
31      public static final String SLIDY   = "slidy";
32      public static final String DOCBOOK = "docbook";
33      public static final String PDF     = "pdf";
34      
35      private String name;
36      private String asciidocExtension;
37      private boolean isTransformation;
38      private String transformationExtension;
39      private String transformationStylesheet;
40      private boolean isFopTransformation;
41      private File temporaryDirectory;
42  
43      public Backend( String name, String asciidocExtension ) throws IOException {
44          this( name, asciidocExtension, false, null, null );
45      }
46  
47      public Backend( String name, String asciidocExtension, boolean isTransformation, String transformationExtension, String transformationStylesheet ) {
48          this( name, asciidocExtension, isTransformation, transformationExtension, transformationStylesheet, false );
49      }
50      
51      public Backend( String name, String asciidocExtension, boolean isTransformation, String transformationExtension, String transformationStylesheet, boolean isFop ) {
52          this.name = name;
53          this.asciidocExtension = asciidocExtension;
54          this.isTransformation = isTransformation;
55          this.transformationExtension = transformationExtension;
56          this.transformationStylesheet = transformationStylesheet;
57          this.isFopTransformation = isFop;
58      }
59  
60      public String getName() {
61          return name;
62      }
63  
64      public void setName( String name ) {
65          this.name = name;
66      }
67  
68      public String getAsciidocExtension() {
69          return asciidocExtension;
70      }
71  
72      public void setAsciidocExtension(String asciidocExtension) {
73          this.asciidocExtension = asciidocExtension;
74      }
75  
76      public boolean isIsTransformation() {
77          return isTransformation;
78      }
79  
80      public void setIsTransformation(boolean isTransformation) {
81          this.isTransformation = isTransformation;
82      }
83  
84      public String getTransformationExtension() {
85          return transformationExtension;
86      }
87  
88      public void setTransformationExtension(String transformationExtension) {
89          this.transformationExtension = transformationExtension;
90      }
91  
92      public String getTransformationStylesheet() {
93          return transformationStylesheet;
94      }
95  
96      public void setTransformationStylesheet(String transformationStylesheet) {
97          this.transformationStylesheet = transformationStylesheet;
98      }
99  
100     public boolean isIsFopTransformation() {
101         return isFopTransformation;
102     }
103 
104     public void setIsFopTransformation(boolean isFopTransformation) {
105         this.isFopTransformation = isFopTransformation;
106     }
107 
108     public File getTemporaryDirectory() {
109         return temporaryDirectory;
110     }
111 
112     public void setTemporaryDirectory(File temporaryDirectory) {
113         this.temporaryDirectory = temporaryDirectory;
114     }
115 }