package org.wikibrain.mapper; import org.wikibrain.conf.ConfigurationException; import org.wikibrain.core.WikiBrainException; import org.wikibrain.core.dao.DaoException; import org.wikibrain.core.dao.LocalLinkDao; import org.wikibrain.core.dao.LocalPageDao; import org.wikibrain.core.lang.LanguageSet; import org.wikibrain.core.model.LocalPage; import org.wikibrain.core.model.UniversalLink; import org.wikibrain.core.model.UniversalPage; import java.util.Iterator; /** * * An abstract superclass that lays the framework for a concept mapping algorithm. * * @author Ari Weiland * */ public abstract class ConceptMapper { private final int id; protected final LocalPageDao localPageDao; /** * All purpose constructor * @param id * @param localPageDao */ public ConceptMapper(int id, LocalPageDao localPageDao) { this.localPageDao = localPageDao; this.id = id; } public int getId() { return id; } /** * Returns an Iterator of UniversalPages generated by the concept mapping algorithm. * Requires a database of LocalPages. * @param ls the language set to map * @return an Iterator of universal pages * @throws DaoException */ public abstract Iterator<UniversalPage> getConceptMap(LanguageSet ls) throws WikiBrainException, DaoException; }