gov.nist.nlpir.irf.conversion
Class ConversionRules

java.lang.Object
  |
  +--gov.nist.nlpir.irf.conversion.ConversionRules
Direct Known Subclasses:
TrecConversionRules

public class ConversionRules
extends java.lang.Object

This class models a collection of rules which specify mappings between SGML-tagged data and fields within a document object

Version:
$Revision: 1.1 $
Author:
This software was produced by NIST, an agency of the U.S. government, and by statute is not subject to copyright in the United States. Recipients of this software assume all responsibilities associated with its operation, modification and maintenance.

Field Summary
private  java.util.Hashtable rules
          A dictionary of rules for use during conversion
 
Constructor Summary
ConversionRules()
          Creates a new instance with no rules
 
Method Summary
 void addRule(ConversionRule cr)
          Adds a conversion rule to the dictionary
 ConversionRule findRuleForTag(java.lang.String tag)
          Takes a tag string and looks through ConversionRules until it finds a rule with the same tag and returns the rule or finds no rule with the same tag and so returns null.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

rules

private java.util.Hashtable rules
A dictionary of rules for use during conversion
Constructor Detail

ConversionRules

public ConversionRules()
Creates a new instance with no rules
Method Detail

addRule

public void addRule(ConversionRule cr)
Adds a conversion rule to the dictionary

findRuleForTag

public ConversionRule findRuleForTag(java.lang.String tag)
Takes a tag string and looks through ConversionRules until it finds a rule with the same tag and returns the rule or finds no rule with the same tag and so returns null. We will assume it stops with the first match if any.