org.apache.maven.plugins.site
Class SiteMap

java.lang.Object
  extended by org.apache.maven.plugins.site.SiteMap

public class SiteMap
extends Object

Generate a sitemap.

Since:
2.1
Version:
$Id: SiteMap.html 861484 2013-05-09 23:10:16Z hboutemy $
Author:
ltheussl

Constructor Summary
SiteMap(String encoding, I18N i18n)
          Constructor sets default values.
 
Method Summary
 void generate(DecorationModel model, File targetDir, Locale locale)
          Generates a sitemap.xml in targetDir/xdoc/.
 String getEncoding()
          Get the encoding to use when writing the output file.
 I18N getI18n()
          Get the value of i18n.
 void setEncoding(String enc)
          Set the encoding to use when writing the output file.
 void setI18n(I18N i18n)
          Set the value of i18n.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SiteMap

public SiteMap(String encoding,
               I18N i18n)
Constructor sets default values.

Parameters:
encoding - the default encoding to use when writing the output file.
i18n - the default I18N for translations.
Method Detail

getI18n

public I18N getI18n()
Get the value of i18n.

Returns:
the value of i18n.

setI18n

public void setI18n(I18N i18n)
Set the value of i18n.

Parameters:
i18n - new value of i18n.

getEncoding

public String getEncoding()
Get the encoding to use when writing the output file.

Returns:
the value of encoding.

setEncoding

public void setEncoding(String enc)
Set the encoding to use when writing the output file.

Parameters:
enc - new value of encoding.

generate

public void generate(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.


Copyright © 2002-2013 The Apache Software Foundation. All Rights Reserved.