de.julielab.medline.IDocumentDeleter Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of costosys Show documentation
Show all versions of costosys Show documentation
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.
package de.julielab.medline;
import org.apache.commons.configuration2.HierarchicalConfiguration;
import org.apache.commons.configuration2.tree.ImmutableNode;
import java.util.List;
import java.util.Set;
public interface IDocumentDeleter {
void deleteDocuments(List docIds);
void configure(HierarchicalConfiguration deletionConfiguration) throws MedlineDocumentDeletionException;
default boolean hasName(String... names) {
Set givenNames = getNames();
for (int i = 0; i < names.length; i++) {
String name = names[i];
if (givenNames.contains(name))
return true;
}
return false;
}
Set getNames();
}