public class FDLDescriptor
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
protected AxisOrdering |
axisOrdering
Declares the axis axisOrdering
|
protected IndexSpaceID |
blockDimensions
Denotes the block (partition) dimensions for SparseDataSource
|
protected ISBounds |
bounds
Denotes extent of Index Space
|
protected int |
chomboDesiredAttribute |
protected IndexSpaceID |
chunkDimensions
Denotes the chunk (partition) dimensions for ChunkedDataSource
|
protected java.lang.String |
dataFileType
Declares the file type
|
protected java.lang.String |
dataFileURL
Declares the file name (URL) where the data is located
|
protected java.nio.ByteOrder |
endianness |
protected java.lang.String |
fdlFileName
name of fdl file used to create this descriptor
|
protected java.lang.String |
fdlFileRoot
directory of fdl file used to create this descriptor (if created by file)
|
protected java.util.Vector<java.lang.String> |
fieldNames
Declares a vector to hold the field name strings
|
protected java.util.Vector<java.lang.String> |
fieldTypes
Declares a vector to hold the field type strings
|
protected long |
fileOffset
Declares the file offset
|
protected int |
recordSize
Declares the record size
|
protected java.lang.String[] |
sparseMapData
Holds the information for mapping blocks in a sparse data source
|
Constructor and Description |
---|
FDLDescriptor()
Default Constructor sets the bounds and recordDesc members to default values.
|
FDLDescriptor(RecordDescriptor rd,
ISBounds bnds,
AxisOrdering axes)
Create an FDLDescriptor from a RecordDescriptor, Bounds, and AxisOrdering.
|
FDLDescriptor(RecordDescriptor rd,
ISBounds bnds,
AxisOrdering axes,
MetadataCollection metadata)
Create an FDLDescriptor from a RecordDescriptor, Bounds, AxisOrdering
and Metadata.
|
Modifier and Type | Method and Description |
---|---|
void |
addFieldName(java.lang.String n)
Adds a field name to the current record descriptor
|
void |
addFieldType(java.lang.String t)
Adds a field type to the current record descriptor
|
java.lang.Object |
clone()
Create a clone of this object
|
static FDLDescriptor |
create(java.lang.String fdlFileName)
Factory method pattern to create.
|
AxisOrdering |
getAxisOrdering()
Returns the axisOrdering
|
IndexSpaceID |
getBlockDimensions() |
ISBounds |
getBounds()
Returns the bounds of the Index Space for this
FDLDescriptor.
|
java.nio.ByteOrder |
getByteOrder()
Returns a ByteOrder indicating whether the file
byte order is bigendian.
|
int |
getChomboDesiredAttribute()
Return the attribute being read from the Chombo file.
|
IndexSpaceID |
getChunkDimensions() |
java.lang.String |
getDataFileString()
Returns the file specification string for this FDLDescriptor as a String.
|
java.lang.String |
getDataFileType()
Returns the DataFile Type as a string
|
java.lang.String |
getDataFileURL()
Returns the file URL for this FDLDescriptor as a String.
|
int |
getDim()
Returns the the dimensionality for this FDLDescriptor as an int
|
int |
getFieldLayout()
Returns a boolean if Point Order has been selected
|
long |
getFileOffset()
Returns the file offset
|
MetadataCollection |
getMetadata()
returns this objects Metadata object
|
int |
getNumberOfFields()
Returns the number of fields in a record descriptor as an integer
|
RecordDescriptor |
getRecordDescriptor()
generate a record descriptor using the fieldNames and fieldTypes vectors
if there are no field names/types, then an empty RecordDescriptor will be returned
|
int |
getRecordSize()
Returns the Record Size as an integer(not used)
|
java.lang.String |
getRootDirectory()
Return the directory that is considered to the 'root' directory for searching
for the data file.
|
java.lang.String[] |
getSparseBlockMap()
returns this objects Sparse block mapper information
|
boolean |
isBigEndian() |
boolean |
isChunkedFileFormat() |
boolean |
isSparse() |
void |
setAxisOrdering(AxisOrdering axisOrdering)
Sets the axisOrdering
|
void |
setBlockDimensions(IndexSpaceID id) |
void |
setBounds(ISBounds bounds)
Sets the Index Space bounds
|
void |
setByteOrder(java.nio.ByteOrder endianness)
Tell the FDLDescriptor the byte order for the file.
|
void |
setChomboDesiredAttribute(int desiredAttribute)
For Chombo files, we currently support reading only a single
attribute.
|
void |
setChunkDimensions(IndexSpaceID id) |
void |
setDataFileType(java.lang.String dfType)
Sets the DataFile Type as a String
|
void |
setDataFileURL(java.lang.String dfURL)
Sets the URL of the XML input file
|
void |
setFieldLayout(int fieldLayout)
Sets the attribute format.
|
void |
setFileFormat(boolean chunkedFileFormat)
Deprecated.
implied by setChunkedDimensions( isid )
|
void |
setFileOffset(long fileOffset)
Sets the file offset
|
void |
setMetadata(MetadataCollection meta)
sets this object's MetadataCollection object
|
void |
setRecordSize(int rs)
Sets the Record Size (not used)
|
void |
setRootDirectory(java.lang.String newRoot)
Set the root directory for searching for the data file.
|
void |
setSparseBlockMap(java.lang.String[] mapInfo)
sets this object's sparse block mapping info
|
java.lang.String |
toString()
Returns a String representation of this class
|
void |
writeFDL()
Write a .xfdl formatted file to the file that is represented by this
FDLDescriptor.
|
void |
writeFDL(java.io.File f)
Write a .xfdl formatted file to the file specified which includes all the
attributes in this FDLDescriptor.
|
protected java.lang.String fdlFileRoot
protected java.lang.String fdlFileName
protected ISBounds bounds
protected IndexSpaceID chunkDimensions
protected IndexSpaceID blockDimensions
protected java.lang.String dataFileURL
protected java.lang.String dataFileType
protected int recordSize
protected java.util.Vector<java.lang.String> fieldNames
protected java.util.Vector<java.lang.String> fieldTypes
protected AxisOrdering axisOrdering
protected long fileOffset
protected java.nio.ByteOrder endianness
protected int chomboDesiredAttribute
protected java.lang.String[] sparseMapData
public FDLDescriptor()
public FDLDescriptor(RecordDescriptor rd, ISBounds bnds, AxisOrdering axes)
public FDLDescriptor(RecordDescriptor rd, ISBounds bnds, AxisOrdering axes, MetadataCollection metadata)
public static FDLDescriptor create(java.lang.String fdlFileName)
public java.lang.Object clone()
clone
in class java.lang.Object
public java.lang.String getRootDirectory()
public void setRootDirectory(java.lang.String newRoot)
public RecordDescriptor getRecordDescriptor()
public void setBounds(ISBounds bounds)
public ISBounds getBounds()
public void setDataFileURL(java.lang.String dfURL)
public java.lang.String getDataFileURL()
public java.lang.String getDataFileString()
public void setDataFileType(java.lang.String dfType)
public java.lang.String getDataFileType()
public void setRecordSize(int rs)
public int getRecordSize()
public int getDim()
public void addFieldName(java.lang.String n)
public void addFieldType(java.lang.String t)
public void setFieldLayout(int fieldLayout)
public void setFileFormat(boolean chunkedFileFormat)
chunkedFileFormat
- public void setChunkDimensions(IndexSpaceID id)
public int getFieldLayout()
public boolean isChunkedFileFormat()
public IndexSpaceID getChunkDimensions()
public int getNumberOfFields()
public void setAxisOrdering(AxisOrdering axisOrdering)
public AxisOrdering getAxisOrdering()
public void setFileOffset(long fileOffset)
public long getFileOffset()
public java.nio.ByteOrder getByteOrder()
public void setByteOrder(java.nio.ByteOrder endianness)
public boolean isBigEndian()
public void setChomboDesiredAttribute(int desiredAttribute)
public int getChomboDesiredAttribute()
public void setBlockDimensions(IndexSpaceID id)
public IndexSpaceID getBlockDimensions()
public java.lang.String[] getSparseBlockMap()
public void setSparseBlockMap(java.lang.String[] mapInfo)
mapInfo
- String>[] of form srcBlk(blkOrigin):dstBlkpublic boolean isSparse()
public MetadataCollection getMetadata()
public void setMetadata(MetadataCollection meta)
meta
- the MetadataCollectionpublic void writeFDL()
public void writeFDL(java.io.File f)
public java.lang.String toString()
toString
in class java.lang.Object