2011-04-19 16:50:40 +00:00
|
|
|
/* ========================================================================
|
|
|
|
* PlantUML : a free UML diagram generator
|
|
|
|
* ========================================================================
|
|
|
|
*
|
2023-02-22 18:43:48 +00:00
|
|
|
* (C) Copyright 2009-2024, Arnaud Roques
|
2011-04-19 16:50:40 +00:00
|
|
|
*
|
2023-02-22 18:43:48 +00:00
|
|
|
* Project Info: https://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:
|
|
|
|
*
|
2023-02-22 18:43:48 +00:00
|
|
|
* https://plantuml.com/patreon (only 1$ per month!)
|
|
|
|
* https://plantuml.com/paypal
|
2017-03-15 19:13:31 +00:00
|
|
|
*
|
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 {
|
2023-12-11 17:34:23 +00:00
|
|
|
// ::remove folder when __HAXE__
|
|
|
|
UML, BPM, DITAA, DOT, PROJECT, JCCKIT, SALT, FLOW, CREOLE, MATH, LATEX, DEFINITION, GANTT, CHRONOLOGY, NW, MINDMAP,
|
2024-03-16 03:59:49 +00:00
|
|
|
WBS, WIRE, JSON, GIT, BOARD, YAML, HCL, EBNF, REGEX, FILES, CHEN_EER, 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;
|
|
|
|
// }
|
2022-01-28 21:45:34 +00:00
|
|
|
if (StartUtils.startsWithSymbolAnd("startwire", s))
|
2020-02-18 21:24:31 +00:00
|
|
|
return WIRE;
|
2022-01-28 21:45:34 +00:00
|
|
|
|
|
|
|
if (StartUtils.startsWithSymbolAnd("startbpm", s))
|
2017-03-21 21:37:59 +00:00
|
|
|
return BPM;
|
2022-01-28 21:45:34 +00:00
|
|
|
|
|
|
|
if (StartUtils.startsWithSymbolAnd("startuml", s))
|
2011-04-19 16:50:40 +00:00
|
|
|
return UML;
|
2022-01-28 21:45:34 +00:00
|
|
|
|
|
|
|
if (StartUtils.startsWithSymbolAnd("startdot", s))
|
2011-04-19 16:50:40 +00:00
|
|
|
return DOT;
|
2022-01-28 21:45:34 +00:00
|
|
|
|
2023-12-11 17:34:23 +00:00
|
|
|
// ::comment when __CORE__ or __MIT__ or __EPL__ or __BSD__ or __ASL__ or
|
|
|
|
// __LGPL__
|
2022-01-28 21:45:34 +00:00
|
|
|
if (StartUtils.startsWithSymbolAnd("startjcckit", s))
|
2011-09-07 20:41:58 +00:00
|
|
|
return JCCKIT;
|
2023-10-20 13:29:27 +00:00
|
|
|
// ::done
|
2022-01-28 21:45:34 +00:00
|
|
|
|
2023-10-20 13:29:27 +00:00
|
|
|
// ::comment when __CORE__ or __MIT__ or __EPL__ or __BSD__ or __ASL__
|
2022-01-28 21:45:34 +00:00
|
|
|
if (StartUtils.startsWithSymbolAnd("startditaa", s))
|
2011-04-19 16:50:40 +00:00
|
|
|
return DITAA;
|
2023-10-20 13:29:27 +00:00
|
|
|
// ::done
|
2022-01-28 21:45:34 +00:00
|
|
|
|
|
|
|
if (StartUtils.startsWithSymbolAnd("startproject", s))
|
2011-04-19 16:50:40 +00:00
|
|
|
return PROJECT;
|
2022-01-28 21:45:34 +00:00
|
|
|
|
|
|
|
if (StartUtils.startsWithSymbolAnd("startsalt", s))
|
2011-09-07 20:41:58 +00:00
|
|
|
return SALT;
|
2022-01-28 21:45:34 +00:00
|
|
|
|
|
|
|
if (StartUtils.startsWithSymbolAnd("startflow", s))
|
2013-12-10 19:36:50 +00:00
|
|
|
return FLOW;
|
2022-01-28 21:45:34 +00:00
|
|
|
|
|
|
|
if (StartUtils.startsWithSymbolAnd("startcreole", s))
|
2013-12-10 19:36:50 +00:00
|
|
|
return CREOLE;
|
2022-01-28 21:45:34 +00:00
|
|
|
|
|
|
|
if (StartUtils.startsWithSymbolAnd("startmath", s))
|
2016-11-18 21:12:09 +00:00
|
|
|
return MATH;
|
2022-01-28 21:45:34 +00:00
|
|
|
|
|
|
|
if (StartUtils.startsWithSymbolAnd("startlatex", s))
|
2016-12-14 21:01:03 +00:00
|
|
|
return LATEX;
|
2022-01-28 21:45:34 +00:00
|
|
|
|
|
|
|
if (StartUtils.startsWithSymbolAnd("startdef", s))
|
2017-04-05 17:37:42 +00:00
|
|
|
return DEFINITION;
|
2022-01-28 21:45:34 +00:00
|
|
|
|
|
|
|
if (StartUtils.startsWithSymbolAnd("startgantt", s))
|
2017-11-20 16:10:36 +00:00
|
|
|
return GANTT;
|
2022-01-28 21:45:34 +00:00
|
|
|
|
|
|
|
if (StartUtils.startsWithSymbolAnd("startnwdiag", s))
|
2018-11-26 18:46:22 +00:00
|
|
|
return NW;
|
2022-01-28 21:45:34 +00:00
|
|
|
|
|
|
|
if (StartUtils.startsWithSymbolAnd("startmindmap", s))
|
2019-03-01 22:16:29 +00:00
|
|
|
return MINDMAP;
|
2022-01-28 21:45:34 +00:00
|
|
|
|
|
|
|
if (StartUtils.startsWithSymbolAnd("startwbs", s))
|
2019-03-29 22:14:07 +00:00
|
|
|
return WBS;
|
2022-01-28 21:45:34 +00:00
|
|
|
|
|
|
|
if (StartUtils.startsWithSymbolAnd("startjson", s))
|
2020-11-21 17:33:24 +00:00
|
|
|
return JSON;
|
2022-01-28 21:45:34 +00:00
|
|
|
|
|
|
|
if (StartUtils.startsWithSymbolAnd("startgit", s))
|
2020-12-06 21:43:09 +00:00
|
|
|
return GIT;
|
2022-01-28 21:45:34 +00:00
|
|
|
|
|
|
|
if (StartUtils.startsWithSymbolAnd("startboard", s))
|
2020-12-19 21:21:54 +00:00
|
|
|
return BOARD;
|
2022-01-28 21:45:34 +00:00
|
|
|
|
|
|
|
if (StartUtils.startsWithSymbolAnd("startyaml", s))
|
2021-01-10 20:52:19 +00:00
|
|
|
return YAML;
|
2022-01-28 21:45:34 +00:00
|
|
|
|
|
|
|
if (StartUtils.startsWithSymbolAnd("starthcl", s))
|
|
|
|
return HCL;
|
|
|
|
|
2022-09-23 16:53:33 +00:00
|
|
|
if (StartUtils.startsWithSymbolAnd("startebnf", s))
|
|
|
|
return EBNF;
|
|
|
|
|
2022-12-13 17:30:41 +00:00
|
|
|
if (StartUtils.startsWithSymbolAnd("startregex", s))
|
|
|
|
return REGEX;
|
|
|
|
|
2023-06-11 18:44:08 +00:00
|
|
|
if (StartUtils.startsWithSymbolAnd("startfiles", s))
|
|
|
|
return FILES;
|
|
|
|
|
2024-03-16 04:38:41 +00:00
|
|
|
if (StartUtils.startsWithSymbolAnd("startchen", s))
|
|
|
|
return CHEN_EER;
|
|
|
|
|
2011-04-19 16:50:40 +00:00
|
|
|
return UNKNOWN;
|
|
|
|
}
|
|
|
|
}
|