G -
public class SitemapGeneratorBuilder<G extends com.redfin extends Object.sitemapgenerator .SitemapGenerator <? ,?>>
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
Configures the generator with a base URL and directory to write the sitemap files.
|
SitemapGeneratorBuilder(URL
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
The date formatter, typically configured with a
W3CDateFormat.Pattern and/or a time zone
|
THIS |
fileNamePrefix(String
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
|
public SitemapGeneratorBuilder(URLbaseUrl, File baseDir, Class <G> sitemapGeneratorClass)
baseUrl - All URLs in the generated sitemap(s) should appear under this base URL
baseDir - 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(StringbaseUrl, File baseDir, Class <G> sitemapGeneratorClass) throws MalformedURLException
baseUrl - All URLs in the generated sitemap(s) should appear under this base URL
baseDir - 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
MalformedURLException
public G build()
public THIS fileNamePrefix(StringfileNamePrefix)
public THIS suffixStringPattern(Stringpattern)
public THIS allowMultipleSitemaps(boolean allowMultipleSitemaps)
public THIS dateFormat(W3CDateFormatdateFormat)
W3CDateFormat.Pattern and/or a time zone
public THIS maxUrls(int maxUrls)
public THIS autoValidate(boolean autoValidate)
public THIS gzip(boolean gzip)