|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.datanode.nodes.MetamapGroup
public class MetamapGroup
Represents a group of items containing related sets of metadata. Each set of metadata is a key/value map, in which the key is a string. If different items have metadata entries with the same key, they may be supposed to represent the same kind of quantity. A single, automatically maintained list is therefore kept of the keys which crop up in entries in any of the items' metadata sets. An ordering may be imposed on this list.
Constructor Summary | |
---|---|
MetamapGroup(int nitem)
Initialises a MetamapGroup which will contain a given number of items. |
Method Summary | |
---|---|
void |
addEntry(int item,
String key,
Object value)
Adds an entry to one of the metadata sets. |
Object |
getEntry(int item,
String key)
Retrieves an entry from one of the metadata sets by key. |
List |
getKeyOrder()
Returns the list which defines ordering for any keys which crop up. |
List |
getKnownKeys()
Returns a list of all the keys which appear in any of the metadata sets. |
Map[] |
getMetamaps()
Returns the array of metadata maps. |
int |
getNumMaps()
Returns the number of metadata maps. |
boolean |
hasEntry(int item,
String key)
Indicates whether an entry with a given key is present in one of the metadata sets. |
void |
setKeyOrder(List ordering)
Mandates an ordering to be imposed on the metadata keys. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MetamapGroup(int nitem)
nitem
- the number of items in the groupMethod Detail |
---|
public void addEntry(int item, String key, Object value)
item
- the index of the set to which the entry should be addedkey
- the metadatum keyvalue
- the metadatum valuepublic Object getEntry(int item, String key)
item
- the index of the set from which the entry should be gotkey
- the metadatum key
public boolean hasEntry(int item, String key)
item
- the index of the set from which the entry should be gotkey
- the metadatum key
public void setKeyOrder(List ordering)
getKnownKeys()
.
The supplied argument ordering is a list of strings; a string which appears earlier in this list is considered to be earlier in the list of metadata keys. Any which do not appear in this list will be ranked in an unspecified order at the end.
ordering
- a list of strings which may appear in the metadata keyspublic List getKeyOrder()
setKeyOrder(java.util.List)
, or an empty list if that method has
not been called.
public List getKnownKeys()
setKeyOrder(java.util.List)
. If it has never been called they will
be returned in insertion order.
public Map[] getMetamaps()
public int getNumMaps()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |