|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.oodt.cas.metadata.Metadata
public class Metadata
Metadata is a Map of String keys mapped to Object
values. So, each key can map to potentially many values, but also can map to
null, or to a single value.
| Nested Class Summary | |
|---|---|
protected class |
Metadata.Group
|
| Constructor Summary | |
|---|---|
Metadata()
|
|
Metadata(Metadata metadata)
|
|
| Method Summary | |
|---|---|
void |
addMetadata(Hashtable<String,Object> metadata)
|
void |
addMetadata(Hashtable<String,Object> metadata,
boolean replace)
Takes a hashtable of String keys and Object values. |
void |
addMetadata(Metadata metadata)
Adds (Appends if key exists) from given metadata into this metadata |
void |
addMetadata(String key,
List<String> values)
Adds key (Appends if key exists) |
void |
addMetadata(String group,
Metadata metadata)
|
void |
addMetadata(String key,
String value)
Adds key (Appends if key exists) |
boolean |
containsGroup(String group)
|
boolean |
containsKey(String key)
Checks if keys exists |
protected Metadata.Group |
createNewRoot()
|
boolean |
equals(Object obj)
|
List<String> |
getAllKeys()
Gets all keys in this Metadata |
protected List<String> |
getAllKeys(Metadata.Group group)
|
List<String> |
getAllKeys(String group)
Gets All key in and below given group |
List<String> |
getAllKeysWithName(String key)
Get all keys whose leaf key name is equal to the given arg |
List<String> |
getAllMetadata(String key)
Gets all values for give key |
List<String> |
getAllValues()
Gets all values in this Metadata |
List<String> |
getAllValues(String group)
Gets All values in and below given group |
protected Metadata.Group |
getGroup(String key)
|
protected Metadata.Group |
getGroup(String key,
boolean create)
|
List<String> |
getGroups()
|
protected List<String> |
getGroups(Metadata.Group group)
|
List<String> |
getGroups(String group)
|
Hashtable<String,Object> |
getHashtable()
|
List<String> |
getKeys()
Gets all keys in this Metadata |
protected List<String> |
getKeys(Metadata.Group group)
|
List<String> |
getKeys(String group)
Gets All key in and below given group |
String |
getMetadata(String key)
Gets the first value for the given key |
Metadata |
getSubMetadata(String group)
Creates a Metadata from the given group |
List<String> |
getValues()
Gets Values in root group |
List<String> |
getValues(String group)
Gets values in given group |
boolean |
isMultiValued(String key)
Checks if key has more than one value |
void |
removeMetadata(String key)
Removes key |
void |
removeMetadataGroup(String group)
Removes key |
void |
replaceMetadata(Hashtable<String,Object> metadata)
|
void |
replaceMetadata(Metadata metadata)
Adds (Replaces if key exists) from given Metadata into this Metadata |
void |
replaceMetadata(String key,
List<String> values)
Adds key (Replaces if key exists) |
void |
replaceMetadata(String group,
Metadata metadata)
|
void |
replaceMetadata(String key,
String value)
Adds key (Replaces if key exists) |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Metadata()
public Metadata(Metadata metadata)
| Method Detail |
|---|
public void addMetadata(Metadata metadata)
metadata - Metadata to add metadata from
public void addMetadata(String group,
Metadata metadata)
public void replaceMetadata(Metadata metadata)
metadata -
public void replaceMetadata(String group,
Metadata metadata)
public void addMetadata(String key,
String value)
key - Key to be addedvalue - Value of key to be added
public void replaceMetadata(String key,
String value)
key - Key to be addedvalue - Value of key to be added
public void addMetadata(String key,
List<String> values)
key - Key to be addedvalues - Values of key to be added
public void replaceMetadata(String key,
List<String> values)
key - Key to be addedvalues - Values of key to be addedpublic void removeMetadata(String key)
key - Key to removepublic void removeMetadataGroup(String group)
key - Key to removepublic boolean containsKey(String key)
key - Key to check for
public boolean isMultiValued(String key)
key - Key to check for
public Metadata getSubMetadata(String group)
group - The Group to grab
public String getMetadata(String key)
key - The key for which the first value will be returned
public List<String> getAllMetadata(String key)
key - The key for which all values will be return
public List<String> getKeys(String group)
group - The group in question
public List<String> getKeys()
protected List<String> getKeys(Metadata.Group group)
public List<String> getAllKeys(String group)
group - The group in question
public List<String> getAllKeys()
protected List<String> getAllKeys(Metadata.Group group)
public List<String> getAllKeysWithName(String key)
key - leaf key name
public List<String> getValues()
public List<String> getValues(String group)
group - Group in question
public List<String> getAllValues()
public List<String> getAllValues(String group)
group - Group in question
public void addMetadata(Hashtable<String,Object> metadata)
public void addMetadata(Hashtable<String,Object> metadata,
boolean replace)
metadata - Hashtable based metadata to addreplace - If true, existing keys will be replaced, other values will be
combined.public void replaceMetadata(Hashtable<String,Object> metadata)
public boolean containsGroup(String group)
public List<String> getGroups()
public List<String> getGroups(String group)
protected List<String> getGroups(Metadata.Group group)
protected Metadata.Group getGroup(String key)
protected Metadata.Group getGroup(String key,
boolean create)
protected Metadata.Group createNewRoot()
public Hashtable<String,Object> getHashtable()
public boolean equals(Object obj)
equals in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||