model
Class OrientationSystem

java.lang.Object
  extended by model.OrientationSystem

public class OrientationSystem
extends java.lang.Object

Class for storing static data about qualitive orientations.


Nested Class Summary
static class OrientationSystem.Card4
           
static class OrientationSystem.Card8
           
static class OrientationSystem.CardEW
           
static class OrientationSystem.CardNS
           
static class OrientationSystem.OrienSystem
          a list of orientation systems
 
Field Summary
private static java.util.HashMap<java.lang.String,java.lang.String> orientationHierarchy
          a mapping of orientations to the next higher granularity
private static java.util.HashMap<java.lang.String,OrientationSystem.OrienSystem> systemMap
          a mapping of orientation names to their orientation system
private static java.util.HashMap<OrientationSystem.OrienSystem,java.util.ArrayList<java.lang.String>> valuesMap
          a mapping of systems to the orientation names
 
Constructor Summary
OrientationSystem()
           
 
Method Summary
static java.lang.String getOrientationName(java.lang.String orientationName, OrientationSystem.OrienSystem system)
          Gets the orientation name of the specified orientation in the new orientation system.
static java.util.ArrayList<java.lang.String> getOrientationNames(OrientationSystem.OrienSystem system)
          Gets the orientation names for the specified system.
static OrientationSystem.OrienSystem getSystem(java.lang.String orientationName)
          Gets the orientation system for the specified orientation name.
static boolean higherGranularity(OrientationSystem.OrienSystem system1, OrientationSystem.OrienSystem system2)
          Returns true if the first system has a higher granularity than the second system.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

systemMap

private static java.util.HashMap<java.lang.String,OrientationSystem.OrienSystem> systemMap
a mapping of orientation names to their orientation system


valuesMap

private static java.util.HashMap<OrientationSystem.OrienSystem,java.util.ArrayList<java.lang.String>> valuesMap
a mapping of systems to the orientation names


orientationHierarchy

private static java.util.HashMap<java.lang.String,java.lang.String> orientationHierarchy
a mapping of orientations to the next higher granularity

Constructor Detail

OrientationSystem

public OrientationSystem()
Method Detail

getOrientationNames

public static java.util.ArrayList<java.lang.String> getOrientationNames(OrientationSystem.OrienSystem system)
Gets the orientation names for the specified system.

Parameters:
system - - the orientation system
Returns:
- the orientation values in the system

getSystem

public static OrientationSystem.OrienSystem getSystem(java.lang.String orientationName)
Gets the orientation system for the specified orientation name.

Parameters:
orientationName - - the orientation name
Returns:
- the orientation system

getOrientationName

public static java.lang.String getOrientationName(java.lang.String orientationName,
                                                  OrientationSystem.OrienSystem system)
Gets the orientation name of the specified orientation in the new orientation system. The new orientation system must have a higher granularity than the current system of the oreintation name.

Parameters:
orientationName - - the orientation name
system - - the new orientation system
Returns:
- the orientation name in the new orientation system

higherGranularity

public static boolean higherGranularity(OrientationSystem.OrienSystem system1,
                                        OrientationSystem.OrienSystem system2)
Returns true if the first system has a higher granularity than the second system. Returns false if the first system is an equal of coarser granularity than the second system.

Parameters:
system1 - - the first system
system2 - - the second system
Returns:
- true if the first system has a higher granularity