Package crawlercommons.sitemaps
Class Namespace
- java.lang.Object
- 
- crawlercommons.sitemaps.Namespace
 
- 
 public class Namespace extends Object supported sitemap formats: https://www.sitemaps.org/protocol.html#otherformats
- 
- 
Field SummaryFields Modifier and Type Field Description static StringATOM_0_3static StringATOM_1_0static StringEMPTYIn contradiction to the protocol specification ("The Sitemap must ...static String[]IMAGEstatic StringLINKSstatic String[]MOBILEstatic String[]NEWSstatic StringRSS_2_0RSS and Atom sitemap formats do not have strict definition.static StringSITEMAPstatic Map<Extension,List<String>>SITEMAP_EXTENSION_NAMESPACESstatic String[]SITEMAP_LEGACYLegacy schema URIs from prior sitemap protocol versions and frequent variants.static Set<String>SITEMAP_SUPPORTED_NAMESPACESstatic String[]VIDEO
 - 
Constructor SummaryConstructors Constructor Description Namespace()
 
- 
- 
- 
Field Detail- 
SITEMAPpublic static final String SITEMAP - See Also:
- Constant Field Values
 
 - 
SITEMAP_LEGACYpublic static final String[] SITEMAP_LEGACY Legacy schema URIs from prior sitemap protocol versions and frequent variants.
 - 
IMAGEpublic static final String[] IMAGE 
 - 
VIDEOpublic static final String[] VIDEO 
 - 
NEWSpublic static final String[] NEWS 
 - 
MOBILEpublic static final String[] MOBILE 
 - 
LINKSpublic static final String LINKS - See Also:
- Constant Field Values
 
 - 
EMPTYpublic static final String EMPTY In contradiction to the protocol specification ("The Sitemap must ... [s]pecify the namespace (protocol standard) within the <urlset> tag."), some sitemaps do not define a (default) namespace. By accepting the "empty" namespace, you'll get URLs even from those sitemaps.- See Also:
- Constant Field Values
 
 - 
RSS_2_0public static final String RSS_2_0 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.- See Also:
- Constant Field Values
 
 - 
ATOM_0_3public static final String ATOM_0_3 - See Also:
- Constant Field Values
 
 - 
ATOM_1_0public static final String ATOM_1_0 - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
isSupportedpublic static boolean isSupported(String uri) - Parameters:
- uri- URI string identifying the namespace
- Returns:
- true if namespace (identified by URI) is supported, false if the namespace is not supported or unknown
 
 
- 
 
-