yacy_search_server/source/de/anomic/search/ContentDomain.java
low012 3b40b98256 *) set SVN properties
*) minor changes

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@7567 6c8d7289-2bf4-0310-a012-ef5d649a1542
2011-03-08 01:51:51 +00:00

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";
}
}