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

it.unitn.disi.smatch.data.mappings.IMapping Maven / Gradle / Ivy

The newest version!
package it.unitn.disi.smatch.data.mappings;

import java.util.List;
import java.util.Set;

/**
 * Interface for mappings.
 *
 * @author 
 */
public interface IMapping extends Set> {

    /**
     * Returns the relation between the source and the target.
     *
     * @param source source
     * @param target target
     * @return relation between source and target
     */
    char getRelation(T source, T target);

    /**
     * Sets the relation between the source and the target.
     *
     * @param source   source
     * @param target   target
     * @param relation relation
     * @return true if the mapping was modified
     */
    boolean setRelation(T source, T target, char relation);

    /**
     * Sets the similarity between two trees.
     *
     * @param similarity the similarity between two trees
     */
    void setSimilarity(double similarity);

    /**
     * Returns the similarity between two trees.
     *
     * @return the similarity between two trees
     */
    double getSimilarity();

    /**
     * Returns mapping elements with source element equal to source.
     *
     * @param source source element
     * @return mapping elements with source element equal to source
     */
    List> getSources(T source);

    /**
     * Returns mapping elements with target element equal to target.
     *
     * @param target target element
     * @return mapping elements with target element equal to target
     */
    List> getTargets(T target);
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy