|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.sdsc.grid.io.MetaDataGroup
public class MetaDataGroup
A "Meta data group" is a group of meta data fields. Each MetaDataGroup class includes documentation and introspection methods that describe the group as a whole, the list of fields in the group, a description for those fields, the data types for those fields, and the expected field values.
Each subclass has a constructor. None of the constructors are ever public. Leaf classes in the class tree have private constructors, while the rest are protected. The constructors are called by a static initializer method for each class and are strictly used to create a single object for the class that is passed to the MetaDataGroup parent class to register it in a master list. That object also should be saved by the child class and will be passed to constructors for condition and select objects (so that generic handlers of those objects can get back to the metadata group).
Each of the subclasses group together meta data for a specific purpose. All of the SRB meta data groups are subclassed off of SRBMetaData. The subclasses may add methods, but most will only implement the required methods.
Some meta groups are standard regardless of implementation. To handle standard metadata, we defined interfaces that are implemented by protocol-specific metadata groups. The GeneralMetaData interface contract is that the implementor supports metadata we might find for any file system, such as:
An implementation specific group, such as the general SRB metadata group must support these fields, but also may support further general metadata fields, such as:
| Field Summary | |
|---|---|
protected java.lang.String |
description
|
protected java.util.HashMap |
fields
|
protected java.lang.String |
groupName
|
| Constructor Summary | |
|---|---|
MetaDataGroup(java.lang.String groupName,
java.lang.String description)
Construct a metadata group and register the group in a master list of groups maintained by the MetaDataSet class. |
|
| Method Summary | |
|---|---|
void |
add(MetaDataField field)
Load the group's fields. |
int |
compareTo(java.lang.Object obj)
|
java.lang.String |
getDescription()
This string may be displayed by a GUI. |
MetaDataField |
getField(java.lang.String fieldName)
Returns an object describing this field in the group. |
int |
getFieldCount()
Returns the number of fields known by the group. |
MetaDataField[] |
getFields()
Returns all the fields in the group. |
MetaDataField[] |
getFields(boolean sort)
|
java.lang.String |
getName()
Returns a short name string for this metadata group. |
java.lang.String |
toString()
Returns a string representation of the object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected java.util.HashMap fields
protected java.lang.String groupName
protected java.lang.String description
| Constructor Detail |
|---|
public MetaDataGroup(java.lang.String groupName,
java.lang.String description)
| Method Detail |
|---|
public void add(MetaDataField field)
public java.lang.String getName()
public java.lang.String getDescription()
public int getFieldCount()
public MetaDataField getField(java.lang.String fieldName)
public MetaDataField[] getFields()
public MetaDataField[] getFields(boolean sort)
sort - if true, sort alphabetically by name.
MetaDataField.compareTo( Object )public int compareTo(java.lang.Object obj)
compareTo in interface java.lang.Comparablepublic java.lang.String toString()
toString in class java.lang.Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||