|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.nutch.metadata.Metadata
A syntax tolerant and multi-valued metadata container. All the static String fields declared by this class are used as reference names for syntax correction on meta-data naming.
Field Summary | |
static SimpleDateFormat |
DATE_FORMAT
Used to format DC dates for the DATE metadata field |
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 |
Fields inherited from interface org.apache.nutch.metadata.Nutch |
CHAR_ENCODING_FOR_CONVERSION, ORIGINAL_CHAR_ENCODING |
Fields inherited from interface org.apache.nutch.metadata.Office |
APPLICATION_NAME, AUTHOR, CHARACTER_COUNT, COMMENTS, KEYWORDS, LAST_AUTHOR, LAST_PRINTED, LAST_SAVED, PAGE_COUNT, REVISION_NUMBER, TEMPLATE, WORD_COUNT |
Constructor Summary | |
Metadata()
Constructs a new, empty metadata. |
Method Summary | |
void |
add(String name,
String value)
Add a metadata name/value mapping. |
boolean |
equals(Object o)
|
String |
get(String name)
Get the value associated to a metadata name. |
static String |
getNormalizedName(String name)
Get the normalized name of metadata attribute name. |
String[] |
getValues(String name)
Get the values associated to a metadata name. |
boolean |
isMultiValued(String name)
|
String[] |
names()
Returns an array of the names contained in the metadata. |
void |
readFields(DataInput in)
|
void |
remove(String name)
Remove a metadata and all its associated values. |
void |
set(String name,
String value)
Set metadata name/value. |
void |
setAll(Properties properties)
|
int |
size()
Returns the number of metadata names in this metadata. |
String |
toString()
|
void |
write(DataOutput out)
|
Methods inherited from class java.lang.Object |
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final SimpleDateFormat DATE_FORMAT
Constructor Detail |
public Metadata()
Method Detail |
public boolean isMultiValued(String name)
public String[] names()
public String get(String name)
name
- of the metadata.
public String[] getValues(String name)
name
- of the metadata.
public void add(String name, String value)
name
- the metadata name.value
- the metadata value.public void setAll(Properties properties)
public void set(String name, String value)
name
- the metadata name.value
- the metadata value.public void remove(String name)
public int size()
public boolean equals(Object o)
public String toString()
public static String getNormalizedName(String name)
public final void write(DataOutput out) throws IOException
write
in interface Writable
IOException
public final void readFields(DataInput in) throws IOException
readFields
in interface Writable
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |