Package org.apache.nutch.metadata
Class SpellCheckedMetadata
java.lang.Object
org.apache.nutch.metadata.Metadata
org.apache.nutch.metadata.CaseInsensitiveMetadata
org.apache.nutch.metadata.SpellCheckedMetadata
- All Implemented Interfaces:
Writable,CreativeCommons,DublinCore,Feed,HttpHeaders,Nutch
A decorator to Metadata that adds spellchecking capabilities to property
names. Currently used spelling vocabulary contains just the HTTP headers from
HttpHeaders class. Other names are case insensitive.-
Field Summary
Fields inherited from interface org.apache.nutch.metadata.CreativeCommons
LICENSE_LOCATION, LICENSE_URL, WORK_TYPEFields inherited from interface org.apache.nutch.metadata.DublinCore
CONTRIBUTOR, COVERAGE, CREATOR, DATE, DESCRIPTION, FORMAT, IDENTIFIER, LANGUAGE, MODIFIED, PUBLISHER, RELATION, RIGHTS, SOURCE, SUBJECT, TITLE, TYPEFields inherited from interface org.apache.nutch.metadata.Feed
FEED, FEED_AUTHOR, FEED_PUBLISHED, FEED_TAGS, FEED_UPDATEDFields inherited from interface org.apache.nutch.metadata.HttpHeaders
CLIENT_TRANSFER_ENCODING, CONTENT_DISPOSITION, CONTENT_ENCODING, CONTENT_LANGUAGE, CONTENT_LENGTH, CONTENT_LOCATION, CONTENT_MD5, CONTENT_TYPE, IF_MODIFIED_SINCE, LAST_MODIFIED, LOCATION, TRANSFER_ENCODING, USER_AGENT, WRITABLE_CONTENT_TYPEFields inherited from interface org.apache.nutch.metadata.Nutch
ARG_CRAWLDB, ARG_HOSTDB, ARG_LINKDB, ARG_SEEDDIR, ARG_SEGMENTDIR, ARG_SEGMENTS, CACHING_FORBIDDEN_ALL, CACHING_FORBIDDEN_CONTENT, CACHING_FORBIDDEN_KEY, CACHING_FORBIDDEN_NONE, CHAR_ENCODING_FOR_CONVERSION, CRAWL_ID_KEY, FETCH_EVENT_CONTENTLANG, FETCH_EVENT_CONTENTTYPE, FETCH_EVENT_FETCHTIME, FETCH_EVENT_SCORE, FETCH_EVENT_TITLE, FETCH_STATUS_KEY, FETCH_TIME_KEY, FIXED_INTERVAL_KEY, GENERATE_TIME_KEY, ORIGINAL_CHAR_ENCODING, PROTO_STATUS_KEY, PROTOCOL_STATUS_CODE_KEY, REPR_URL_KEY, ROBOTS_METATAG, SCORE_KEY, SEGMENT_NAME_KEY, SIGNATURE_KEY, STAT_PROGRESS, VAL_RESULT, WRITABLE_FIXED_INTERVAL_KEY, WRITABLE_GENERATE_TIME_KEY, WRITABLE_PROTO_STATUS_KEY, WRITABLE_REPR_URL_KEY -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a metadata name/value mapping.Get the value associated to a metadata name.static StringgetNormalizedName(String name) Get the normalized name of metadata attribute name.String[]Get the values associated to a metadata name.voidRemove a metadata and all its associated values.voidSet metadata name/value.
-
Constructor Details
-
SpellCheckedMetadata
public SpellCheckedMetadata()
-
-
Method Details
-
getNormalizedName
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 tolerant. For instance,- content-type gives Content-Type
- CoNtEntType gives Content-Type
- ConTnTtYpe gives Content-Type
- Parameters:
name- HTTP header name to normalize- Returns:
- normalized HTTP header name
-
remove
Description copied from class:MetadataRemove a metadata and all its associated values. -
add
Description copied from class:MetadataAdd a metadata name/value mapping. Add the specified value to the list of values associated to the specified metadata name. -
getValues
Description copied from class:MetadataGet the values associated to a metadata name. -
get
Description copied from class:MetadataGet the value associated to a metadata name. If many values are associated to the specified name, then the first one is returned. -
set
Description copied from class:MetadataSet metadata name/value. Associate the specified value to the specified metadata name. If some previous values were associated to this name, they are removed.
-