mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-22 00:00:59 +02:00
3b40b98256
*) minor changes git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7567 6c8d7289-2bf4-0310-a012-ef5d649a1542
41 lines
958 B
Java
41 lines
958 B
Java
package de.anomic.search;
|
|
|
|
public enum ContentDomain {
|
|
|
|
ALL(-1),
|
|
TEXT(0),
|
|
IMAGE(1),
|
|
AUDIO(2),
|
|
VIDEO(3),
|
|
APP(4);
|
|
|
|
private int code;
|
|
|
|
ContentDomain(int code) {
|
|
this.code = code;
|
|
}
|
|
|
|
public int getCode() {
|
|
return this.code;
|
|
}
|
|
|
|
public static ContentDomain contentdomParser(final String dom) {
|
|
if ("text".equals(dom)) return TEXT;
|
|
else if ("image".equals(dom)) return IMAGE;
|
|
else if ("audio".equals(dom)) return AUDIO;
|
|
else if ("video".equals(dom)) return VIDEO;
|
|
else if ("app".equals(dom)) return APP;
|
|
return TEXT;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
if (this == TEXT) return "text";
|
|
else if (this == IMAGE) return "image";
|
|
else if (this == AUDIO) return "audio";
|
|
else if (this == VIDEO) return "video";
|
|
else if (this == APP) return "app";
|
|
return "text";
|
|
}
|
|
}
|