org.javaseis.io
Class SortRead

java.lang.Object
  extended by org.javaseis.io.SortRead
Direct Known Subclasses:
SortCreate

public class SortRead
extends java.lang.Object


Field Summary
protected  int currentFrame
           
protected  int currentVolume
           
protected  java.nio.ByteBuffer frameBuffer
           
protected  int[] frameMap
           
protected  VirtualIO frameMapio
           
protected  int framesInVolume
           
protected  int framesPerVolume
           
protected  java.nio.IntBuffer frameView
           
protected  java.lang.String label3
           
protected  java.lang.String label4
           
protected  int logicalFrame
           
protected  int logicalVolume
           
protected  int maxLogFrm
           
protected  int maxLogVol
           
protected  int minLogFrm
           
protected  int minLogVol
           
protected  Seisio sio
           
protected  PropertyDescription sort3
           
protected  PropertyDescription sort4
           
protected  java.lang.String sortName
           
protected  SeisProperties sprops
           
protected  java.nio.ByteBuffer traceBuffer
           
protected  long[] traceMap
           
protected  VirtualIO traceMapio
           
protected  int tracesInFrame
           
protected  long tracesInSort
           
protected  int tracesPerFrame
           
protected  java.nio.LongBuffer traceView
           
protected  java.nio.ByteBuffer volumeBuffer
           
protected  int[] volumeMap
           
protected  VirtualIO volumeMapio
           
protected  int volumes
           
protected  java.nio.IntBuffer volumeView
           
 
Constructor Summary
protected SortRead()
           
  SortRead(Seisio sioFile, java.lang.String name)
          Open a sort order for an existing JavaSeis dataset
 
Method Summary
 void close()
           
static boolean delete(java.lang.String path)
          Delete all sort orders in the directory defined by the input path.
static boolean delete(java.lang.String path, java.lang.String name)
          Remove an existing sort order
static boolean exists(Seisio sio, java.lang.String name)
          Determine if a sort order exists in an open JavaSeis dataset
static boolean exists(java.lang.String path, java.lang.String name)
          Determine if a sort order exists
 java.lang.String getFrameLabel()
           
 int getFrameLogicalDelta()
           
 int getFrameLogicalOrigin()
           
 int getNumFramesPerVolume()
           
 int getNumTracesPerFrame()
           
 int getNumVolumes()
           
 java.lang.String getVolumeLabel()
           
 int getVolumeLogicalDelta()
           
 int getVolumeLogicalOrigin()
           
static java.lang.String[] list(Seisio seisio, java.lang.String path)
          Return a list of sort orders in a JavaSeis dataset
static java.lang.String[] list(java.lang.String path)
          Return a list of sort orders in a JavaSeis dataset
static void main(java.lang.String[] args)
           
 void open(Seisio sioFile, java.lang.String name)
          Open a sort order for an existing JavaSeis dataset
 int readFrame()
           
 int setFrame(int ifrm)
          Set the current frame for subsequent read and write operations
 void setPosition(int[] position)
          Set the current position for a sort "scattered" read.
 int setVolume(int ivol)
          Set the current volume for subsequent read and write operations
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

currentFrame

protected int currentFrame

currentVolume

protected int currentVolume

frameBuffer

protected java.nio.ByteBuffer frameBuffer

frameMap

protected int[] frameMap

frameMapio

protected VirtualIO frameMapio

framesInVolume

protected int framesInVolume

framesPerVolume

protected int framesPerVolume

frameView

protected java.nio.IntBuffer frameView

label3

protected java.lang.String label3

label4

protected java.lang.String label4

logicalFrame

protected int logicalFrame

logicalVolume

protected int logicalVolume

maxLogFrm

protected int maxLogFrm

maxLogVol

protected int maxLogVol

minLogFrm

protected int minLogFrm

minLogVol

protected int minLogVol

sio

protected Seisio sio

sort3

protected PropertyDescription sort3

sort4

protected PropertyDescription sort4

sortName

protected java.lang.String sortName

sprops

protected SeisProperties sprops

traceBuffer

protected java.nio.ByteBuffer traceBuffer

traceMap

protected long[] traceMap

traceMapio

protected VirtualIO traceMapio

tracesInFrame

protected int tracesInFrame

tracesInSort

protected long tracesInSort

tracesPerFrame

protected int tracesPerFrame

traceView

protected java.nio.LongBuffer traceView

volumeBuffer

protected java.nio.ByteBuffer volumeBuffer

volumeMap

protected int[] volumeMap

volumeMapio

protected VirtualIO volumeMapio

volumes

protected int volumes

volumeView

protected java.nio.IntBuffer volumeView
Constructor Detail

SortRead

protected SortRead()

SortRead

public SortRead(Seisio sioFile,
                java.lang.String name)
         throws SeisException
Open a sort order for an existing JavaSeis dataset

Parameters:
sioFile - An open JavaSeis dataset
name - sort order to be used in reading this dataset
Throws:
SeisException - on open errors
Method Detail

close

public void close()

delete

public static boolean delete(java.lang.String path)
Delete all sort orders in the directory defined by the input path.

Parameters:
path -
Returns:
true if all were deleted, false if not a directory or no sort orders found.

delete

public static boolean delete(java.lang.String path,
                             java.lang.String name)
Remove an existing sort order

Parameters:
path - full path name to JavaSeis dataset
name - name of sort order to be removed
Returns:
true if SortProperties.name exists and was removed

exists

public static boolean exists(Seisio sio,
                             java.lang.String name)
Determine if a sort order exists in an open JavaSeis dataset

Parameters:
sio - Seisio object for an open JavaSeis dataset
name - sort order name for inquiry
Returns:
true if SortProperties.name file exists

exists

public static boolean exists(java.lang.String path,
                             java.lang.String name)
Determine if a sort order exists

Parameters:
path - full path name for the JavaSeis dataset
name - sort order name for inquiry
Returns:
true if SortProperties.name file exists

getFrameLabel

public java.lang.String getFrameLabel()

getFrameLogicalDelta

public int getFrameLogicalDelta()

getFrameLogicalOrigin

public int getFrameLogicalOrigin()

getNumFramesPerVolume

public int getNumFramesPerVolume()

getNumTracesPerFrame

public int getNumTracesPerFrame()

getNumVolumes

public int getNumVolumes()

getVolumeLabel

public java.lang.String getVolumeLabel()

getVolumeLogicalDelta

public int getVolumeLogicalDelta()

getVolumeLogicalOrigin

public int getVolumeLogicalOrigin()

list

public static java.lang.String[] list(Seisio seisio,
                                      java.lang.String path)
Return a list of sort orders in a JavaSeis dataset

Parameters:
path - full path name to an existing JavaSeis dataset
Returns:
list of sort order names, null if invalid path or none found

list

public static java.lang.String[] list(java.lang.String path)
Return a list of sort orders in a JavaSeis dataset

Parameters:
path - full path name to an existing JavaSeis dataset
Returns:
list of sort order names, null if invalid path or none found

main

public static void main(java.lang.String[] args)
                 throws SeisException
Parameters:
args -
Throws:
SeisException

open

public void open(Seisio sioFile,
                 java.lang.String name)
          throws SeisException
Open a sort order for an existing JavaSeis dataset

Parameters:
sioFile - An open JavaSeis dataset
name - sort order to be used in reading this dataset
Throws:
SeisException

readFrame

public int readFrame()
              throws SeisException
Throws:
SeisException

setFrame

public int setFrame(int ifrm)
             throws SeisException
Set the current frame for subsequent read and write operations

Parameters:
ifrm - the zero-based index of the desired frame location
Returns:
the number of traces in this frame
Throws:
SeisException

setPosition

public void setPosition(int[] position)
                 throws SeisException
Set the current position for a sort "scattered" read. int input position must be 4 elements long, the first two values are ignored. For the current implementation, only 2-level sorts on the 3rd and 4th dimensions are supported.

Parameters:
position - desired position within sort order
Throws:
SeisException - if position is invalid

setVolume

public int setVolume(int ivol)
              throws SeisException
Set the current volume for subsequent read and write operations

Parameters:
ivol - the zero-based index of the desired volume location
Returns:
the number of frames in this volume
Throws:
SeisException