Flud+ v1.11.1.2版本的 MD5 值为:8801c2f52bfd51902dee3a73c65b73f8
以下内容为反编译后的 Atom03Generator.java 源代码,内容仅作参考
package com.rometools.rome.io.impl;
import a2.s;
import android.support.v4.app.Cz.lULEES;
import com.rometools.rome.feed.WireFeed;
import com.rometools.rome.feed.atom.Content;
import com.rometools.rome.feed.atom.Entry;
import com.rometools.rome.feed.atom.Feed;
import com.rometools.rome.feed.atom.Generator;
import com.rometools.rome.feed.atom.Link;
import com.rometools.rome.feed.synd.SyndPerson;
import com.rometools.rome.io.FeedException;
import java.io.StringReader;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Locale;
import sa.a;
import sa.n;
import sa.o;
import sa.r;
import u.Nz.KturzdTUzt;
import w1.llGs.bzCjAJfOzUJwCf;
public class Atom03Generator extends BaseWireFeedGenerator {
private static final String ATOM_03_URI = "http://purl.org/atom/ns#";
private static final r ATOM_NS = r.a("", ATOM_03_URI);
private final String version;
public Atom03Generator() {
this("atom_0.3", "0.3");
}
public Atom03Generator(String str, String str2) {
super(str);
this.version = str2;
}
public void addEntries(Feed feed, o oVar) {
for (Entry entry : feed.getEntries()) {
addEntry(entry, oVar);
}
checkEntriesConstraints(oVar);
}
public void addEntry(Entry entry, o oVar) {
o oVar2 = new o("entry", getFeedNamespace());
populateEntry(entry, oVar2);
checkEntryConstraints(oVar2);
generateItemModules(entry.getModules(), oVar2);
oVar.h(oVar2);
}
public void addFeed(Feed feed, o oVar) {
populateFeedHeader(feed, oVar);
checkFeedHeaderConstraints(oVar);
generateFeedModules(feed.getModules(), oVar);
generateForeignMarkup(oVar, feed.getForeignMarkup());
}
public void checkEntriesConstraints(o oVar) {
}
public void checkEntryConstraints(o oVar) {
}
public void checkFeedHeaderConstraints(o oVar) {
}
public n createDocument(o oVar) {
return new n(oVar);
}
public o createRootElement(Feed feed) {
o oVar = new o(bzCjAJfOzUJwCf.uBbEhNwVDlIZyjn, getFeedNamespace());
oVar.i(getFeedNamespace());
oVar.A(new a("version", getVersion()));
generateModuleNamespaceDefs(oVar);
return oVar;
}
public void fillContentElement(o oVar, Content content) {
String type = content.getType();
if (type != null) {
s.v("type", type, oVar);
}
String mode = content.getMode();
if (mode != null) {
s.v("mode", mode, oVar);
}
String value = content.getValue();
if (value != null) {
if (mode == null || mode.equals(Content.ESCAPED)) {
oVar.e(value);
} else if (mode.equals(Content.BASE64)) {
oVar.e(Base64.encode(value));
} else if (mode.equals(Content.XML)) {
StringBuffer stringBuffer = new StringBuffer("<tmpdoc>");
stringBuffer.append(value);
stringBuffer.append("</tmpdoc>");
try {
o c10 = new va.a(null).build(new StringReader(stringBuffer.toString())).c();
c10.getClass();
ArrayList arrayList = new ArrayList(c10.f11583p);
c10.f11583p.clear();
oVar.f(arrayList);
} catch (Exception e10) {
throw new FeedException("Invalid XML", e10);
}
}
}
}
public void fillPersonElement(o oVar, SyndPerson syndPerson) {
String name = syndPerson.getName();
if (name != null) {
oVar.h(generateSimpleElement("name", name));
}
String uri = syndPerson.getUri();
if (uri != null) {
oVar.h(generateSimpleElement("url", uri));
}
String email = syndPerson.getEmail();
if (email != null) {
oVar.h(generateSimpleElement("email", email));
}
}
@Override
public n generate(WireFeed wireFeed) {
Feed feed = (Feed) wireFeed;
o createRootElement = createRootElement(feed);
populateFeed(feed, createRootElement);
BaseWireFeedGenerator.purgeUnusedNamespaceDeclarations(createRootElement);
return createDocument(createRootElement);
}
public o generateGeneratorElement(Generator generator) {
o oVar = new o("generator", getFeedNamespace());
String url = generator.getUrl();
if (url != null) {
s.v("url", url, oVar);
}
String version = generator.getVersion();
if (version != null) {
s.v("version", version, oVar);
}
String value = generator.getValue();
if (value != null) {
oVar.e(value);
}
return oVar;
}
public o generateLinkElement(Link link) {
o oVar = new o("link", getFeedNamespace());
String rel = link.getRel();
if (rel != null) {
s.v("rel", rel, oVar);
}
String type = link.getType();
if (type != null) {
s.v("type", type, oVar);
}
String href = link.getHref();
if (href != null) {
s.v("href", href, oVar);
}
return oVar;
}
public o generateSimpleElement(String str, String str2) {
o oVar = new o(str, getFeedNamespace());
oVar.e(str2);
return oVar;
}
public o generateTagLineElement(Content content) {
o oVar = new o("tagline", getFeedNamespace());
String type = content.getType();
if (type != null) {
s.v("type", type, oVar);
}
String value = content.getValue();
if (value != null) {
oVar.e(value);
}
return oVar;
}
public r getFeedNamespace() {
return ATOM_NS;
}
public String getVersion() {
return this.version;
}
public void populateEntry(Entry entry, o oVar) {
Content titleEx = entry.getTitleEx();
if (titleEx != null) {
o oVar2 = new o("title", getFeedNamespace());
fillContentElement(oVar2, titleEx);
oVar.h(oVar2);
}
for (Link link : entry.getAlternateLinks()) {
oVar.h(generateLinkElement(link));
}
for (Link link2 : entry.getOtherLinks()) {
oVar.h(generateLinkElement(link2));
}
List<SyndPerson> authors = entry.getAuthors();
if (x8.a.R(authors)) {
o oVar3 = new o("author", getFeedNamespace());
fillPersonElement(oVar3, authors.get(0));
oVar.h(oVar3);
}
for (SyndPerson syndPerson : entry.getContributors()) {
o oVar4 = new o("contributor", getFeedNamespace());
fillPersonElement(oVar4, syndPerson);
oVar.h(oVar4);
}
String id = entry.getId();
if (id != null) {
oVar.h(generateSimpleElement("id", id));
}
Date modified = entry.getModified();
if (modified != null) {
o oVar5 = new o("modified", getFeedNamespace());
oVar5.e(DateParser.formatW3CDateTime(modified, Locale.US));
oVar.h(oVar5);
}
Date issued = entry.getIssued();
if (issued != null) {
o oVar6 = new o("issued", getFeedNamespace());
oVar6.e(DateParser.formatW3CDateTime(issued, Locale.US));
oVar.h(oVar6);
}
Date created = entry.getCreated();
if (created != null) {
o oVar7 = new o("created", getFeedNamespace());
oVar7.e(DateParser.formatW3CDateTime(created, Locale.US));
oVar.h(oVar7);
}
Content summary = entry.getSummary();
if (summary != null) {
o oVar8 = new o(lULEES.WRHhMK, getFeedNamespace());
fillContentElement(oVar8, summary);
oVar.h(oVar8);
}
for (Content content : entry.getContents()) {
o oVar9 = new o("content", getFeedNamespace());
fillContentElement(oVar9, content);
oVar.h(oVar9);
}
generateForeignMarkup(oVar, entry.getForeignMarkup());
}
public void populateFeed(Feed feed, o oVar) {
addFeed(feed, oVar);
addEntries(feed, oVar);
}
public void populateFeedHeader(Feed feed, o oVar) {
Content titleEx = feed.getTitleEx();
if (titleEx != null) {
o oVar2 = new o("title", getFeedNamespace());
fillContentElement(oVar2, titleEx);
oVar.h(oVar2);
}
for (Link link : feed.getAlternateLinks()) {
oVar.h(generateLinkElement(link));
}
for (Link link2 : feed.getOtherLinks()) {
oVar.h(generateLinkElement(link2));
}
List<SyndPerson> authors = feed.getAuthors();
if (x8.a.R(authors)) {
o oVar3 = new o(KturzdTUzt.CIcUfquEDMd, getFeedNamespace());
fillPersonElement(oVar3, authors.get(0));
oVar.h(oVar3);
}
for (SyndPerson syndPerson : feed.getContributors()) {
o oVar4 = new o("contributor", getFeedNamespace());
fillPersonElement(oVar4, syndPerson);
oVar.h(oVar4);
}
Content tagline = feed.getTagline();
if (tagline != null) {
o oVar5 = new o("tagline", getFeedNamespace());
fillContentElement(oVar5, tagline);
oVar.h(oVar5);
}
String id = feed.getId();
if (id != null) {
oVar.h(generateSimpleElement("id", id));
}
Generator generator = feed.getGenerator();
if (generator != null) {
oVar.h(generateGeneratorElement(generator));
}
String copyright = feed.getCopyright();
if (copyright != null) {
oVar.h(generateSimpleElement("copyright", copyright));
}
Content info = feed.getInfo();
if (info != null) {
o oVar6 = new o("info", getFeedNamespace());
fillContentElement(oVar6, info);
oVar.h(oVar6);
}
Date modified = feed.getModified();
if (modified != null) {
o oVar7 = new o("modified", getFeedNamespace());
oVar7.e(DateParser.formatW3CDateTime(modified, Locale.US));
oVar.h(oVar7);
}
}
}