1 package be
.nikiroo
.fanfix
.supported
;
3 import be
.nikiroo
.fanfix
.Instance
;
4 import be
.nikiroo
.fanfix
.bundles
.StringId
;
7 * The supported input types for which we can get a {@link BasicSupport} object.
11 public enum SupportType
{
12 /** EPUB files created with this program */
14 /** Pure text file with some rules */
16 /** TEXT but with associated .info file */
18 /** My Little Pony fanfictions */
20 /** Fanfictions from a lot of different universes */
22 /** Website with lots of Mangas */
24 /** Furry website with comics support */
26 /** Furry website with stories */
28 /** Comics and images groups, mostly but not only NSFW */
30 /** Website with lots of Mangas, in French */
38 * The name of this support type (a short version).
42 public String
getSourceName() {
49 return "e-hentai.org";
53 return "Fanfiction.net";
55 return "FimFiction.net";
74 * A description of this support type (more information than
75 * {@link SupportType#getSourceName()}).
77 * @return the description
79 public String
getDesc() {
80 String desc
= Instance
.getTrans().getStringX(StringId
.INPUT_DESC
,
84 desc
= Instance
.getTrans().getString(StringId
.INPUT_DESC
, this);
91 public String
toString() {
92 return super.toString().toLowerCase();
96 * Call {@link SupportType#valueOf(String)} after conversion to upper case.
99 * the possible type name
101 * @return NULL or the type
103 public static SupportType
valueOfUC(String typeName
) {
104 return SupportType
.valueOf(typeName
== null ?
null : typeName
109 * Call {@link SupportType#valueOf(String)} after conversion to upper case
110 * but return NULL for NULL instead of raising exception.
113 * the possible type name
115 * @return NULL or the type
117 public static SupportType
valueOfNullOkUC(String typeName
) {
118 if (typeName
== null) {
122 return SupportType
.valueOfUC(typeName
);
126 * Call {@link SupportType#valueOf(String)} after conversion to upper case
127 * but return NULL in case of error instead of raising an exception.
130 * the possible type name
132 * @return NULL or the type
134 public static SupportType
valueOfAllOkUC(String typeName
) {
136 return SupportType
.valueOfUC(typeName
);
137 } catch (Exception e
) {