G - public class SitemapGeneratorBuilder<G extends com.redfin.sitemapgenerator.SitemapGenerator<?,?>> extends Object
Instead, get one statically from a SitemapGenerator class. For example: WebSitemapGenerator g =
WebSitemapGenerator.builder("http://example.com", myDir).gzip(true).autoValidate(true).build()
| Constructor and Description |
|---|
SitemapGeneratorBuilder(String baseUrl,
File baseDir,
Class<G> sitemapGeneratorClass)
Configures the generator with a base URL and directory to write the sitemap files.
|
SitemapGeneratorBuilder(URL baseUrl,
File baseDir,
Class<G> sitemapGeneratorClass)
Configures the generator with a base URL and directory to write the sitemap files.
|
| Modifier and Type | Method and Description |
|---|---|
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(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)
|
THIS |
suffixStringPattern(String pattern) |
public SitemapGeneratorBuilder(URL baseUrl, File baseDir, 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 createpublic SitemapGeneratorBuilder(String baseUrl, File baseDir, Class<G> sitemapGeneratorClass) throws 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 createMalformedURLExceptionpublic G build()
public THIS fileNamePrefix(String fileNamePrefix)
public THIS suffixStringPattern(String pattern)
public THIS allowMultipleSitemaps(boolean allowMultipleSitemaps)
public THIS dateFormat(W3CDateFormat dateFormat)
W3CDateFormat.Pattern and/or a time zonepublic THIS maxUrls(int maxUrls)
public THIS autoValidate(boolean autoValidate)
public THIS gzip(boolean gzip)
Copyright © 2015. All rights reserved.