|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.redfin.sitemapgenerator.GoogleCodeSitemapGenerator
public class GoogleCodeSitemapGenerator
Builds a code sitemap for Google Code Search. To configure options, use builder(URL, File)
| Field Summary | |
|---|---|
static int |
MAX_URLS_PER_SITEMAP
50000 URLs per sitemap maximum |
| Constructor Summary | |
|---|---|
GoogleCodeSitemapGenerator(java.lang.String baseUrl,
java.io.File baseDir)
Configures the generator with a base URL and directory to write the sitemap files. |
|
GoogleCodeSitemapGenerator(java.net.URL baseUrl,
java.io.File baseDir)
Configures the generator with a base URL and directory to write the sitemap files. |
|
| Method Summary | |
|---|---|
THIS |
addUrl(java.lang.String url)
Add one URL of the appropriate type to this sitemap. |
THIS |
addUrl(U url)
Add one URL of the appropriate type to this sitemap. |
THIS |
addUrl(java.net.URL url)
Add one URL of the appropriate type to this sitemap. |
THIS |
addUrls(java.lang.Iterable<? extends U> urls)
Add multiple URLs of the appropriate type to this sitemap, one at a time. |
THIS |
addUrls(java.lang.String... urls)
Add multiple URLs of the appropriate type to this sitemap, one at a time. |
THIS |
addUrls(U... urls)
Add multiple URLs of the appropriate type to this sitemap, one at a time. |
THIS |
addUrls(java.net.URL... urls)
Add multiple URLs of the appropriate type to this sitemap, one at a time. |
static SitemapGeneratorBuilder<GoogleCodeSitemapGenerator> |
builder(java.lang.String baseUrl,
java.io.File baseDir)
Configures a builder so you can specify sitemap generator options |
static SitemapGeneratorBuilder<GoogleCodeSitemapGenerator> |
builder(java.net.URL baseUrl,
java.io.File baseDir)
Configures a builder so you can specify sitemap generator options |
java.util.List<java.io.File> |
write()
Write out remaining URLs; this method can only be called once. |
void |
writeSitemapsWithIndex()
After you've called write(), call this to generate a sitemap index of all sitemaps you generated. |
| 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_URLS_PER_SITEMAP
| Constructor Detail |
|---|
public GoogleCodeSitemapGenerator(java.lang.String baseUrl,
java.io.File baseDir)
throws java.net.MalformedURLException
baseUrl - All URLs in the generated sitemap(s) should appear under this base URLbaseDir - Sitemap files will be generated in this directory as either "sitemap.xml" or "sitemap1.xml" "sitemap2.xml" and so on.
java.net.MalformedURLException
public GoogleCodeSitemapGenerator(java.net.URL baseUrl,
java.io.File baseDir)
baseUrl - All URLs in the generated sitemap(s) should appear under this base URLbaseDir - Sitemap files will be generated in this directory as either "sitemap.xml" or "sitemap1.xml" "sitemap2.xml" and so on.| Method Detail |
|---|
public static SitemapGeneratorBuilder<GoogleCodeSitemapGenerator> builder(java.net.URL baseUrl,
java.io.File baseDir)
baseUrl - All URLs in the generated sitemap(s) should appear under this base URLbaseDir - Sitemap files will be generated in this directory as either "sitemap.xml" or "sitemap1.xml" "sitemap2.xml" and so on.
public static SitemapGeneratorBuilder<GoogleCodeSitemapGenerator> builder(java.lang.String baseUrl,
java.io.File baseDir)
throws java.net.MalformedURLException
baseUrl - All URLs in the generated sitemap(s) should appear under this base URLbaseDir - Sitemap files will be generated in this directory as either "sitemap.xml" or "sitemap1.xml" "sitemap2.xml" and so on.
java.net.MalformedURLExceptionpublic THIS addUrl(U url)
allowMultipleSitemaps is false,
or else write out one sitemap immediately.
url - the URL to add to this sitemap
public THIS addUrls(java.lang.Iterable<? extends U> urls)
allowMultipleSitemaps is false,
or write out one sitemap immediately.
urls - the URLs to add to this sitemap
public THIS addUrls(U... urls)
allowMultipleSitemaps is false,
or write out one sitemap immediately.
urls - the URLs to add to this sitemap
public THIS addUrls(java.lang.String... urls)
throws java.net.MalformedURLException
allowMultipleSitemaps is false,
or write out one sitemap immediately.
urls - the URLs to add to this sitemap
java.net.MalformedURLException
public THIS addUrl(java.lang.String url)
throws java.net.MalformedURLException
allowMultipleSitemaps is false,
or else write out one sitemap immediately.
url - the URL to add to this sitemap
java.net.MalformedURLExceptionpublic THIS addUrls(java.net.URL... urls)
allowMultipleSitemaps is false,
or write out one sitemap immediately.
urls - the URLs to add to this sitemap
public THIS addUrl(java.net.URL url)
allowMultipleSitemaps is false,
or write out one sitemap immediately.
url - the URL to add to this sitemap
public java.util.List<java.io.File> write()
writeSitemapsWithIndex().
public void writeSitemapsWithIndex()
write(), call this to generate a sitemap index of all sitemaps you generated.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||