001    /*--------------------------------------------------------------------------+
002    $Id: EGraphvizOutputFormat.java 26283 2010-02-18 11:18:57Z juergens $
003    |                                                                          |
004    | Copyright 2005-2010 Technische Universitaet Muenchen                     |
005    |                                                                          |
006    | Licensed under the Apache License, Version 2.0 (the "License");          |
007    | you may not use this file except in compliance with the License.         |
008    | You may obtain a copy of the License at                                  |
009    |                                                                          |
010    |    http://www.apache.org/licenses/LICENSE-2.0                            |
011    |                                                                          |
012    | Unless required by applicable law or agreed to in writing, software      |
013    | distributed under the License is distributed on an "AS IS" BASIS,        |
014    | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
015    | See the License for the specific language governing permissions and      |
016    | limitations under the License.                                           |
017    +--------------------------------------------------------------------------*/
018    package edu.tum.cs.commons.graph;
019    
020    /**
021     * Enumeration for the different output formats supported by Graphviz.
022     * 
023     * @author Florian Deissenboeck
024     * @author $Author: juergens $
025     * @version $Rev: 26283 $
026     * @levd.rating GREEN Hash: 93708A2516E77EFF1803AA7B78296D41
027     */
028    public enum EGraphvizOutputFormat {
029    
030            /** canon */
031            CANON("Prettyprint input; no layout is done.", "dot"),
032    
033            /** dot */
034            DOT("Attributed DOT. Prints input with layout information attached.", "dot"),
035    
036            /** gif */
037            GIF("GIF output.", "gif"),
038    
039            /** jpeg */
040            JPG("JPEG output.", "jpg"),
041    
042            /** ps2 */
043            PS2("PostScript (EPSF) output with PDF annotations.", "ps"),
044    
045            /** png */
046            PNG("PNG (Portable Network Graphics) output.", "png"),
047            
048            /** svg */
049            SVG("SVG (Scalable Vector Graphics) output.", "svg");
050    
051            /** Format description. */
052            private final String description;
053    
054            /** File extension typically used for this format. */
055            private final String fileExtension;
056    
057            /**
058             * Create enum constant.
059             */
060            private EGraphvizOutputFormat(String description, String fileExtension) {
061                    this.description = description;
062                    this.fileExtension = fileExtension;
063            }
064    
065            /**
066             * Get format description.
067             */
068            public String getDescription() {
069                    return description;
070            }
071    
072            /**
073             * Get file extension typically used for this format.
074             */
075            public String getFileExtension() {
076                    return fileExtension;
077            }
078    
079    }