if (itemText.charAt(0) == '<') {
itemText = "\t\t" + itemText;
}
RssItem item = null;
// An item in a prioritized feed containing MediaNewsRssItem objects
// must be used even if its timestamp is older than the timestamp
// on a non-prioritized item. We initialize itemPriority so we have
// a priority even for an RssItem object.
int itemPriority = Integer.MAX_VALUE;
try {
if (isCleanFeed) {
item = new RssItem(itemText, keepCDataSections);
}
else {
item = new MediaNewsRssItem(itemText, keepCDataSections, this.reader);
itemPriority = ((MediaNewsRssItem)item).getPriority();
}
if ( this.mergeType.equals(XmultraConfig.MERGE_TYPE_ROUND_ROBIN) ) {
// Round robin sort key allows merging one item
// from the first file, then one from the next file, etc.
itemCount++;
roundRobinSortKey = itemCount * 100 + sourceFileNumber;
item.setRoundRobinSortKey(roundRobinSortKey);
}
// Use headline, trimmed and converted to lowercase, as deduplication key
// unless a custom key generator class was configured.
String key = this.keyGenerator.getKey(item);