Package org.apache.nutch.parse

## Class HTMLMetaTags

- java.lang.Object
- - org.apache.nutch.parse.HTMLMetaTags

-     public class HTMLMetaTags
      extends Object

  This class holds the information about HTML "meta" tags extracted from a page. Some special tags have convenience methods for easy checking.

- - ### Constructor Summary

    Constructors
    Constructor | Description
    --- | ---
    `HTMLMetaTags()` |

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `URL` | `getBaseHref()` |
    `Metadata` | `getGeneralTags()` |
    `Properties` | `getHttpEquivTags()` |
    `boolean` | `getNoCache()` | Get the current value of `noCache`.
    `boolean` | `getNoFollow()` | Get the current value of `noFollow`.
    `boolean` | `getNoIndex()` | Get the current value of `noIndex`.
    `boolean` | `getRefresh()` | Get the current value of `refresh`.
    `URL` | `getRefreshHref()` |
    `int` | `getRefreshTime()` |
    `void` | `reset()` | Sets all boolean values to `false`.
    `void` | `setBaseHref​(URL baseHref)` | Sets the `baseHref`.
    `void` | `setCache()` | Sets `noCache` to `false`.
    `void` | `setFollow()` | Sets `noFollow` to `false`.
    `void` | `setIndex()` | Sets `noIndex` to `false`.
    `void` | `setNoCache()` | Sets `noCache` to `true`.
    `void` | `setNoFollow()` | Sets `noFollow` to `true`.
    `void` | `setNoIndex()` | Sets `noIndex` to `true`.
    `void` | `setRefresh​(boolean refresh)` | Sets `refresh` to the supplied value.
    `void` | `setRefreshHref​(URL refreshHref)` | Sets the `refreshHref`.
    `void` | `setRefreshTime​(int refreshTime)` | Sets the `refreshTime`.
    `String` | `toString()` |

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

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

- - ### Constructor Detail

    - #### HTMLMetaTags

          public HTMLMetaTags()

  - ### Method Detail

    - #### reset

          public void reset()

      Sets all boolean values to `false`. Clears all other tags.

    - #### setNoFollow

          public void setNoFollow()

      Sets `noFollow` to `true`.

    - #### setFollow

          public void setFollow()

      Sets `noFollow` to `false`.

    - #### setNoIndex

          public void setNoIndex()

      Sets `noIndex` to `true`.

    - #### setIndex

          public void setIndex()

      Sets `noIndex` to `false`.

    - #### setNoCache

          public void setNoCache()

      Sets `noCache` to `true`.

    - #### setCache

          public void setCache()

      Sets `noCache` to `false`.

    - #### setRefresh

          public void setRefresh​(boolean refresh)

      Sets `refresh` to the supplied value.
      Parameters:
        `refresh` - value to set

    - #### setBaseHref

          public void setBaseHref​(URL baseHref)

      Sets the `baseHref`.
      Parameters:
        `baseHref` - value to set

    - #### setRefreshHref

          public void setRefreshHref​(URL refreshHref)

      Sets the `refreshHref`.
      Parameters:
        `refreshHref` - value to set

    - #### setRefreshTime

          public void setRefreshTime​(int refreshTime)

      Sets the `refreshTime`.
      Parameters:
        `refreshTime` - value to set

    - #### getNoIndex

          public boolean getNoIndex()

      Get the current value of `noIndex`.
      Returns:
        true if no index is desired, false otherwise

    - #### getNoFollow

          public boolean getNoFollow()

      Get the current value of `noFollow`.
      Returns:
        true if no follow is desired, false otherwise

    - #### getNoCache

          public boolean getNoCache()

      Get the current value of `noCache`.
      Returns:
        true if no cache is desired, false otherwise

    - #### getRefresh

          public boolean getRefresh()

      Get the current value of `refresh`.
      Returns:
        true if refresh is desired, false otherwise

    - #### getBaseHref

          public URL getBaseHref()

      Returns:
        the `baseHref`, if set, or `null` otherwise.

    - #### getRefreshHref

          public URL getRefreshHref()

      Returns:
        the `refreshHref`, if set, or `null` otherwise. The value may be invalid if `getRefresh()` returns `false`.

    - #### getRefreshTime

          public int getRefreshTime()

      Returns:
        the current value of `refreshTime` . The value may be invalid if `getRefresh()` returns `false`.

    - #### getGeneralTags

          public Metadata getGeneralTags()

      Returns:
        all collected values of the general meta tags. Property names are tag names, property values are "content" values.

    - #### getHttpEquivTags

          public Properties getHttpEquivTags()

      Returns:
        all collected values of the "http-equiv" meta tags. Property names are tag names, property values are "content" values.

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`