net.sf.eos.document
Class EosDocument

java.lang.Object
  extended by net.sf.eos.document.EosDocument
All Implemented Interfaces:
Metadata

public final class EosDocument
extends Object
implements Metadata

Represents a simple εοs document. An instance of this document never contains any linefeed (ASCII 0xa) or carriage return (ASCII 0xd) characters.

Author:
Sascha Kohlmann

Field Summary
static String CREATOR_META_KEY
          A metadata key for the creator in a metadata.
static String ID_META_KEY
          A metadata key for the IDs in a metadata.
static String YEAR_META_KEY
          A metadata key for the year in a metadata.
 
Constructor Summary
EosDocument()
           
 
Method Summary
 boolean equals(Object other)
           
 Map<String,List<String>> getMeta()
          Returns the metadata of the document.
 CharSequence getText()
          Returns the text of the document.
 CharSequence getTitle()
          Returns the title of the document.
 int hashCode()
          Implemented for hash contract.
 void setMeta(Map<String,List<String>> meta)
          Sets the metadata of the document.
 void setText(CharSequence text)
          Sets the text of the document.
 void setTitle(CharSequence title)
          Sets the title of the document.
 String toString()
          The value of the return string may change in future implementations.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

YEAR_META_KEY

public static final String YEAR_META_KEY
A metadata key for the year in a metadata.

See Also:
Constant Field Values

CREATOR_META_KEY

public static final String CREATOR_META_KEY
A metadata key for the creator in a metadata.

See Also:
Constant Field Values

ID_META_KEY

public static final String ID_META_KEY
A metadata key for the IDs in a metadata.

See Also:
Constant Field Values
Constructor Detail

EosDocument

public EosDocument()
Method Detail

getText

public CharSequence getText()
Returns the text of the document.

Returns:
the text

getTitle

public CharSequence getTitle()
Returns the title of the document.

Returns:
the title of the document

getMeta

public Map<String,List<String>> getMeta()
Returns the metadata of the document.

Specified by:
getMeta in interface Metadata
Returns:
the metadata of the document

setText

public void setText(CharSequence text)
Sets the text of the document.

Parameters:
text - the text of the document

setTitle

public void setTitle(CharSequence title)
Sets the title of the document.

Parameters:
title - the title of the document

setMeta

public void setMeta(Map<String,List<String>> meta)
Sets the metadata of the document.

Parameters:
meta - the metadata of the document

toString

public String toString()
The value of the return string may change in future implementations. Don't use for information extraction.

Overrides:
toString in class Object
Returns:
a String representation of the document
See Also:
for serialization

equals

public boolean equals(Object other)
Overrides:
equals in class Object
See Also:
Object.equals(Object)

hashCode

public int hashCode()
Implemented for hash contract. Don't use a EosDocument instance in a hash oriented dictionary.

Overrides:
hashCode in class Object


Copyright © 2008. All Rights Reserved.