Re: Name for Tuple ?

Hi Peter,

> What I am going to ask may not make much sense to you.
> Can we set and get name for Tuple ? Since HDF5 groups are
> mapped into Tuples and HDF5 groups have names, I need to
> reserve the names of the groups in Tuples so I can retrieve them
> later.

The visad.Tuple class does not have a name field, but your
HDF-5 adapter could construct its Data objects using an
extension of Tuple such as:

public class NamedTuple extends Tuple {
  private String name;

  public NamedTuple(TupleType type, Data[] datums, boolean copy, String n)
         throws VisADException, RemoteException {
    super(type, datums, copy);
    name = n;

  // . . . other constructors

  public String getName() {
    return name;

Of course, VisAD's internal logic would know nothing about
this, so for example adding two such Data objects would
produce a result that did not use any NamedTuples.  If this
is a problem for you, we could add a name String field to

Bill Hibbard, SSEC, 1225 W. Dayton St., Madison, WI  53706
hibbard@xxxxxxxxxxxxxxxxx  608-263-4427  fax: 608-263-6738

  • 2000 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: