gov.nist.nlpir.irf.conversion
Class IrfConverter

java.lang.Object
  |
  +--gov.nist.nlpir.irf.conversion.IrfConverter
Direct Known Subclasses:
Bib2AppDocConv, Sgml2AppDocConverter

public abstract class IrfConverter
extends java.lang.Object

This abstract class models generic features of converters, which take "raw" data and turn it into Document objects.

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.lang.Class proxyDocClass
          An example of the class of proxy IR documents to be created
private  java.lang.Class realDocClass
          An example of the class of real IR documents to be created
 
Constructor Summary
IrfConverter()
           
 
Method Summary
abstract  ProxyDocument convert1()
          Converts one raw document's worth of data into its object counterpart
 java.lang.Class getProxyDocClass()
          Returns the value of the proxy document class
 java.lang.Class getRealDocClass()
          Returns the value of the real document class
abstract  int ignoreN(int numToSkip)
          Starting from the current location in the input stream, skips the specified number of documents
 void setProxyDocClass(java.lang.String proxyDocClassName)
          Sets the value of the proxy document class given a class name
abstract  void setRawDocLocation(java.lang.String loc)
          Gives the converter the information it needs to access the raw data for the documents to be converted.
 void setRealDocClass(java.lang.String realDocClassName)
          Sets the value of the real document class given a class name
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

proxyDocClass

private java.lang.Class proxyDocClass
An example of the class of proxy IR documents to be created

realDocClass

private java.lang.Class realDocClass
An example of the class of real IR documents to be created
Constructor Detail

IrfConverter

public IrfConverter()
Method Detail

setRealDocClass

public void setRealDocClass(java.lang.String realDocClassName)
Sets the value of the real document class given a class name

getRealDocClass

public java.lang.Class getRealDocClass()
Returns the value of the real document class
Returns:
the value of the real document class

setProxyDocClass

public void setProxyDocClass(java.lang.String proxyDocClassName)
Sets the value of the proxy document class given a class name

getProxyDocClass

public java.lang.Class getProxyDocClass()
Returns the value of the proxy document class
Returns:
the value of the proxy document class

setRawDocLocation

public abstract void setRawDocLocation(java.lang.String loc)
                                throws java.io.FileNotFoundException
Gives the converter the information it needs to access the raw data for the documents to be converted.
Parameters:
loc - string with info on where raw documents can be found

convert1

public abstract ProxyDocument convert1()
                                throws java.io.IOException
Converts one raw document's worth of data into its object counterpart
Returns:
a proxy ir document with its associated real ir document

ignoreN

public abstract int ignoreN(int numToSkip)
                     throws java.io.IOException
Starting from the current location in the input stream, skips the specified number of documents
Parameters:
numToSkip - number of documents to skip
Returns:
the number of documents actually skipped