org.apache.nutch.metadata

## Class SpellCheckedMetadata

- java.lang.Object
- - org.apache.nutch.metadata.Metadata
  - - org.apache.nutch.metadata.SpellCheckedMetadata

- All Implemented Interfaces:
    Writable, CreativeCommons, DublinCore, Feed, HttpHeaders, Nutch

      public class SpellCheckedMetadata
      extends Metadata

  A decorator to Metadata that adds spellchecking capabilities to property names. Currently used spelling vocabulary contains just the httpheaders from `HttpHeaders` class.

- - ### Field Summary

    - ### Fields inherited from interface org.apache.nutch.metadata.CreativeCommons

      `LICENSE_LOCATION, LICENSE_URL, WORK_TYPE`

    - ### Fields inherited from interface org.apache.nutch.metadata.DublinCore

      `CONTRIBUTOR, COVERAGE, CREATOR, DATE, DESCRIPTION, FORMAT, IDENTIFIER, LANGUAGE, MODIFIED, PUBLISHER, RELATION, RIGHTS, SOURCE, SUBJECT, TITLE, TYPE`

    - ### Fields inherited from interface org.apache.nutch.metadata.HttpHeaders

      `CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_MD5, CONTENT_TYPE, LAST_MODIFIED, LOCATION, TRANSFER_ENCODING`

    - ### Fields inherited from interface org.apache.nutch.metadata.Nutch

      `ALL_BATCH_ID_STR, ALL_CRAWL_ID, ARG_BATCH, ARG_CLASS, ARG_CRAWL, ARG_CURTIME, ARG_DEPTH, ARG_FILTER, ARG_FORCE, ARG_NORMALIZE, ARG_NUMTASKS, ARG_RESUME, ARG_SEEDDIR, ARG_SEEDLIST, ARG_SITEMAP, ARG_SITEMAP_DETECT, ARG_SOLR, ARG_SORT, ARG_THREADS, ARG_TOPN, BATCH_NAME_KEY, CACHING_FORBIDDEN_ALL, CACHING_FORBIDDEN_CONTENT, CACHING_FORBIDDEN_KEY, CACHING_FORBIDDEN_KEY_UTF8, CACHING_FORBIDDEN_NONE, CHAR_ENCODING_FOR_CONVERSION, CRAWL_ID_KEY, FETCH_STATUS_KEY, FETCH_TIME_KEY, GENERATE_TIME_KEY, ORIGINAL_CHAR_ENCODING, PROTO_STATUS_KEY, REPR_URL_KEY, SCORE_KEY, SIGNATURE_KEY, STAT_COUNTERS, STAT_JOBS, STAT_MESSAGE, STAT_PHASE, STAT_PROGRESS, WRITABLE_GENERATE_TIME_KEY, WRITABLE_PROTO_STATUS_KEY, WRITABLE_REPR_URL_KEY`

    - ### Fields inherited from interface org.apache.nutch.metadata.Feed

      `FEED, FEED_AUTHOR, FEED_PUBLISHED, FEED_TAGS, FEED_UPDATED`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SpellCheckedMetadata()`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `add(java.lang.String name, java.lang.String value)` Add a metadata name/value mapping.
    `java.lang.String` | `get(java.lang.String name)` Get the value associated to a metadata name.
    `static java.lang.String` | `getNormalizedName(java.lang.String name)` Get the normalized name of metadata attribute name.
    `java.lang.String[]` | `getValues(java.lang.String name)` Get the values associated to a metadata name.
    `void` | `remove(java.lang.String name)` Remove a metadata and all its associated values.
    `void` | `set(java.lang.String name, java.lang.String value)` Set metadata name/value.

    - ### Methods inherited from class org.apache.nutch.metadata.Metadata

      `clear, equals, getMetaData, isMultiValued, names, readFields, setAll, size, toString, write`

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

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

- - ### Constructor Detail

    - #### SpellCheckedMetadata

          public SpellCheckedMetadata()

  - ### Method Detail

    - #### getNormalizedName

          public static java.lang.String getNormalizedName(java.lang.String name)

      Get the normalized name of metadata attribute name. This method tries to find a well-known metadata name (one of the metadata names defined in this class) that matches the specified name. The matching is error tolerent. For instance,
      - content-type gives Content-Type
      - CoNtEntType gives Content-Type
      - ConTnTtYpe gives Content-Type
      If no matching with a well-known metadata name is found, then the original name is returned.
      Parameters:
        `name` - Name to normalize
      Returns:
        normalized name

    - #### remove

          public void remove(java.lang.String name)

      Description copied from class: `Metadata`
      Remove a metadata and all its associated values.
      Overrides:
        `remove` in class `Metadata`
      Parameters:
        `name` - metadata name to remove

    - #### add

          public void add(java.lang.String name,
                          java.lang.String value)

      Description copied from class: `Metadata`
      Add a metadata name/value mapping. Add the specified value to the list of values associated to the specified metadata name.
      Overrides:
        `add` in class `Metadata`
      Parameters:
        `name` - the metadata name.
        `value` - the metadata value.

    - #### getValues

          public java.lang.String[] getValues(java.lang.String name)

      Description copied from class: `Metadata`
      Get the values associated to a metadata name.
      Overrides:
        `getValues` in class `Metadata`
      Parameters:
        `name` - of the metadata.
      Returns:
        the values associated to a metadata name.

    - #### get

          public java.lang.String get(java.lang.String name)

      Description copied from class: `Metadata`
      Get the value associated to a metadata name. If many values are assiociated to the specified name, then the first one is returned.
      Overrides:
        `get` in class `Metadata`
      Parameters:
        `name` - of the metadata.
      Returns:
        the value associated to the specified metadata name.

    - #### set

          public void set(java.lang.String name,
                          java.lang.String value)

      Description copied from class: `Metadata`
      Set metadata name/value. Associate the specified value to the specified metadata name. If some previous values were associated to this name, they are removed.
      Overrides:
        `set` in class `Metadata`
      Parameters:
        `name` - the metadata name.
        `value` - the metadata value.

Copyright © 2019 The Apache Software Foundation