Package org.dspace.app.sitemap
Class GenerateSitemaps
- java.lang.Object
-
- org.dspace.app.sitemap.GenerateSitemaps
-
public class GenerateSitemaps extends Object
Command-line utility for generating HTML and Sitemaps.org protocol Sitemaps.- Author:
- Robert Tansley, Stuart Lewis
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voiddeleteSitemaps()Delete the sitemaps directory and its contents if it existsstatic voidgenerateSitemaps(boolean makeHTMLMap, boolean makeSitemapOrg)Generate sitemap.org protocol and/or basic HTML sitemaps.static voidgenerateSitemapsScheduled()Runs generate-sitemaps without any params for the scheduler (task-scheduler.xml).static voidmain(String[] args)static voidpingConfiguredSearchEngines()Ping all search engines configured indspace.cfg.static voidpingSearchEngine(String engineURL)Ping the given search engine.
-
-
-
Method Detail
-
generateSitemapsScheduled
public static void generateSitemapsScheduled() throws IOException, SQLExceptionRuns generate-sitemaps without any params for the scheduler (task-scheduler.xml).- Throws:
SQLException- if a database error occurs.IOException- if IO error occurs.
-
deleteSitemaps
public static void deleteSitemaps() throws IOExceptionDelete the sitemaps directory and its contents if it exists- Throws:
IOException- if IO error occurs
-
generateSitemaps
public static void generateSitemaps(boolean makeHTMLMap, boolean makeSitemapOrg) throws SQLException, IOExceptionGenerate sitemap.org protocol and/or basic HTML sitemaps.- Parameters:
makeHTMLMap- iftrue, generate an HTML sitemap.makeSitemapOrg- iftrue, generate an sitemap.org sitemap.- Throws:
SQLException- if database error if a database error occurs.IOException- if IO error if IO error occurs.
-
pingConfiguredSearchEngines
public static void pingConfiguredSearchEngines() throws UnsupportedEncodingExceptionPing all search engines configured indspace.cfg.- Throws:
UnsupportedEncodingException- theoretically should never happen
-
pingSearchEngine
public static void pingSearchEngine(String engineURL) throws MalformedURLException, UnsupportedEncodingException
Ping the given search engine.- Parameters:
engineURL- Search engine URL minus protocol etc, e.g.www.google.com- Throws:
MalformedURLException- if the passed in URL is malformedUnsupportedEncodingException- theoretically should never happen
-
-