mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-21 00:00:13 +02:00
4c6312d103
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6489 6c8d7289-2bf4-0310-a012-ef5d649a1542
40 lines
944 B
Java
40 lines
944 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 (dom.equals("text")) return TEXT;
|
|
else if (dom.equals("image")) return IMAGE;
|
|
else if (dom.equals("audio")) return AUDIO;
|
|
else if (dom.equals("video")) return VIDEO;
|
|
else if (dom.equals("app")) return APP;
|
|
return TEXT;
|
|
}
|
|
|
|
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";
|
|
}
|
|
}
|