1
0
mirror of https://github.com/octoleo/plantuml.git synced 2024-06-02 00:20:49 +00:00
plantuml/src/net/sourceforge/plantuml/core/DiagramType.java

122 lines
3.4 KiB
Java
Raw Normal View History

2011-04-19 16:50:40 +00:00
/* ========================================================================
* PlantUML : a free UML diagram generator
* ========================================================================
*
2019-01-16 18:34:41 +00:00
* (C) Copyright 2009-2020, Arnaud Roques
2011-04-19 16:50:40 +00:00
*
2016-03-06 16:47:34 +00:00
* Project Info: http://plantuml.com
2011-04-19 16:50:40 +00:00
*
2017-03-15 19:13:31 +00:00
* If you like this project or if you find it useful, you can support us at:
*
* http://plantuml.com/patreon (only 1$ per month!)
* http://plantuml.com/paypal
*
2011-04-19 16:50:40 +00:00
* This file is part of PlantUML.
*
* PlantUML is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* PlantUML distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
2013-12-10 19:36:50 +00:00
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
2011-04-19 16:50:40 +00:00
* License for more details.
*
* You should have received a copy of the GNU General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
* USA.
*
*
* Original Author: Arnaud Roques
*
*
*/
2013-12-10 19:36:50 +00:00
package net.sourceforge.plantuml.core;
2011-04-19 16:50:40 +00:00
2016-06-19 14:16:41 +00:00
import net.sourceforge.plantuml.utils.StartUtils;
2011-04-19 16:50:40 +00:00
public enum DiagramType {
2020-11-21 17:33:24 +00:00
UML, BPM, DITAA, DOT, PROJECT, JCCKIT, SALT, FLOW, CREOLE, JUNGLE, CUTE, MATH, LATEX,
2021-01-10 20:52:19 +00:00
DEFINITION, GANTT, NW, MINDMAP, WBS, WIRE, JSON, GIT, BOARD, YAML,
2020-11-21 17:33:24 +00:00
UNKNOWN;
2011-04-19 16:50:40 +00:00
2013-12-10 19:36:50 +00:00
static public DiagramType getTypeFromArobaseStart(String s) {
2015-08-05 20:17:01 +00:00
s = s.toLowerCase();
2016-06-19 14:16:41 +00:00
// if (s.startsWith("@startuml2")) {
// return UML2;
// }
2020-02-18 21:24:31 +00:00
if (StartUtils.startsWithSymbolAnd("startwire", s)) {
return WIRE;
}
2017-03-21 21:37:59 +00:00
if (StartUtils.startsWithSymbolAnd("startbpm", s)) {
return BPM;
}
2016-06-19 14:16:41 +00:00
if (StartUtils.startsWithSymbolAnd("startuml", s)) {
2011-04-19 16:50:40 +00:00
return UML;
}
2016-06-19 14:16:41 +00:00
if (StartUtils.startsWithSymbolAnd("startdot", s)) {
2011-04-19 16:50:40 +00:00
return DOT;
}
2016-06-19 14:16:41 +00:00
if (StartUtils.startsWithSymbolAnd("startjcckit", s)) {
2011-09-07 20:41:58 +00:00
return JCCKIT;
}
2016-06-19 14:16:41 +00:00
if (StartUtils.startsWithSymbolAnd("startditaa", s)) {
2011-04-19 16:50:40 +00:00
return DITAA;
}
2016-06-19 14:16:41 +00:00
if (StartUtils.startsWithSymbolAnd("startproject", s)) {
2011-04-19 16:50:40 +00:00
return PROJECT;
}
2016-06-19 14:16:41 +00:00
if (StartUtils.startsWithSymbolAnd("startsalt", s)) {
2011-09-07 20:41:58 +00:00
return SALT;
}
2016-06-19 14:16:41 +00:00
if (StartUtils.startsWithSymbolAnd("startflow", s)) {
2013-12-10 19:36:50 +00:00
return FLOW;
}
2016-06-19 14:16:41 +00:00
if (StartUtils.startsWithSymbolAnd("startcreole", s)) {
2013-12-10 19:36:50 +00:00
return CREOLE;
}
2016-06-19 14:16:41 +00:00
if (StartUtils.startsWithSymbolAnd("starttree", s)) {
2015-04-07 18:18:37 +00:00
return JUNGLE;
}
2016-06-19 14:16:41 +00:00
if (StartUtils.startsWithSymbolAnd("startcute", s)) {
2015-04-07 18:18:37 +00:00
return CUTE;
}
2016-11-18 21:12:09 +00:00
if (StartUtils.startsWithSymbolAnd("startmath", s)) {
return MATH;
}
2016-12-14 21:01:03 +00:00
if (StartUtils.startsWithSymbolAnd("startlatex", s)) {
return LATEX;
}
2017-04-05 17:37:42 +00:00
if (StartUtils.startsWithSymbolAnd("startdef", s)) {
return DEFINITION;
}
2017-11-20 16:10:36 +00:00
if (StartUtils.startsWithSymbolAnd("startgantt", s)) {
return GANTT;
}
2018-11-26 18:46:22 +00:00
if (StartUtils.startsWithSymbolAnd("startnwdiag", s)) {
return NW;
}
2019-03-01 22:16:29 +00:00
if (StartUtils.startsWithSymbolAnd("startmindmap", s)) {
return MINDMAP;
}
2019-03-29 22:14:07 +00:00
if (StartUtils.startsWithSymbolAnd("startwbs", s)) {
return WBS;
}
2020-11-21 17:33:24 +00:00
if (StartUtils.startsWithSymbolAnd("startjson", s)) {
return JSON;
}
2020-12-06 21:43:09 +00:00
if (StartUtils.startsWithSymbolAnd("startgit", s)) {
return GIT;
}
2020-12-19 21:21:54 +00:00
if (StartUtils.startsWithSymbolAnd("startboard", s)) {
return BOARD;
}
2021-01-10 20:52:19 +00:00
if (StartUtils.startsWithSymbolAnd("startyaml", s)) {
return YAML;
}
2011-04-19 16:50:40 +00:00
return UNKNOWN;
}
}