|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.bssp.javasitemapper.SitemapOutput
public class SitemapOutput
Class SitemapOutput writes a urlset container to disk as a sitemap.xml file (or a set of sitemap files referenced by a sitemap index file), in addition to formatting the sitemap file(s) so that they are readable.
To view an example of how to use this class and the other classes of this sitemap API, please go toSitemap
.
Note: In it's current version, the API only allows for the creation of 1 index file (which implies only 1000 sitemap files, or based on its current build, only 40,000,000 URLs). We hope to improve functionality in the next version.
Sitemap
,
SitemapURL
,
SitemapOutput
Field Summary | |
---|---|
static java.lang.String |
FILE_SITEMAP_DEFAULT
Constant value "sitemap.xml" used as the default name for sitemaps. |
static java.lang.String |
FILE_SITEMAP_INDEX_DEFAULT
Constant value "sitemap_index.xml" used as the default name for sitemap index files. |
Constructor Summary | |
---|---|
SitemapOutput()
This constructor creates a new SitemapOutput object with an undefined domain name, filepath set to the root of the web application, and filename set to "sitemap.xml". |
|
SitemapOutput(java.lang.String customDomain)
This overloaded constructor creates a new SitemapOutput object with a user-defined domain name, filepath set to the root of the web application, and filename set to "sitemap.xml". |
|
SitemapOutput(java.lang.String customDomain,
java.lang.String customURI)
This overloaded constructor creates a new SitemapOutput object with a user-defined domain name, user-defined filepath, and filename set to "sitemap.xml". |
|
SitemapOutput(java.lang.String customDomain,
java.lang.String customURI,
java.lang.String customFilename)
This overloaded constructor creates a new SitemapOutput object with a user-defined domain name, filepath, and filename. |
Method Summary | |
---|---|
java.lang.String |
getSitemapDomain()
This returns the file's domain. |
java.lang.String |
getSitemapFilename()
This returns the file's filename. |
java.lang.String |
getSitemapURI()
This returns the file's location. |
void |
output(Sitemap urlSet)
This method outputs parameter urlSet as a formatted file. |
void |
setSitemapDomain(java.lang.String sitemapDomain)
This sets the file's domain. |
void |
setSitemapFilename(java.lang.String sitemapFilename)
This sets the file's filename. |
void |
setSitemapURI(java.lang.String sitemapURI)
This sets the file's location. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String FILE_SITEMAP_DEFAULT
public static final java.lang.String FILE_SITEMAP_INDEX_DEFAULT
Constructor Detail |
---|
public SitemapOutput()
public SitemapOutput(java.lang.String customDomain)
customDomain
- a String describing the file's user-specified
domain name.public SitemapOutput(java.lang.String customDomain, java.lang.String customURI)
customDomain
- a String describing the file's user-specified
domain name.customURI
- a String describing the file's user-specified location.public SitemapOutput(java.lang.String customDomain, java.lang.String customURI, java.lang.String customFilename)
customDomain
- a String describing the file's user-specified
domain name.customURI
- a String describing the file's user-specified location.customFilename
- a String describing the file's user-specified
filename.Method Detail |
---|
public void output(Sitemap urlSet)
urlSet
- an object of type Sitemap that converts all sitemap
information into a sitemap.xml file.
java.io.IOException
- an input/output exception if there is a problem
writing the file.public java.lang.String getSitemapFilename()
public void setSitemapFilename(java.lang.String sitemapFilename)
sitemapFilename
- a String describing the file's filename.public java.lang.String getSitemapURI()
public void setSitemapURI(java.lang.String sitemapURI)
sitemapURI
- a String describing the file's location.public java.lang.String getSitemapDomain()
public void setSitemapDomain(java.lang.String sitemapDomain)
sitemapDomain
- a String describing the file's domain.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |