// Path: src/main/java/crawlercommons/sitemaps/extension/Extension.java
// public enum Extension {
//     /**
//      * Google News sitemaps, see
//      * https://support.google.com/news/publisher-center/answer/74288
//      */
//     NEWS,
//     /**
//      * Google Image sitemaps, see
//      * https://support.google.com/webmasters/answer/178636
//      */
//     IMAGE,
//     /**
//      * Google Video sitemaps, see
//      * https://support.google.com/webmasters/answer/80471
//      */
//     VIDEO,
//     /**
//      * Usage of <code>&lt;xhtml:links&gt;</code> in sitemaps to include
//      * localized page versions/variants, see
//      * https://support.google.com/webmasters/answer/189077
//      */
//     LINKS,
//     /**
//      * <cite>Mobile sitemaps just contain an empty "mobile" tag to identify a
//      * URL as having mobile content</cite>, cf.
//      * http://www.google.com/schemas/sitemap-mobile/1.0
//      */
//     MOBILE
// }


import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import crawlercommons.sitemaps.extension.Extension;
     * RSS and Atom sitemap formats do not have strict definition. But if we do
     * not parse as namespace aware, then RSS/Atom files that choose to use
     * namespaces will break. The relaxed compromise for RSS/Atom is to always
     * parse as "namespace aware", but we will only match elements by the
     * localName, accepting any element namespace.
     */
    public static final String RSS_2_0 = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
    public static final String ATOM_0_3 = "http://purl.org/atom/ns#";
    public static final String ATOM_1_0 = "http://www.w3.org/2005/Atom";

    public static final Set<String> SITEMAP_SUPPORTED_NAMESPACES = new HashSet<>();
    static {
        SITEMAP_SUPPORTED_NAMESPACES.add(SITEMAP);
        SITEMAP_SUPPORTED_NAMESPACES.addAll(Arrays.asList(SITEMAP_LEGACY));
        SITEMAP_SUPPORTED_NAMESPACES.addAll(Arrays.asList(IMAGE));
        SITEMAP_SUPPORTED_NAMESPACES.addAll(Arrays.asList(VIDEO));
        SITEMAP_SUPPORTED_NAMESPACES.addAll(Arrays.asList(NEWS));
        SITEMAP_SUPPORTED_NAMESPACES.add(LINKS);
    }

    /**
     * @param uri
     *            URI string identifying the namespace
     * @return true if namespace (identified by URI) is supported, false if the
     *         namespace is not supported or unknown
     */
    public static boolean isSupported(String uri) {
        return SITEMAP_SUPPORTED_NAMESPACES.contains(uri);
    }

// Path: src/main/java/crawlercommons/sitemaps/extension/Extension.java
// public enum Extension {
//     /**
//      * Google News sitemaps, see
//      * https://support.google.com/news/publisher-center/answer/74288
//      */
//     NEWS,
//     /**
//      * Google Image sitemaps, see
//      * https://support.google.com/webmasters/answer/178636
//      */
//     IMAGE,
//     /**
//      * Google Video sitemaps, see
//      * https://support.google.com/webmasters/answer/80471
//      */
//     VIDEO,
//     /**
//      * Usage of <code>&lt;xhtml:links&gt;</code> in sitemaps to include
//      * localized page versions/variants, see
//      * https://support.google.com/webmasters/answer/189077
//      */
//     LINKS,
//     /**
//      * <cite>Mobile sitemaps just contain an empty "mobile" tag to identify a
//      * URL as having mobile content</cite>, cf.
//      * http://www.google.com/schemas/sitemap-mobile/1.0
//      */
//     MOBILE
// }


// Path: src/main/java/crawlercommons/sitemaps/Namespace.java
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
import crawlercommons.sitemaps.extension.Extension;

     * RSS and Atom sitemap formats do not have strict definition. But if we do
     * not parse as namespace aware, then RSS/Atom files that choose to use
     * namespaces will break. The relaxed compromise for RSS/Atom is to always
     * parse as "namespace aware", but we will only match elements by the
     * localName, accepting any element namespace.
     */
    public static final String RSS_2_0 = "http://www.w3.org/1999/02/22-rdf-syntax-ns#";
    public static final String ATOM_0_3 = "http://purl.org/atom/ns#";
    public static final String ATOM_1_0 = "http://www.w3.org/2005/Atom";

    public static final Set<String> SITEMAP_SUPPORTED_NAMESPACES = new HashSet<>();
    static {
        SITEMAP_SUPPORTED_NAMESPACES.add(SITEMAP);
        SITEMAP_SUPPORTED_NAMESPACES.addAll(Arrays.asList(SITEMAP_LEGACY));
        SITEMAP_SUPPORTED_NAMESPACES.addAll(Arrays.asList(IMAGE));
        SITEMAP_SUPPORTED_NAMESPACES.addAll(Arrays.asList(VIDEO));
        SITEMAP_SUPPORTED_NAMESPACES.addAll(Arrays.asList(NEWS));
        SITEMAP_SUPPORTED_NAMESPACES.add(LINKS);
    }

    /**
     * @param uri
     *            URI string identifying the namespace
     * @return true if namespace (identified by URI) is supported, false if the
     *         namespace is not supported or unknown
     */
    public static boolean isSupported(String uri) {
        return SITEMAP_SUPPORTED_NAMESPACES.contains(uri);
    }

    public static final Map<Extension, List<String>> SITEMAP_EXTENSION_NAMESPACES = new TreeMap<>();