info.aduna.linkmap.transform
Class AbstractWeightFilterTransform

java.lang.Object
  extended by info.aduna.linkmap.transform.AbstractWeightFilterTransform
All Implemented Interfaces:
Transform
Direct Known Subclasses:
EdgeWeightFilterTransform, VertexWeightFilterTransform

public abstract class AbstractWeightFilterTransform
extends Object
implements Transform

AbstractWeightFilterTransform provides a basis for Transforms that filter graph artifacts that have a weight that is above or below its threshold. Since both Vertices and Edges have a weight, it is useful for abstracting some functionality in a base class like this.


Field Summary
static boolean DEFAULT_LOWER_THRESHOLD
          The default value of the lower threshold attribute.
static float DEFAULT_MAX_OBSERVED_WEIGHT
          The default value of the "maximum observed weight" threshold.
static float DEFAULT_MIN_OBSERVED_WEIGHT
          The default value of the "minimum observed weight" threshold.
static float DEFAULT_THRESHOLD
          The default value of the threshold attribute.
 
Constructor Summary
AbstractWeightFilterTransform()
          Creates an AbstractWeightFilterTransform with default threshold and lower threshold properties.
 
Method Summary
 float getMaxObservedWeight()
          Returns the maximum observed weight from the set of objects to filter.
 float getMinObservedWeight()
          Returns the minimum observed weight from the set of objects to filter.
 float getThreshold()
           
 boolean hasLowerThreshold()
           
 boolean inAllowedRange(float weight)
          Utility method that determines whether the specified value passes the threshold.
 void setLowerThreshold(boolean lowerThreshold)
           
 void setMaxObservedWeight(float maxObservedWeight)
           
 void setMinObservedWeight(float minObservedWeight)
           
 void setThreshold(float threshold)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface info.aduna.linkmap.transform.Transform
transform
 

Field Detail

DEFAULT_THRESHOLD

public static final float DEFAULT_THRESHOLD
The default value of the threshold attribute.

See Also:
Constant Field Values

DEFAULT_LOWER_THRESHOLD

public static final boolean DEFAULT_LOWER_THRESHOLD
The default value of the lower threshold attribute.

See Also:
Constant Field Values

DEFAULT_MIN_OBSERVED_WEIGHT

public static final float DEFAULT_MIN_OBSERVED_WEIGHT
The default value of the "minimum observed weight" threshold.

See Also:
Constant Field Values

DEFAULT_MAX_OBSERVED_WEIGHT

public static final float DEFAULT_MAX_OBSERVED_WEIGHT
The default value of the "maximum observed weight" threshold.

See Also:
Constant Field Values
Constructor Detail

AbstractWeightFilterTransform

public AbstractWeightFilterTransform()
Creates an AbstractWeightFilterTransform with default threshold and lower threshold properties.

Method Detail

setThreshold

public void setThreshold(float threshold)

getThreshold

public float getThreshold()

setLowerThreshold

public void setLowerThreshold(boolean lowerThreshold)

hasLowerThreshold

public boolean hasLowerThreshold()

setMinObservedWeight

public void setMinObservedWeight(float minObservedWeight)

getMinObservedWeight

public float getMinObservedWeight()
Returns the minimum observed weight from the set of objects to filter.


setMaxObservedWeight

public void setMaxObservedWeight(float maxObservedWeight)

getMaxObservedWeight

public float getMaxObservedWeight()
Returns the maximum observed weight from the set of objects to filter.


inAllowedRange

public boolean inAllowedRange(float weight)
Utility method that determines whether the specified value passes the threshold. An object with the specified weight would be considered part of the result set.



Copyright © 1997-2008 Aduna. All Rights Reserved.