|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object mavis.Session
public class Session
This class functions as a common interface to all magnetic component related calculations and manipulations, and additionally allows to export all the components into a CSV file. Note: the component index starts at 0, and nearly all methods return null or 0 on errors.
Field Summary | |
---|---|
(package private) MagneticComponents |
components
|
private javax.swing.event.EventListenerList |
listenerList
Listeners for this project. |
private Project |
project
|
(package private) boolean |
saved
|
Constructor Summary | |
---|---|
Session(Project proj)
Initialize a new Session instance. |
Method Summary | |
---|---|
void |
addComponent(java.util.Vector<MeasurementStep> associatedSteps,
int[] stepIndices)
Adds a new component that consists of associates measurement steps and their indices in the measurement sequence (these are just for information). |
void |
addSessionListener(SessionListener listener)
Adds a SessionListener to the session. |
boolean |
deleteComponent(int toBeDeleted)
Deletes component and fires event to notify registered listeners. |
protected void |
fireSessionEvent(SessionEvent.Type type)
Notifies all listeners that have registered for SessionEvents. |
boolean |
getAntipole(int component)
Checks if the component is an antipole. |
double |
getAoE(int component)
Returns angle of error (maximum angular deviation) of component. |
double |
getAvgIntensity(int component)
Returns the average intensity of component. |
double |
getDeclination(int component)
Returns the declination of component. |
javax.vecmath.Vector3d |
getEnd(int component)
Returns the coordinate of the end point, in the normalized coordinate system. |
javax.vecmath.Vector2d |
getEnd2D(int component,
ComponentCalculation.Axis axis)
Returns the coords of the end point (2d), for component line fitting done in 2D i.e. as seen from specified axis. |
int[] |
getExcluded(int component)
Returns the indices of the excluded steps in the component's step range. |
java.lang.String |
getExcludedString(int component)
Returns the indexes of steps that are in the step range, but not included in the component, format is like "2-8,10,15,18-20" |
double |
getInclination(int component)
Returns the inclination of component. |
double |
getLength(int component)
Returns the length of the 3D component vector. |
double |
getMaxIntensity(int component)
Returns maximum intensity of component. |
double |
getMinIntensity(int component)
Returns the minimum intensity of component. |
int |
getNumOfComponents()
Returns the number of magnetic components that the user has added. |
double |
getPoleLat(int component)
Returns the ancient pole position (Latitude). |
double |
getPoleLong(int component)
Returns ancient pole position (Longitude). |
Project |
getProject()
Returns the Project associated with this Session. |
javax.vecmath.Vector3d |
getStart(int component)
Returns the coordinate of the starting point, in the normalized coordinate system. |
javax.vecmath.Vector2d |
getStart2D(int component,
ComponentCalculation.Axis axis)
Returns the coords of the starting point (2d), for component line fitting done in 2D i.e. as seen from specified axis. |
javax.vecmath.Vector3d[] |
getStartAndEndpoints(int component)
Returns the coords of the starting and ending points, corrected for the case of the origo being artificially forced to be one of the end points of the magnetic vector component. |
int[] |
getStepNumbers(int component)
Returns the indexes of steps that component includes. |
java.lang.String |
getStepNumbersString(int component)
Returns the indexes of steps that component includes, format is like "1-8,10,15,18-20" |
boolean |
isSaved()
Tells whether the components in the session have been saved. |
void |
removeSessionListener(SessionListener listener)
Removes a SessionListener from the session. |
boolean |
saveToTable(java.io.File file)
Writes the magnetic components list to a file in CSV format. |
void |
setAntipole(boolean isAntipole,
int component)
Specifies if the component should be treated as an antipole. |
void |
setSaved(boolean saved)
Sets the save status. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private Project project
MagneticComponents components
boolean saved
private final javax.swing.event.EventListenerList listenerList
Constructor Detail |
---|
public Session(Project proj)
Method Detail |
---|
public void addSessionListener(SessionListener listener)
listener
- the listener to be added.public void removeSessionListener(SessionListener listener)
listener
- the listener to be removedprotected void fireSessionEvent(SessionEvent.Type type)
type
- type of the event.public boolean deleteComponent(int toBeDeleted)
public void addComponent(java.util.Vector<MeasurementStep> associatedSteps, int[] stepIndices)
public int getNumOfComponents()
public double getMaxIntensity(int component)
public double getMinIntensity(int component)
public double getAvgIntensity(int component)
public double getInclination(int component)
public double getDeclination(int component)
public double getAoE(int component)
public double getPoleLat(int component)
public double getPoleLong(int component)
public javax.vecmath.Vector3d getStart(int component)
public void setAntipole(boolean isAntipole, int component)
public boolean getAntipole(int component)
public javax.vecmath.Vector3d getEnd(int component)
public javax.vecmath.Vector3d[] getStartAndEndpoints(int component)
public javax.vecmath.Vector2d getStart2D(int component, ComponentCalculation.Axis axis)
public javax.vecmath.Vector2d getEnd2D(int component, ComponentCalculation.Axis axis)
public double getLength(int component)
public int[] getStepNumbers(int component)
public java.lang.String getStepNumbersString(int component)
public int[] getExcluded(int component)
component
- The magnetic component's index in the array.
public java.lang.String getExcludedString(int component)
component
- The magnetic component's index in the array.
public Project getProject()
public boolean isSaved()
public void setSaved(boolean saved)
saved
- true or false.public boolean saveToTable(java.io.File file)
file
- the file to write/append to.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |