public class Metadata
extends java.lang.Object
Metadata
class represents the metadata associated with
a symbol. Most of the data is represented as a hash table of keyword
value pairs except for the required date attribute. The string version
of the date is stored as "yyyyMMdd HH:mm:ss zzzz".Modifier and Type | Field and Description |
---|---|
static java.lang.String |
FORMAT |
Constructor and Description |
---|
Metadata(java.util.Date date)
This constructor for the
Metadata class takes a date
object as an argument. |
Metadata(java.lang.String date)
This constructor for the
Metadata class takes a date
string as an argument and throws a ParseException if
it is not in the proper format. |
Modifier and Type | Method and Description |
---|---|
void |
addMetadata(java.lang.String keyword,
java.lang.String value)
Add a (keyword,value) pair to the metadata description.
|
java.util.Date |
getDate()
Return the
java.util.Date date associated with this symbol. |
java.lang.String |
getDateAsString()
Return the date associated with this symbol as a string.
|
java.util.Map |
getMetadataDatabase()
Retrieve the metadata database in the form of a
Map . |
java.util.Set |
getMetadataKeys()
Retrieve the set of keys from metadata database.
|
java.lang.String |
getMetadataValue(java.lang.String keyword)
Retrieve the value associated with the specified keyword.
|
public static final java.lang.String FORMAT
public Metadata(java.lang.String date) throws java.text.ParseException
Metadata
class takes a date
string as an argument and throws a ParseException
if
it is not in the proper format.java.text.ParseException
public Metadata(java.util.Date date)
Metadata
class takes a date
object as an argument.public void addMetadata(java.lang.String keyword, java.lang.String value)
public java.util.Date getDate()
java.util.Date
date associated with this symbol.public java.lang.String getDateAsString()
public java.util.Set getMetadataKeys()
Set
is a string object.public java.util.Map getMetadataDatabase()
Map
.
The database consists of (keyword,value) pairs of strings.public java.lang.String getMetadataValue(java.lang.String keyword)