|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectno.sesat.sitemap.SitemapGenerator
public final class SitemapGenerator
A class for generating sitemaps. The entries are provided by implementors of no.sesat.commons.sitemaps.PageProvider. This class will generate a sitemap index file and any number of sitemap files required to meet the size resitriction of a single sitemap file. A list of no.sesat.search.sitemap.PageProvider can be supplied at instantiation. Another options is to have this class load providers available in a skin using the the java6 ServiceLoader mechanism. The main method of this class expect three parameters:
| Constructor Summary | |
|---|---|
SitemapGenerator(Collection<PageProvider> providers,
File dest,
URI url)
Creates a new generator. |
|
SitemapGenerator(URI site,
File dest,
URI url)
Creates a new instance loading any providers found in the provided skin. |
|
| Method Summary | |
|---|---|
void |
generate()
Generate the sitemap files. |
static void |
main(String[] args)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SitemapGenerator(Collection<PageProvider> providers,
File dest,
URI url)
throws IOException
providers - the list of page providers to use.dest - the destination directory.url - the public url corresponding to the the destination directory.
IOException - if the files could not be written.
public SitemapGenerator(URI site,
File dest,
URI url)
throws IOException
site - The skin to generate a sitemap fordest - The directory to write files to.url - The URI at which this directory is accessible using HTTP.
IOException - If the files can't be written.| Method Detail |
|---|
public static void main(String[] args)
throws URISyntaxException,
IOException,
TransformerConfigurationException,
SAXException
URISyntaxException
IOException
TransformerConfigurationException
SAXException
public void generate()
throws IOException,
SAXException
IOException - if the files could not be created.
SAXException - if a xml error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||