Package org.javlo.helper
Class XMLHelper
- java.lang.Object
-
- org.javlo.helper.XMLHelper
-
public class XMLHelper extends Object
- Author:
- pvandermaesen
-
-
Constructor Summary
Constructors Constructor Description XMLHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String
getPageXML(ContentContext ctx, MenuElement page, String lang)
static SiteMapBloc
getSiteMapBloc(ContentContext ctx, Collection<MenuElement> pages, int i, Calendar latestDate, boolean withResources)
create sitemap protocol 0.9 for structured ranking in googlestatic SiteMapBloc
getSiteMapNewsBloc(ContentContext ctx, Collection<MenuElement> pages, int i, Calendar latestDate)
create sitemap protocol 0.9 for structured ranking in googlestatic String
getXMLContent(ContentContext ctx, int version)
static String
getXMLContent(MenuElement menu, int renderMode, int version, String defaultLg)
return the content in a XML structurestatic void
main(String[] args)
static void
storeXMLContent(Writer inOut, MenuElement menu, int renderMode, int version, Map<String,String> contentMap, TaxonomyBean taxonomyRoot)
return the content in a XML structure
-
-
-
Method Detail
-
getPageXML
public static String getPageXML(ContentContext ctx, MenuElement page, String lang) throws Exception
- Throws:
Exception
-
getSiteMapBloc
public static SiteMapBloc getSiteMapBloc(ContentContext ctx, Collection<MenuElement> pages, int i, Calendar latestDate, boolean withResources) throws Exception
create sitemap protocol 0.9 for structured ranking in google- Parameters:
root
- the root element of the navigation- Returns:
- a valid xml sitemap
- Throws:
Exception
-
getSiteMapNewsBloc
public static SiteMapBloc getSiteMapNewsBloc(ContentContext ctx, Collection<MenuElement> pages, int i, Calendar latestDate) throws Exception
create sitemap protocol 0.9 for structured ranking in google- Parameters:
root
- the root element of the navigation- Returns:
- a valid xml sitemap
- Throws:
Exception
-
getXMLContent
public static String getXMLContent(ContentContext ctx, int version) throws Exception
- Throws:
Exception
-
getXMLContent
public static String getXMLContent(MenuElement menu, int renderMode, int version, String defaultLg) throws Exception
return the content in a XML structure- Parameters:
ctx
- the contentContext- Returns:
- A string with a xml in.
- Throws:
Exception
-
storeXMLContent
public static void storeXMLContent(Writer inOut, MenuElement menu, int renderMode, int version, Map<String,String> contentMap, TaxonomyBean taxonomyRoot) throws Exception
return the content in a XML structure- Parameters:
ctx
- the contentContext- Throws:
Exception
-
main
public static void main(String[] args)
-
-