edu.ucsb.nceas.metacat
Class Sitemap

java.lang.Object
  extended by java.util.TimerTask
      extended by edu.ucsb.nceas.metacat.Sitemap
All Implemented Interfaces:
java.lang.Runnable

public class Sitemap
extends java.util.TimerTask

A Sitemap represents a document that lists all of the content of the Metacat server for use by harvesting spiders that wish to index the contents of the Metacat site. It is used to generate an XML representation of all of the URLs of the site in order to facilitate indexing of the metacat site by search engines.

Author:
Matt Jones

Constructor Summary
Sitemap(java.io.File directory, java.lang.String urlRoot, java.lang.String skin)
          Construct a new instance of the Sitemap.
 
Method Summary
 void generateSitemaps()
          Generate all of the sitemap files needed to list the URLs from this instance of Metacat, using the open sitemap format described here: URLs are written to a single file, unless the maximum number of URLs allowed inthe sitemap file is exceeded, in which subsequent numbered files are created.
 void run()
          Execute the timed task when called, in this case by generating the sitemap files needed for this Metacat instance.
 
Methods inherited from class java.util.TimerTask
cancel, scheduledExecutionTime
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sitemap

public Sitemap(java.io.File directory,
               java.lang.String urlRoot,
               java.lang.String skin)
Construct a new instance of the Sitemap.

Parameters:
directory - the location to store sitemap files
urlRoot - the base URL for constructing sitemap URLs
skin - the format skin to be used in URLs
Method Detail

run

public void run()
Execute the timed task when called, in this case by generating the sitemap files needed for this Metacat instance.

Specified by:
run in interface java.lang.Runnable
Specified by:
run in class java.util.TimerTask

generateSitemaps

public void generateSitemaps()
Generate all of the sitemap files needed to list the URLs from this instance of Metacat, using the open sitemap format described here: URLs are written to a single file, unless the maximum number of URLs allowed inthe sitemap file is exceeded, in which subsequent numbered files are created.

Parameters:
directory - an existing File directory in which to write the sitemaps
urlRoot - the base URL to use in constructing document URLs
skin - the name of the skin to be used in formatting metacat documents


Copyright © 2000 National Center for Ecological Analysis and Synthesis. All Rights Reserved.