Flud+ v1.11.1.2版本的 MD5 值为:8801c2f52bfd51902dee3a73c65b73f8

以下内容为反编译后的 DCModuleGenerator.java 源代码,内容仅作参考


package com.rometools.rome.io.impl;

import com.rometools.rome.feed.module.DCModule;
import com.rometools.rome.feed.module.DCSubject;
import com.rometools.rome.feed.module.Module;
import com.rometools.rome.io.ModuleGenerator;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Set;
import k6.Jvl.gRroHxCAFffHFV;
import sa.a;
import sa.o;
import sa.r;
import x6.nigI.zrQAZQN;
public class DCModuleGenerator implements ModuleGenerator {
    private static final r DC_NS;
    private static final String DC_URI = "http://purl.org/dc/elements/1.1/";
    private static final Set<r> NAMESPACES;
    private static final r RDF_NS;
    private static final String RDF_URI = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
    private static final r TAXO_NS;
    private static final String TAXO_URI = "http://purl.org/rss/1.0/modules/taxonomy/";

    static {
        r a10 = r.a("dc", gRroHxCAFffHFV.JiOBupan);
        DC_NS = a10;
        r a11 = r.a("taxo", TAXO_URI);
        TAXO_NS = a11;
        r a12 = r.a("rdf", RDF_URI);
        RDF_NS = a12;
        HashSet hashSet = new HashSet();
        hashSet.add(a10);
        hashSet.add(a11);
        hashSet.add(a12);
        NAMESPACES = Collections.unmodifiableSet(hashSet);
    }

    private final r getDCNamespace() {
        return DC_NS;
    }

    private final r getRDFNamespace() {
        return RDF_NS;
    }

    private final r getTaxonomyNamespace() {
        return TAXO_NS;
    }

    @Override
    public final void generate(Module module, o oVar) {
        DCModule dCModule = (DCModule) module;
        if (dCModule.getTitle() != null) {
            oVar.f(generateSimpleElementList("title", dCModule.getTitles()));
        }
        if (dCModule.getCreator() != null) {
            oVar.f(generateSimpleElementList("creator", dCModule.getCreators()));
        }
        for (DCSubject dCSubject : dCModule.getSubjects()) {
            oVar.h(generateSubjectElement(dCSubject));
        }
        if (dCModule.getDescription() != null) {
            oVar.f(generateSimpleElementList("description", dCModule.getDescriptions()));
        }
        if (dCModule.getPublisher() != null) {
            oVar.f(generateSimpleElementList("publisher", dCModule.getPublishers()));
        }
        List<String> contributors = dCModule.getContributors();
        if (contributors != null) {
            oVar.f(generateSimpleElementList("contributor", contributors));
        }
        if (dCModule.getDate() != null) {
            for (Date date : dCModule.getDates()) {
                oVar.h(generateSimpleElement("date", DateParser.formatW3CDateTime(date, Locale.US)));
            }
        }
        if (dCModule.getType() != null) {
            oVar.f(generateSimpleElementList("type", dCModule.getTypes()));
        }
        if (dCModule.getFormat() != null) {
            oVar.f(generateSimpleElementList("format", dCModule.getFormats()));
        }
        if (dCModule.getIdentifier() != null) {
            oVar.f(generateSimpleElementList("identifier", dCModule.getIdentifiers()));
        }
        if (dCModule.getSource() != null) {
            oVar.f(generateSimpleElementList(zrQAZQN.IptqutROLMhrj, dCModule.getSources()));
        }
        if (dCModule.getLanguage() != null) {
            oVar.f(generateSimpleElementList("language", dCModule.getLanguages()));
        }
        if (dCModule.getRelation() != null) {
            oVar.f(generateSimpleElementList("relation", dCModule.getRelations()));
        }
        if (dCModule.getCoverage() != null) {
            oVar.f(generateSimpleElementList("coverage", dCModule.getCoverages()));
        }
        if (dCModule.getRights() != null) {
            oVar.f(generateSimpleElementList("rights", dCModule.getRightsList()));
        }
    }

    public final o generateSimpleElement(String str, String str2) {
        o oVar = new o(str, getDCNamespace());
        oVar.e(str2);
        return oVar;
    }

    public final List<o> generateSimpleElementList(String str, List<String> list) {
        ArrayList arrayList = new ArrayList();
        for (String str2 : list) {
            arrayList.add(generateSimpleElement(str, str2));
        }
        return arrayList;
    }

    public final o generateSubjectElement(DCSubject dCSubject) {
        o oVar = new o("subject", getDCNamespace());
        String taxonomyUri = dCSubject.getTaxonomyUri();
        String value = dCSubject.getValue();
        if (taxonomyUri != null) {
            a aVar = new a("resource", taxonomyUri, getRDFNamespace(), 0);
            o oVar2 = new o(zrQAZQN.nFkQF, getTaxonomyNamespace());
            oVar2.A(aVar);
            o oVar3 = new o("Description", getRDFNamespace());
            oVar3.h(oVar2);
            if (value != null) {
                o oVar4 = new o("value", getRDFNamespace());
                oVar4.e(value);
                oVar3.h(oVar4);
            }
            oVar.h(oVar3);
        } else {
            oVar.e(value);
        }
        return oVar;
    }

    @Override
    public final String getNamespaceUri() {
        return "http://purl.org/dc/elements/1.1/";
    }

    @Override
    public final Set<r> getNamespaces() {
        return NAMESPACES;
    }
}