viper.filters
Class RuleHolder

java.lang.Object
  extended byviper.filters.RuleHolder

public class RuleHolder
extends java.lang.Object

Holds the rules for the specific descriptors and their attributes. The rules define what sort of descriptor data to ignore, thus allowing the comparison program to focus on a subset of data from a video clip, for example, only data containing a certain word or a certain set of frames.

Since:
12 1998
Author:
Felix Sukhenko, David Mihalcik

Constructor Summary
RuleHolder()
          CONSTRUCTOR(S) *
 
Method Summary
 void addDescriptor(java.lang.String descriptor)
          Adds a place for this descriptor
 void addRule(java.lang.String descriptor, java.lang.String attribute_name, Filterable.Rule rule)
          Adds the attribute and the rule for that attribute to the descriptors list of attributes/rules.
 boolean meetsCriteria(Descriptor to_be_tested)
          Checks if the descriptor meets the criteria set by the limitation rules
 java.lang.String toRawFormat()
          Function used to print this object in RAW format.
 java.lang.String toString()
          Function used to print this object in a string format.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RuleHolder

public RuleHolder()
CONSTRUCTOR(S) *

Method Detail

addDescriptor

public void addDescriptor(java.lang.String descriptor)
Adds a place for this descriptor

Parameters:
descriptor - a unique string representation of the descriptor and its category , for example: OBJECTFace

addRule

public void addRule(java.lang.String descriptor,
                    java.lang.String attribute_name,
                    Filterable.Rule rule)
             throws BadDataException
Adds the attribute and the rule for that attribute to the descriptors list of attributes/rules.

Parameters:
descriptor - the descriptor to which the attribute/rule will be added
attribute_name - the name of the attribute to which the rule belongs
rule - the limitations rule that describes the limitations criteria
Throws:
BadDataException

meetsCriteria

public boolean meetsCriteria(Descriptor to_be_tested)
Checks if the descriptor meets the criteria set by the limitation rules

Parameters:
to_be_tested - the descriptor that has to be tested
Returns:
true if the parameter passes the criteria defined by the rule

toRawFormat

public java.lang.String toRawFormat()
Function used to print this object in RAW format. return the string raw representation of this object

Returns:
the rule holder, as should be printed into the raw output file

toString

public java.lang.String toString()
Function used to print this object in a string format. Invoked whenever you do ""+this_object

Returns:
the filter, as can be read in