All Downloads are FREE. Search and download functionalities are using the official Maven repository.

de.julielab.medline.DBCMedlineUtilities Maven / Gradle / Ivy

Go to download

A utility for managing documents stored in a PostgreSQL database. The documents are imported into a PostgreSQL DB as full texts with the goal to be able to retrieve the documents by their PubMedID efficiently. For more sophisticated tasks, a user configuration file can be delivered which can take control of the table schema to use, the PostgreSQL schema to use and the actual database server to connect to as well as the concrete database.

There is a newer version: 1.6.2
Show newest version
package de.julielab.medline;

import java.io.ByteArrayOutputStream;
import java.io.IOException;
import java.util.Iterator;

public class DBCMedlineUtilities {
	public void writeDocumentsIntoMedlineCitationSet(Iterator it,
			int indexOfDocumentData) {
		try {
			ByteArrayOutputStream baos = new ByteArrayOutputStream();
			baos.write("".getBytes());
			while (it.hasNext()) {
				byte[][] next = it.next();
				baos.write(next[indexOfDocumentData]);
				baos.write("\n".getBytes());
			}
			baos.write("".getBytes());
		} catch (IOException e) {
			e.printStackTrace();
		}
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy