# SiteMapIndex (Crawler-commons 0.10 API)
Date: 2018-06-05

crawlercommons.sitemaps

## Class SiteMapIndex

- java.lang.Object
- - crawlercommons.sitemaps.AbstractSiteMap
  - - crawlercommons.sitemaps.SiteMapIndex

    public class SiteMapIndex
    extends AbstractSiteMap

### Nested Class Summary

### Nested classes/interfaces inherited from class crawlercommons.sitemaps.AbstractSiteMap

`AbstractSiteMap.SitemapType`

### Field Summary

### Fields inherited from class crawlercommons.sitemaps.AbstractSiteMap

`url`

### Constructor Summary

Constructors
Constructor and Description
`SiteMapIndex()`
`SiteMapIndex(URL url)`

### Method Summary

All Methods Instance Methods Concrete Methods
`void` `addSitemap(AbstractSiteMap sitemap)` Add this Sitemap to the list of Sitemaps,
`AbstractSiteMap` `getSitemap(URL url)` Returns the Sitemap that has the given URL.
`Collection<AbstractSiteMap>` `getSitemaps()`
`boolean` `hasUnprocessedSitemap()`
`boolean` `isIndex()`
`AbstractSiteMap` `nextUnprocessedSitemap()`
`String` `toString()`

### Methods inherited from class crawlercommons.sitemaps.AbstractSiteMap

`convertToDate, getFullDateFormat, getLastModified, getType, getUrl, isProcessed, normalizeRSSTimestamp, setLastModified, setLastModified, setProcessed, setType`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Constructor Detail

#### SiteMapIndex

    public SiteMapIndex()

#### SiteMapIndex

    public SiteMapIndex(URL url)

### Method Detail

#### getSitemaps

    public Collection<AbstractSiteMap> getSitemaps()

Returns:
  a Collection of Sitemaps in this Sitemap Index.

#### addSitemap

    public void addSitemap(AbstractSiteMap sitemap)

Add this Sitemap to the list of Sitemaps,

Parameters:
  `sitemap` - - Sitemap to be added to the list of Sitemaps

#### getSitemap

    public AbstractSiteMap getSitemap(URL url)

Returns the Sitemap that has the given URL. Returns null if the URL cannot be found.

Parameters:
  `url` - - The Sitemap's URL
Returns:
  SiteMap corresponding to the URL or null

#### hasUnprocessedSitemap

    public boolean hasUnprocessedSitemap()

Returns:
  true if there are Sitemaps in this index that have not been processed yet, false otherwise.

#### nextUnprocessedSitemap

    public AbstractSiteMap nextUnprocessedSitemap()

Returns:
  an unprocessed Sitemap or null if no unprocessed Sitemaps could be found.

#### isIndex

    public boolean isIndex()

Overrides:
  `isIndex` in class `AbstractSiteMap`

#### toString

    public String toString()

Overrides:
  `toString` in class `Object`