experiment
Class Setup

java.lang.Object
  extended by experiment.Setup

public class Setup
extends java.lang.Object

Created by IntelliJ IDEA. User: andy Date: Mar 9, 2010 Corresponds to the setup tag of a wiseml file which contains the setup information of the experiment.


Nested Class Summary
static class Setup.CoordinateType
          Unit type value of the xyz values for the position of the node.
static class Setup.Datatype
           
static class Setup.Interpolation
          All different interpolation options
static class Setup.Unit
           
 
Field Summary
static java.text.SimpleDateFormat dateFormat
           
 
Constructor Summary
Setup()
           
 
Method Summary
static Setup.CoordinateType getCoordType()
          Returns the unit type value of the xyz values
static java.lang.String getDescription()
          Returns a textual description of the experiment
static long getDuration()
          Returns the experiment's duration
static java.util.Date getEnd()
          Returns the experiment's ending time
static Setup.Interpolation getInterpolation()
          Returns the type of interpolation that is used for the description of mobility
static Position getPosition()
          Returns the center of the relative system of coordinates
static java.util.Date getStart()
          Returns the experiment's starting time
static void setCoordType(Setup.CoordinateType coordinateType)
           
static void setCoordType(java.lang.String s)
          Set the coordType value for this experiment.
static void setDescription(java.lang.String description)
          Set the experiment's description.
static void setInterpolation(Setup.Interpolation interpolation)
          Set the interpolation that is going to be used in this experiment.
static void setOrigin(Position position)
          Set the origin info of the experiment.
static void setTime(java.util.Date start, java.util.Date end, Setup.Unit unit)
          Set the time information of the experiment.
static void setTime(java.util.Date start, long duration, Setup.Unit unit)
          Set the time information of the experiment.
static Setup.Unit toUnit(java.lang.String s)
          Safely returns the Unit type that matches the input.
static double translateTime()
          Adjusts the timestamp values to milliseconds according to the time unit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dateFormat

public static java.text.SimpleDateFormat dateFormat
Constructor Detail

Setup

public Setup()
Method Detail

getCoordType

public static Setup.CoordinateType getCoordType()
Returns the unit type value of the xyz values

Returns:
an CoordinateType enum value

getDescription

public static java.lang.String getDescription()
Returns a textual description of the experiment

Returns:
a String containing a description of the experiment

getDuration

public static long getDuration()
Returns the experiment's duration

Returns:
the experiment's duration in milliseconds

getEnd

public static java.util.Date getEnd()
Returns the experiment's ending time

Returns:
a Date object containing the experiment's ending time

getInterpolation

public static Setup.Interpolation getInterpolation()
Returns the type of interpolation that is used for the description of mobility

Returns:
an Interpolation enum value

getPosition

public static Position getPosition()
Returns the center of the relative system of coordinates

Returns:
a Position object containing the center of the plane

getStart

public static java.util.Date getStart()
Returns the experiment's starting time

Returns:
a Date object containing the experiment's starting time

setCoordType

public static void setCoordType(Setup.CoordinateType coordinateType)

setCoordType

public static void setCoordType(java.lang.String s)
Set the coordType value for this experiment. Only works for xyz coordinates.

Parameters:
s - the String representation of the coordinate type.

setDescription

public static void setDescription(java.lang.String description)
Set the experiment's description.

Parameters:
description - of the experiment (and any other information such as environmental info, etc).

setInterpolation

public static void setInterpolation(Setup.Interpolation interpolation)
Set the interpolation that is going to be used in this experiment.

Parameters:
interpolation - type of interpolation that should be used for the description of mobility.

setOrigin

public static void setOrigin(Position position)
Set the origin info of the experiment.

Parameters:
position - the (0,0,0) point in the local system of coordinates and the angles of rotation.

setTime

public static void setTime(java.util.Date start,
                           java.util.Date end,
                           Setup.Unit unit)
Set the time information of the experiment.

Parameters:
start - the starting time of the experiment in a Date object.
end - the enging time of the experiment in a Date object.
unit - the time unit

setTime

public static void setTime(java.util.Date start,
                           long duration,
                           Setup.Unit unit)
Set the time information of the experiment.

Parameters:
start - the starting time of the experiment in a Date object.
duration - a long containing the duration of the experiment in milliseconds.
unit - the time unit

toUnit

public static Setup.Unit toUnit(java.lang.String s)
Safely returns the Unit type that matches the input. In case that there is no match returns Unit.other

Parameters:
s - String input
Returns:
the Unit type

translateTime

public static double translateTime()
Adjusts the timestamp values to milliseconds according to the time unit. Helps the tranlation of wiseml timestamps to the application's time unit and vise versa. To translate from experiment to application unit, multiply with the method's result, else divide.

Returns:
the time unit translation factor.