|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.redfin.sitemapgenerator.SitemapGeneratorBuilder<G>
G - public class SitemapGeneratorBuilder<G extends com.redfin.sitemapgenerator.SitemapGenerator<?,?>>
A convenience class to let you configure options straightforwardly; don't instantiate by hand.
Instead, get one statically from a SitemapGenerator class. For example: WebSitemapGenerator g =
WebSitemapGenerator.builder("http://example.com", myDir).gzip(true).autoValidate(true).build()
| Constructor Summary | |
|---|---|
SitemapGeneratorBuilder(java.lang.String baseUrl,
java.io.File baseDir,
java.lang.Class<G> sitemapGeneratorClass)
Configures the generator with a base URL and directory to write the sitemap files. |
|
SitemapGeneratorBuilder(java.net.URL baseUrl,
java.io.File baseDir,
java.lang.Class<G> sitemapGeneratorClass)
Configures the generator with a base URL and directory to write the sitemap files. |
|
| Method Summary | |
|---|---|
THIS |
allowMultipleSitemaps(boolean allowMultipleSitemaps)
When more than the maximum number of URLs are passed in, should we split into multiple sitemaps automatically, or just throw an exception? |
THIS |
autoValidate(boolean autoValidate)
Validate the sitemaps automatically after writing them; this takes time (and may fail for Google-specific sitemaps) |
G |
build()
Constructs a sitemap generator configured with the options you specified |
THIS |
dateFormat(W3CDateFormat dateFormat)
The date formatter, typically configured with a W3CDateFormat.Pattern and/or a time zone |
THIS |
fileNamePrefix(java.lang.String fileNamePrefix)
The prefix of the name of the sitemaps we'll create; by default this is "sitemap" |
THIS |
gzip(boolean gzip)
Gzip the sitemaps after they are written to disk |
THIS |
maxUrls(int maxUrls)
The maximum number of URLs to allow per sitemap; the default is the maximum allowed (50,000), but you can decrease it if you wish (to make your auto-generated sitemaps smaller) |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SitemapGeneratorBuilder(java.net.URL baseUrl,
java.io.File baseDir,
java.lang.Class<G> sitemapGeneratorClass)
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.sitemapGeneratorClass - the class of the generator the builder will create
public SitemapGeneratorBuilder(java.lang.String baseUrl,
java.io.File baseDir,
java.lang.Class<G> sitemapGeneratorClass)
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.sitemapGeneratorClass - the class of the generator the builder will create
java.net.MalformedURLException| Method Detail |
|---|
public G build()
public THIS fileNamePrefix(java.lang.String fileNamePrefix)
public THIS allowMultipleSitemaps(boolean allowMultipleSitemaps)
public THIS dateFormat(W3CDateFormat dateFormat)
W3CDateFormat.Pattern and/or a time zone
public THIS maxUrls(int maxUrls)
public THIS autoValidate(boolean autoValidate)
public THIS gzip(boolean gzip)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||