public abstract class DataSource extends DataCollection
Modifier and Type | Field and Description |
---|---|
protected FDLDescriptor |
fdlDescriptor |
protected boolean |
isActivated |
protected java.lang.String |
name
The name of this DataSource object.
|
protected java.lang.String |
wsName |
attributeOrder, axisOrdering, axisWeights, bounds, dataOrder, dimensionality, numAttributes, pointOrder, recordDesc
Modifier | Constructor and Description |
---|---|
protected |
DataSource(DataSource ds)
Constructor sets all data members to copies of the
corresponding members from the argument DataSource.
|
protected |
DataSource(java.lang.String dsname)
Default constructor.
|
protected |
DataSource(java.lang.String aname,
ISBounds db)
Constructor sets the bounds member to
the provided value and the recordDesc member to
a single float attribute.
|
protected |
DataSource(java.lang.String aname,
RecordDescriptor r,
ISBounds db)
Constructor sets the bounds and recordDesc members to
the provided values.
|
Modifier and Type | Method and Description |
---|---|
void |
activate()
The DataSource will perform any initialization required
in order to begin reading/processing data.
|
protected void |
checkActivated()
Check if the DataSource has been activated before trying to access data.
|
void |
clearCache()
Attempts to clear the filesystem cache executing a shell script at $HOME/bin/trc.
|
IndexSpaceID |
copyBestID(IndexSpaceID id)
/** Make a copy of the argument using a chosen subclass
of IndexSpaceID.
|
static DataSource |
create(java.lang.String dsName,
FDLDescriptor fdld)
Creates and returns a PhysicalDataSource, given an FDLDescriptor that has
already been initialized from an FDL file and an arbitrary name for
the datasource.
|
static DataSource |
create(java.lang.String dsName,
java.lang.String xmlFile)
Creates and returns a DataSource.
|
static DataSource |
create(java.lang.String dsName,
java.lang.String fdlfile,
java.lang.String fileServerURL)
Creates and returns a RemoteBFDS where the fileServerURL argument identifies
the location of the DataSource
|
static DataSource |
createRemote(java.lang.String dsName,
FDLDescriptor fdld,
java.lang.String fileServerURL)
Creates and returns a RemoteBFDS where the fileServerURL argument identifies
the location of the DataSource
|
static DataSource |
createRemote(java.lang.String dsName,
java.lang.String fdlfile,
java.lang.String fileServerURL)
Creates and returns a RemoteBFDS where the fileServerURL argument identifies
the location of the DataSource
|
static DataSource |
createRemoteClient(java.lang.String dsName,
FDLDescriptor fdld,
java.lang.String fileServerURL) |
static DataSource |
createRemoteClient(java.lang.String dsName,
java.lang.String fdlfile,
java.lang.String fileServerURL) |
static DataSource |
createRemoteDataSource(java.lang.String dsName,
FDLDescriptor fdld,
java.lang.String fileServerURL) |
static DataSource |
createRemoteDataSource(java.lang.String dsName,
java.lang.String fdlfile,
java.lang.String fileServerURL) |
static DataSource |
createRemoteDataSourceUDP(FDLDescriptor fdld,
java.lang.String dsName,
java.lang.String fileServerURL) |
static DataSource |
createRemoteUDP(java.lang.String dsName,
FDLDescriptor fdld,
java.lang.String fileServerURL) |
static DataSource |
createRemoteUDP(java.lang.String dsName,
java.lang.String fdlfile,
java.lang.String fileServerURL) |
void |
deactivate()
The DataSource will release any resources used during the
readling or processing of data.
|
java.lang.String |
dumpData()
Write the values of the entire DataSource index space to a string in
a nice format.
|
boolean |
equals(java.lang.Object o)
Returns true if this DataSource has the same bounds and
RecordDescriptor as the argument DataSource.
|
FDLDescriptor |
getFDLDescriptor()
returns the FDLDescriptor associated with this DataSource.
|
MetadataCollection |
getMetadataCollection()
Returns the MetadataCollection associated with this DataSource's FDLDescriptor.
|
java.lang.String |
getName()
Returns the name of this DataSource object.
|
java.lang.String |
getStatistics()
Generate a string indicating statistics for performance evaluation.
|
Values |
getValues()
Return a Values array of all attributes in the entire DataSource in whatever
type and order they are stored internally (either attribute order or point order
for Granite-defined objects).
|
boolean |
isActivated()
Returns true if the datasource is activated, false otherwise.
|
static void |
main(java.lang.String[] args)
---------------------- main ----------------------------------
// just a little code to test the code that tries to be smarter about
// finding files.
|
void |
setMetadataCollection(MetadataCollection mc)
Sets the MetadataCollection associated with this DataSource's FDLDescriptor.
|
java.lang.String |
toString()
Return a String representing the object.
|
java.lang.String |
toString(java.lang.String indent)
Return a String representing the object indented by the argument string.
|
byteSize, computeOffset, computeOffset, copyBounds, createDataBlock, createDataBlock, createDataBlock, createDatum, createDatum, createDatum, createDatum, createDatum, createDatum, datum, datum, datum, datum, datum, datum, datum, dim, getAttributeNames, getAxisOrdering, getAxisWeight, getAxisWeights, getBounds, getByte, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getBytesByAttribute, getBytesByAttribute, getBytesByPoint, getBytesByPoint, getDataOrder, getDimensionsArray, getDouble, getDoubles, getDoubles, getDoubles, getDoubles, getDoubles, getDoubles, getDoublesByAttribute, getDoublesByAttribute, getDoublesByPoint, getDoublesByPoint, getFloat, getFloats, getFloats, getFloats, getFloats, getFloats, getFloats, getFloatsByAttribute, getFloatsByAttribute, getFloatsByPoint, getFloatsByPoint, getInt, getInts, getInts, getInts, getInts, getInts, getInts, getIntsByAttribute, getIntsByAttribute, getIntsByPoint, getIntsByPoint, getLowerBoundsArray, getNumAttributes, getRecordDescriptor, getShort, getShorts, getShorts, getShorts, getShorts, getShorts, getShorts, getShortsByAttribute, getShortsByAttribute, getShortsByPoint, getShortsByPoint, getStorageType, getUpperBoundsArray, getValues, getValuesByAttribute, getValuesByPoint, longVolume, setAxisOrdering, setBounds, setRecordDescriptor, size, subblock, subblock, subblock, subblock, subblock, subblock, subblock, subblock, subblock, subblock, subblock, subblock, useBytesOnly, volume
protected java.lang.String name
protected java.lang.String wsName
protected boolean isActivated
protected FDLDescriptor fdlDescriptor
protected DataSource(java.lang.String dsname)
protected DataSource(java.lang.String aname, RecordDescriptor r, ISBounds db)
protected DataSource(java.lang.String aname, ISBounds db)
protected DataSource(DataSource ds)
public void activate()
public void deactivate()
public final boolean isActivated()
public java.lang.String getName()
public Values getValues()
getValues
in class DataCollection
public MetadataCollection getMetadataCollection()
public void setMetadataCollection(MetadataCollection mc)
public FDLDescriptor getFDLDescriptor()
public IndexSpaceID copyBestID(IndexSpaceID id)
public java.lang.String dumpData()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String toString(java.lang.String indent)
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public static final DataSource create(java.lang.String dsName, java.lang.String xmlFile)
public static final DataSource create(java.lang.String dsName, java.lang.String fdlfile, java.lang.String fileServerURL)
public static final DataSource createRemote(java.lang.String dsName, FDLDescriptor fdld, java.lang.String fileServerURL)
public static final DataSource createRemote(java.lang.String dsName, java.lang.String fdlfile, java.lang.String fileServerURL)
public static final DataSource createRemoteUDP(java.lang.String dsName, FDLDescriptor fdld, java.lang.String fileServerURL)
public static final DataSource createRemoteUDP(java.lang.String dsName, java.lang.String fdlfile, java.lang.String fileServerURL)
public static final DataSource createRemoteDataSourceUDP(FDLDescriptor fdld, java.lang.String dsName, java.lang.String fileServerURL)
public static final DataSource createRemoteClient(java.lang.String dsName, FDLDescriptor fdld, java.lang.String fileServerURL)
public static final DataSource createRemoteClient(java.lang.String dsName, java.lang.String fdlfile, java.lang.String fileServerURL)
public static final DataSource createRemoteDataSource(java.lang.String dsName, java.lang.String fdlfile, java.lang.String fileServerURL)
public static final DataSource createRemoteDataSource(java.lang.String dsName, FDLDescriptor fdld, java.lang.String fileServerURL)
public static final DataSource create(java.lang.String dsName, FDLDescriptor fdld)
public java.lang.String getStatistics()
public void clearCache()
public static void main(java.lang.String[] args)
protected final void checkActivated()