edu.umd.cloud9.collection.aquaint2
Class Aquaint2DocnoMapping
java.lang.Object
edu.umd.cloud9.collection.aquaint2.Aquaint2DocnoMapping
- All Implemented Interfaces:
- DocnoMapping
public class Aquaint2DocnoMapping
- extends Object
- implements DocnoMapping
Aquaint2DocnoMapping
public Aquaint2DocnoMapping()
getDocno
public int getDocno(String docid)
- Description copied from interface:
DocnoMapping
- Returns the docno for a particular docid.
- Specified by:
getDocno in interface DocnoMapping
- Parameters:
docid - the docid
- Returns:
- the docno for the docid
getDocid
public String getDocid(int docno)
- Description copied from interface:
DocnoMapping
- Returns the docid for a particular docno.
- Specified by:
getDocid in interface DocnoMapping
- Parameters:
docno - the docno
- Returns:
- the docid for the docno
loadMapping
public void loadMapping(Path p,
FileSystem fs)
throws IOException
- Description copied from interface:
DocnoMapping
- Loads a mapping file containing the docid to docno mappings.
- Specified by:
loadMapping in interface DocnoMapping
- Parameters:
p - path to the mappings filefs - appropriate FileSystem
- Throws:
IOException
writeDocnoData
public static void writeDocnoData(String input,
String output)
throws IOException
- Throws:
IOException
readDocnoData
public static String[] readDocnoData(Path p,
FileSystem fs)
throws IOException
- Throws:
IOException
main
public static void main(String[] args)
throws IOException
- Throws:
IOException