|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gov.nist.nlpir.irf.conversion.IrfConverter | +--gov.nist.nlpir.irf.conversion.Sgml2AppDocConverter
Models generic conversion of SGML-tagged documents (as formatted by the SGML parser/checker nsgmls) in a file of proxy Documents as dictated by conversion rules.
Inner Class Summary | |
(package private) class |
Sgml2AppDocConverter.InField
Local class for objects on inFieldStack. |
Field Summary | |
(package private) Sgml2AppDocConverter.InField |
defaultInField
Working Infield for start state |
(package private) ConversionRule |
defaultRule
Working rule used in start state and when no rule is found for a tag. |
private static int |
EOF
Working constant |
private java.io.BufferedReader |
file
The reader to be used to read the raw data |
private ConversionRules |
rules
The rules to be used in conversion |
Fields inherited from class gov.nist.nlpir.irf.conversion.IrfConverter |
proxyDocClass,
realDocClass |
Constructor Summary | |
Sgml2AppDocConverter()
Makes a new converter with no rules |
|
Sgml2AppDocConverter(ConversionRules rules)
Makes a new converter given a set of conversion rules |
Method Summary | |
ProxyDocument |
buildDoc(java.lang.Class proxyDocClass,
java.lang.Class realDocClass,
java.util.Vector outFields)
Builds a ProxyDocument using the data on each field in the outFields vector. |
ProxyDocument |
convert1()
Converts one document from a file opened using a BufferedReader. |
ConversionRules |
getConversionRules()
Returns the conversion rules |
int |
ignoreN(int numToIgnore)
Advances the reader to just beyond the end of the Nth (numToIgnore-th) document, if possible. |
void |
setConversionRules(ConversionRules rules)
Sets the conversion rules |
void |
setRawDocLocation(java.lang.String loc)
Gives the converter the information it needs to access the raw data for the documents to be converted. |
Methods inherited from class gov.nist.nlpir.irf.conversion.IrfConverter |
getProxyDocClass,
getRealDocClass,
setProxyDocClass,
setRealDocClass |
Methods inherited from class java.lang.Object |
|
Field Detail |
private ConversionRules rules
private java.io.BufferedReader file
private static final int EOF
ConversionRule defaultRule
Sgml2AppDocConverter.InField defaultInField
Constructor Detail |
public Sgml2AppDocConverter()
public Sgml2AppDocConverter(ConversionRules rules)
conversionRules
- collection-specific rules to guide conversionMethod Detail |
public void setConversionRules(ConversionRules rules)
conversionRules
- collection-specific rules to guide conversionpublic ConversionRules getConversionRules()
public void setRawDocLocation(java.lang.String loc) throws java.io.FileNotFoundException
loc
- fully qualified name of the file with the raw doc datapublic int ignoreN(int numToIgnore) throws java.io.IOException
file
- a file opened using a BufferedReadernumToIgnore
- number of documents to skippublic ProxyDocument convert1() throws java.io.IOException
file
- a file opened using a BufferedReaderpublic ProxyDocument buildDoc(java.lang.Class proxyDocClass, java.lang.Class realDocClass, java.util.Vector outFields)
InField
- data for Start Document tagvector
- of data on fields to be constructed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |