public class MetamapGroup extends Object
Constructor and Description |
---|
MetamapGroup(int nitem)
Initialises a MetamapGroup which will contain a given number of items.
|
Modifier and Type | Method and Description |
---|---|
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.
|
public MetamapGroup(int nitem)
nitem
- the number of items in the grouppublic void addEntry(int item, String key, Object value)
value==null
or if
value.toString().length()==0
.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)
null
is returned if no such entry exists.item
- the index of the set from which the entry should be gotkey
- the metadatum keykey
,
or null
if there isn't onepublic boolean hasEntry(int item, String key)
item
- the index of the set from which the entry should be gotkey
- the metadatum keykey
exists
in set number item
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()
Copyright © 2024 Central Laboratory of the Research Councils. All Rights Reserved.