Exclusion excl = (Exclusion) value;
String title = excl.getTitle();
String topic = excl.getTopic();
ProgramFilter filter = excl.getFilter();
Channel channel = excl.getChannel();
String timeMsg = createTimeMessage(excl.getTimeLowerBound(), excl.getTimeUpperBound(), excl.getDayOfWeek());
StringBuilder textValue = new StringBuilder();
if(title != null) {
textValue.append(mLocalizer.msg("exclude.title","Exclude all programs with title '")).append(title).append("'");
}
if(topic != null && title != null) {
textValue.append(" ").append(mLocalizer.msg("appendTopic","with topic '")).append(topic).append("'");
}
else if (topic != null) {
textValue.append(mLocalizer.msg("exclude.topic","Exclude all programs with topic '")).append(topic).append("'");
}
if(filter != null && (title != null || topic != null)) {
textValue.append(" ").append(mLocalizer.msg("appendFilter","of the filter '")).append(filter.getName()).append("'");
}
else if(filter != null) {
textValue.append(mLocalizer.msg("exclude.filter","Exclude all programs of the filter '")).append(filter.getName()).append("'");
}
if(channel != null && (title != null || topic != null || filter != null)) {
textValue.append(" ").append(mLocalizer.msg("exclude.appendChannel","on channel '")).append(channel.getName()).append("'");
}
else if(channel != null) {
textValue.append(mLocalizer.msg("exclude.channel","Exclude all programs on channel '")).append(channel.getName()).append("'");
}
if(timeMsg != null && (title != null || topic != null || filter != null || channel != null)) {
textValue.append(" ").append(timeMsg);
}
else if(timeMsg != null) {