dk.vajhoej.model.core
Class ModelFilter

java.lang.Object
  extended by dk.vajhoej.model.core.ModelFilter

public class ModelFilter
extends java.lang.Object

Class ModelFilter translates a model to certain readonly models.


Constructor Summary
ModelFilter()
           
 
Method Summary
static java.util.List<Location> addLocations(java.util.List<Location> allloc, Model m, int w, int y0)
          Add locations for VM's.
static java.util.List<Location> filterLocations(java.util.List<Location> allloc, Model m)
          Filter non existing locations.
static Model flattenComponents(Model arg)
          Flatten component model so all components are at the outer/box level.
static Model hideConnections(Model arg)
          Hide connections.
static Model hideHardware(Model arg)
          Hide hardware (CPU, memory and disk) information.
static Model ignoreVMs(Model arg)
          Ignore VM's and treat VM's like physical boxes.
static Model removeDuplicates(Model arg)
          Remove duplicates.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ModelFilter

public ModelFilter()
Method Detail

hideHardware

public static Model hideHardware(Model arg)
Hide hardware (CPU, memory and disk) information.

Parameters:
arg - old model
Returns:
new model

flattenComponents

public static Model flattenComponents(Model arg)
Flatten component model so all components are at the outer/box level.

Parameters:
arg - old model
Returns:
new model

hideConnections

public static Model hideConnections(Model arg)
Hide connections.

Parameters:
arg - old model
Returns:
new model

removeDuplicates

public static Model removeDuplicates(Model arg)
Remove duplicates.

Parameters:
arg - old model
Returns:
new model

ignoreVMs

public static Model ignoreVMs(Model arg)
Ignore VM's and treat VM's like physical boxes.

Parameters:
arg - old model
Returns:
new model

filterLocations

public static java.util.List<Location> filterLocations(java.util.List<Location> allloc,
                                                       Model m)
Filter non existing locations.

Parameters:
allloc - all locations
m - model
Returns:
filtered locations

addLocations

public static java.util.List<Location> addLocations(java.util.List<Location> allloc,
                                                    Model m,
                                                    int w,
                                                    int y0)
Add locations for VM's.

Parameters:
allloc - all locations
m - model
w - width
y0 - start y
Returns:
added locations