com.rapidminer.operator.ports.metadata
Interface Precondition

All Known Implementing Classes:
AbstractPrecondition, AttributeParameterPrecondition, AttributeSetPrecondition, CapabilityPrecondition, CollectionPrecondition, DistanceMeasurePrecondition, ExampleSetContainsSeriesPrecondition, ExampleSetPrecondition, ExampleSetSizePrecondition, LearnerPrecondition, ParameterConditionedPrecondition, SimplePrecondition

public interface Precondition

A simple precondition of an InputPort. In an early design phase, preconditions used to be special MDTransformationRules rules, but having them separately attached to the input ports has advantages for GUI design and auto-wiring processes.

Author:
Simon Fischer

Method Summary
 void assumeSatisfied()
          Assume that the precondition is satisfied, i.e., artificially generate compatible meta data at the input port.
 void check(MetaData metaData)
          Checks whether the precondition is satisfied, registering a MetaDataError with the input port if not.
 java.lang.String getDescription()
          Returns a human readable description.
 MetaData getExpectedMetaData()
          Returns the meta data required by this precondition.
 boolean isCompatible(MetaData input, CompatibilityLevel level)
          Returns true if the given object is compatible with this precondition.
 

Method Detail

check

void check(MetaData metaData)
Checks whether the precondition is satisfied, registering a MetaDataError with the input port if not.

Parameters:
metaData - the delivered meta data. Note that this may differ from the meta data currently assigned to the input port for which this Precondition was created, e.g. for a ClooectionPrecondition.

getDescription

java.lang.String getDescription()
Returns a human readable description.


isCompatible

boolean isCompatible(MetaData input,
                     CompatibilityLevel level)
Returns true if the given object is compatible with this precondition.


assumeSatisfied

void assumeSatisfied()
Assume that the precondition is satisfied, i.e., artificially generate compatible meta data at the input port. This method is used to check what output would be generated if the input was correctly delivered.


getExpectedMetaData

MetaData getExpectedMetaData()
Returns the meta data required by this precondition.



Copyright © 2001-2009 by Rapid-I