Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class ncsa.horizon.model.HorizonMetadata

java.lang.Object
  |
  +--java.util.Dictionary
        |
        +--java.util.Hashtable
              |
              +--ncsa.horizon.util.Metadata
                    |
                    +--ncsa.horizon.model.HorizonMetadata

public class HorizonMetadata
extends Metadata
a Metadata class with extra help to support the Horizon schema

See Also:
Serialized Form

Field Summary
static java.lang.String aCoordinateSystem
           
static java.lang.String horizonSchema
           
static java.lang.String nativeSchema
           
static java.lang.String naxes
           
static java.lang.String SchemaSet
           
static java.lang.String version
          version of horizon schema supported by this object
 
Fields inherited from class ncsa.horizon.util.Metadata
defaults, executeRunners, METARUNNER_TAG, schema, schemaVersion
 
Constructor Summary
HorizonMetadata()
          Construct a HorizonMetadata object for holding Viewable-level metadata.
HorizonMetadata(int nax, Metadata defaults)
          Create a Metadata object describing a Viewable dataset with a given number of axes.
HorizonMetadata(int nax)
          Creates an empty metadatum list with defaults.
HorizonMetadata(Metadata viewableDefaults, Metadata coordMetadata)
          Creates an empty metadatum list with specified defaults.
 
Method Summary
void initMetadata(int nax)
           
static void setCoordinateSystem(Metadata md, Metadata coordmd)
          set the Coordinate System metadata for a dataset
void setCoordinateSystem(Metadata coordmd)
          set the Coordinate System metadata for a dataset
static void setDataType(Metadata md, java.lang.Class type)
          set the "dataType" metadatum in the given metadata list.
void setDataType(java.lang.Class type)
          set the default slice metadatum in this metadata list.
static void setDataVolume(Metadata md, Volume dataVolume)
          set the "dataVolume" metadatum indicating the extent of the data.
static void setDataVolume(Metadata md, int[] size)
          set the "dataVolume" metadatum indicating the extent of the data.
void setDataVolume(Volume dataVolume)
          set the "dataVolume" metadatum indicating the extent of the data.
void setDataVolume(int[] size)
          set the "dataVolume" metadatum indicating the extent of the data.
static void setDefaultSlice(Metadata md, Slice slice)
          set the default slice metadatum in the given metadata list
void setDefaultSlice(Slice slice)
          set the default slice metadatum in this metadata list
static void setMaximumValue(Metadata md, java.lang.Object val)
          set the "maximumValue" metadatum in the given metadata list
void setMaximumValue(java.lang.Object val)
          set the default slice metadatum in this metadata list
static void setMinimumValue(Metadata md, java.lang.Object val)
          set the "minimumValue" metadatum in the given metadata list
void setMinimumValue(java.lang.Object val)
          set the default slice metadatum in this metadata list
static void setNaxes(Metadata md, int nax)
          set the number of axes in a dataset
void setNaxes(int i)
          set the number of axes for the dataset described by this Metadata
static void setUndefinedValue(Metadata md, java.lang.Object val)
          set the "undefinedValue" metadatum in the given metadata list
void setUndefinedValue(java.lang.Object val)
          set the default slice metadatum in this metadata list
static void setUnitsConverter(Metadata md, DataFilter df)
          set a data filter that should be used to convert raw values into physical values.
void setUnitsConverter(DataFilter df)
          set a data filter that should be used to convert raw values into physical values.
 
Methods inherited from class ncsa.horizon.util.Metadata
cloneDefaults, clone, copyMetadata, copyMetadata, deepClone, detachedClone, detach, fetchDatum, fetchMetadatum, getDefaults, getMetadatum, getMetadatum, getMetadatum, getMetadatum, getRunnerNames, giveDefaults, metadatumNames, put, removeAllMetadata, setDefaults, setSchema, setSchemaVersion, toString
 
Methods inherited from class java.util.Hashtable
clear, clone, contains, containsKey, containsValue, elements, entrySet, equals, get, hashCode, isEmpty, keySet, keys, putAll, put, rehash, remove, size, toString, values
 
Methods inherited from class java.util.Dictionary
elements, get, isEmpty, keys, put, remove, size
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Field Detail

horizonSchema

public static final java.lang.String horizonSchema

version

public static final java.lang.String version
version of horizon schema supported by this object

aCoordinateSystem

public static final java.lang.String aCoordinateSystem

nativeSchema

public static final java.lang.String nativeSchema

SchemaSet

public static final java.lang.String SchemaSet

naxes

public static final java.lang.String naxes
Constructor Detail

HorizonMetadata

public HorizonMetadata()
Construct a HorizonMetadata object for holding Viewable-level metadata. The dataset will be assumed to have 1 axis

HorizonMetadata

public HorizonMetadata(int nax,
                       Metadata defaults)
                throws java.lang.ArrayIndexOutOfBoundsException
Create a Metadata object describing a Viewable dataset with a given number of axes.
Parameters:
nax - the number of axes in the dataset
defaults - the defaults (can be null)
Throws:
java.lang.ArrayIndexOutOfBoundsException - if naxes < 1

HorizonMetadata

public HorizonMetadata(int nax)
                throws java.lang.ArrayIndexOutOfBoundsException
Creates an empty metadatum list with defaults.
Parameters:
nax - the number of axes in the dataset
Throws:
java.lang.ArrayIndexOutOfBoundsException - if naxes < 1

HorizonMetadata

public HorizonMetadata(Metadata viewableDefaults,
                       Metadata coordMetadata)
                throws java.lang.ArrayIndexOutOfBoundsException
Creates an empty metadatum list with specified defaults.
Parameters:
viewableDefaults - the default dataset metadata; can be null;
coordMetadata - the coordinate system metadata; these will be saved under the primary (i.e. updatable) list with the name "CoordinateSystem"; can be null.
Throws:
java.lang.ArrayIndexOutOfBoundsException - if viewableDefaults contains a value for "naxes" that is < 1 or not specified.
Method Detail

initMetadata

protected void initMetadata(int nax)

setNaxes

public static void setNaxes(Metadata md,
                            int nax)
                    throws java.lang.ArrayIndexOutOfBoundsException
set the number of axes in a dataset
Parameters:
md - the metadata to update
nax - the number of axes

setNaxes

public void setNaxes(int i)
             throws java.lang.ArrayIndexOutOfBoundsException
set the number of axes for the dataset described by this Metadata
Parameters:
nax - the number of axes

setCoordinateSystem

public static void setCoordinateSystem(Metadata md,
                                       Metadata coordmd)
set the Coordinate System metadata for a dataset
Parameters:
md - the metadata to update
coordmd - the Coordinate System metadata to insert

setCoordinateSystem

public void setCoordinateSystem(Metadata coordmd)
set the Coordinate System metadata for a dataset
Parameters:
coordmd - the Coordinate System metadata to insert

setDataVolume

public static void setDataVolume(Metadata md,
                                 Volume dataVolume)
set the "dataVolume" metadatum indicating the extent of the data. This method will also set the number of axes.
Parameters:
md - the metadata to update
dataVolume - the extent of the data

setDataVolume

public static void setDataVolume(Metadata md,
                                 int[] size)
set the "dataVolume" metadatum indicating the extent of the data. The origin of the volume will be set to (0, 0, ...); This method will also set the number of axes.
Parameters:
md - the metadata to update
dataVolume - the extent of the data

setDataVolume

public void setDataVolume(Volume dataVolume)
set the "dataVolume" metadatum indicating the extent of the data. This method will also set the number of axes.
Parameters:
dataVolume - the extent of the data

setDataVolume

public void setDataVolume(int[] size)
set the "dataVolume" metadatum indicating the extent of the data. The origin of the volume will be set to (0, 0, ...); This method will also set the number of axes.
Parameters:
size - the length of axis

setDefaultSlice

public static void setDefaultSlice(Metadata md,
                                   Slice slice)
set the default slice metadatum in the given metadata list
Parameters:
md - the metadata to update
slice - the default slice to set

setDefaultSlice

public void setDefaultSlice(Slice slice)
set the default slice metadatum in this metadata list
Parameters:
slice - the default slice to set

setDataType

public static void setDataType(Metadata md,
                               java.lang.Class type)
set the "dataType" metadatum in the given metadata list. Note that this will remove the values associated with "undefinedValue", "minimumValue", and "maximumValue" if their types are not consistant with the type given here.
Parameters:
md - the metadata to update
type - the data type of the array

setDataType

public void setDataType(java.lang.Class type)
set the default slice metadatum in this metadata list. Note that this will remove the values associated with "undefinedValue", "minimumValue", and "maximumValue" if their types are not consistant with the type given here.
Parameters:
type - the data type of the array

setUnitsConverter

public static void setUnitsConverter(Metadata md,
                                     DataFilter df)
                             throws java.lang.IllegalArgumentException
set a data filter that should be used to convert raw values into physical values.
Throws:
java.lang.IllegalArgumentException - if "dataType" has already been set and is not supported by the given data filter

setUnitsConverter

public void setUnitsConverter(DataFilter df)
                      throws java.lang.IllegalArgumentException
set a data filter that should be used to convert raw values into physical values.
Throws:
java.lang.IllegalArgumentException - if "dataType" has already been set and is not supported by the given data filter

setUndefinedValue

public static void setUndefinedValue(Metadata md,
                                     java.lang.Object val)
                             throws MetadataTypeException
set the "undefinedValue" metadatum in the given metadata list
Parameters:
md - the metadata to update
val - the undefined value
Throws:
MetadataTypeException - if undef has a type incompatible with the current value of "dataType"

setUndefinedValue

public void setUndefinedValue(java.lang.Object val)
                      throws MetadataTypeException
set the default slice metadatum in this metadata list
Parameters:
type - the data type of the array

setMinimumValue

public static void setMinimumValue(Metadata md,
                                   java.lang.Object val)
                           throws MetadataTypeException
set the "minimumValue" metadatum in the given metadata list
Parameters:
md - the metadata to update
val - the minimum value
Throws:
MetadataTypeException - if undef has a type incompatible with the current value of "dataType"

setMinimumValue

public void setMinimumValue(java.lang.Object val)
                    throws MetadataTypeException
set the default slice metadatum in this metadata list
Parameters:
type - the data type of the array

setMaximumValue

public static void setMaximumValue(Metadata md,
                                   java.lang.Object val)
                           throws MetadataTypeException
set the "maximumValue" metadatum in the given metadata list
Parameters:
md - the metadata to update
val - the maximum value
Throws:
MetadataTypeException - if undef has a type incompatible with the current value of "dataType"

setMaximumValue

public void setMaximumValue(java.lang.Object val)
                    throws MetadataTypeException
set the default slice metadatum in this metadata list
Parameters:
type - the data type of the array

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD