Class SiteMap
java.lang.Object
org.apache.maven.plugins.site.render.SiteMap
Generate a sitemap.
- Since:
- 2.1
- Version:
- $Id: SiteMap.java 1599008 2014-06-01 17:03:18Z hboutemy $
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidextract(org.apache.maven.doxia.site.decoration.DecorationModel decoration, org.apache.maven.doxia.sink.Sink sink, Locale locale) private static voidextractItems(List<org.apache.maven.doxia.site.decoration.MenuItem> items, org.apache.maven.doxia.sink.Sink sink) voidgenerate(org.apache.maven.doxia.site.decoration.DecorationModel model, File targetDir, Locale locale) Generates a sitemap.xml in targetDir/xdoc/.Get the encoding to use when writing the output file.org.codehaus.plexus.i18n.I18NgetI18n()Get the value of i18n.private static StringrelativePath(String href) voidsetEncoding(String enc) Set the encoding to use when writing the output file.voidsetI18n(org.codehaus.plexus.i18n.I18N i18n) Set the value of i18n.
-
Field Details
-
encoding
-
i18n
private org.codehaus.plexus.i18n.I18N i18n
-
-
Constructor Details
-
SiteMap
Constructor sets default values.- Parameters:
encoding- the default encoding to use when writing the output file.i18n- the default I18N for translations.
-
-
Method Details
-
getI18n
public org.codehaus.plexus.i18n.I18N getI18n()Get the value of i18n.- Returns:
- the value of i18n.
-
setI18n
public void setI18n(org.codehaus.plexus.i18n.I18N i18n) Set the value of i18n.- Parameters:
i18n- new value of i18n.
-
getEncoding
Get the encoding to use when writing the output file.- Returns:
- the value of encoding.
-
setEncoding
Set the encoding to use when writing the output file.- Parameters:
enc- new value of encoding.
-
generate
public void generate(org.apache.maven.doxia.site.decoration.DecorationModel model, File targetDir, Locale locale) throws IOException Generates a sitemap.xml in targetDir/xdoc/. This is a valid xdoc document that can be processed by a Doxia parser. The file lists all the menus and menu items of the DecorationModel in expanded form.- Parameters:
model- the DecorationModel to extract the menus from.targetDir- the target output directory. The file will be created in targetDir/xdoc/.locale- the Locale for the result.- Throws:
IOException- if the file cannot be ceated.
-
extract
private void extract(org.apache.maven.doxia.site.decoration.DecorationModel decoration, org.apache.maven.doxia.sink.Sink sink, Locale locale) -
extractItems
private static void extractItems(List<org.apache.maven.doxia.site.decoration.MenuItem> items, org.apache.maven.doxia.sink.Sink sink) -
relativePath
-