|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.redfin.sitemapgenerator.SitemapIndexGenerator
public class SitemapIndexGenerator
Builds a sitemap index, which points only to other sitemaps.
| Nested Class Summary | |
|---|---|
static class |
SitemapIndexGenerator.Options
Options to configure sitemap index generation |
| Field Summary | |
|---|---|
static int |
MAX_SITEMAPS_PER_INDEX
Maximum 1,000 sitemaps per index allowed |
| Constructor Summary | |
|---|---|
SitemapIndexGenerator(java.lang.String baseUrl,
java.io.File outFile)
Configures the generator with a base URL and destination to write the sitemap index file. |
|
SitemapIndexGenerator(java.net.URL baseUrl,
java.io.File outFile)
Configures the generator with a base URL and destination to write the sitemap index file. |
|
| Method Summary | |
|---|---|
SitemapIndexGenerator |
addUrl(SitemapIndexUrl url)
Adds a single sitemap to the index |
SitemapIndexGenerator |
addUrl(java.lang.String url)
Adds a single sitemap to the index |
SitemapIndexGenerator |
addUrl(java.lang.String url,
java.util.Date lastMod)
Adds a single sitemap to the index |
SitemapIndexGenerator |
addUrl(java.net.URL url)
Adds a single sitemap to the index |
SitemapIndexGenerator |
addUrl(java.net.URL url,
java.util.Date lastMod)
Adds a single sitemap to the index |
SitemapIndexGenerator |
addUrls(java.lang.Iterable<? extends SitemapIndexUrl> urls)
Add multiple sitemaps to the index |
SitemapIndexGenerator |
addUrls(SitemapIndexUrl... urls)
Add multiple sitemaps to the index |
SitemapIndexGenerator |
addUrls(java.lang.String... urls)
Add multiple sitemaps to the index |
SitemapIndexGenerator |
addUrls(java.lang.String prefix,
java.lang.String suffix,
int count)
Add a numbered list of sitemaps to the index, e.g. |
SitemapIndexGenerator |
addUrls(java.net.URL... urls)
Add multiple sitemaps to the index |
void |
write()
Writes out the sitemap index |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int MAX_SITEMAPS_PER_INDEX
| Constructor Detail |
|---|
public SitemapIndexGenerator(java.net.URL baseUrl,
java.io.File outFile)
baseUrl - All URLs in the generated sitemap(s) should appear under this base URLoutFile - The sitemap index will be written out at this location
public SitemapIndexGenerator(java.lang.String baseUrl,
java.io.File outFile)
throws java.net.MalformedURLException
baseUrl - All URLs in the generated sitemap(s) should appear under this base URLoutFile - The sitemap index will be written out at this location
java.net.MalformedURLException| Method Detail |
|---|
public SitemapIndexGenerator addUrl(SitemapIndexUrl url)
public SitemapIndexGenerator addUrls(java.lang.Iterable<? extends SitemapIndexUrl> urls)
public SitemapIndexGenerator addUrls(SitemapIndexUrl... urls)
public SitemapIndexGenerator addUrls(java.lang.String... urls)
throws java.net.MalformedURLException
java.net.MalformedURLException
public SitemapIndexGenerator addUrl(java.lang.String url)
throws java.net.MalformedURLException
java.net.MalformedURLExceptionpublic SitemapIndexGenerator addUrls(java.net.URL... urls)
public SitemapIndexGenerator addUrl(java.net.URL url)
public SitemapIndexGenerator addUrl(java.net.URL url,
java.util.Date lastMod)
public SitemapIndexGenerator addUrl(java.lang.String url,
java.util.Date lastMod)
throws java.net.MalformedURLException
java.net.MalformedURLException
public SitemapIndexGenerator addUrls(java.lang.String prefix,
java.lang.String suffix,
int count)
prefix - the first part of the filename e.g. "sitemap"suffix - the last part of the filename e.g. ".xml" or ".xml.gz"count - the number of sitemaps (1-based)public void write()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||