reportError("Atom feed can only be created from a collection wrapper", null);
} else if (!isFeed && isCollection) {
reportError("Atom entry can only be created from a single object", null);
}
Element atomElement = null;
try {
if (isFeed && !isCollection) {
atomElement = createFeedFromCollectionWrapper(o);
} else if (!isFeed && !isCollection) {
atomElement = createEntryFromObject(o, clazz);