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