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

eu.project.ttc.models.OccurrenceStore Maven / Gradle / Ivy

Go to download

A Java UIMA-based toolbox for multilingual and efficient terminology extraction an multilingual term alignment

There is a newer version: 3.0.10
Show newest version
package eu.project.ttc.models;

import java.util.Collection;
import java.util.Iterator;

public interface OccurrenceStore {
	public static enum Type {MEMORY, MONGODB}
	public static enum State{COLLECTING,INDEXING,INDEXED}

	public Iterator occurrenceIterator(Term term);
	public Collection getOccurrences(Term term);
	public void addOccurrence(Term term, TermOccurrence e);
	public void addAllOccurrences(Term term, Collection c);
	public Type getStoreType();
	public void flush();
	public State getCurrentState();
	public void makeIndex();


	
	/**
	 * Returns the path to access the occurrence store if
	 * this occurrence store is of type {@link Type#FILE}, 
	 * null otherwise.
	 * 
	 * @return
	 * 		the URL, null if this store is of type {@link Type#MEMORY}
	 */
	public String getUrl();
	
	/**
	 * Removes all occurrences of the term
	 * @param t
	 */
	public void removeTerm(Term t);
	
	public void deleteMany(TermSelector selector);
	void close();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy