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

it.unitn.disi.smatch.IMatchManager Maven / Gradle / Ivy

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

import it.unitn.disi.common.components.IConfigurable;
import it.unitn.disi.smatch.data.ling.IAtomicConceptOfLabel;
import it.unitn.disi.smatch.data.mappings.IContextMapping;
import it.unitn.disi.smatch.data.mappings.IMappingFactory;
import it.unitn.disi.smatch.data.trees.IBaseContext;
import it.unitn.disi.smatch.data.trees.IContext;
import it.unitn.disi.smatch.data.trees.INode;
import it.unitn.disi.smatch.loaders.context.IBaseContextLoader;
import it.unitn.disi.smatch.loaders.mapping.IMappingLoader;
import it.unitn.disi.smatch.preprocessors.IContextPreprocessor;
import it.unitn.disi.smatch.renderers.context.IBaseContextRenderer;
import it.unitn.disi.smatch.renderers.mapping.IMappingRenderer;

/**
 * Interface for matching related functionalities.
* The following code can be used in order to obtain an instance of IMatchManager interface.
* IMatchManager mm=it.unitn.disi.smatch.MatchManager.getInstance(); *

* An S-Match.properties file contain an example configuration with documented properties names and values. * * @author Mikalai Yatskevich [email protected] * @author */ public interface IMatchManager extends IConfigurable { /** * Creates a context instance. * * @return a context instance */ public IContext createContext(); /** * Returns mapping factory. * * @return mapping factory */ public IMappingFactory getMappingFactory(); /** * Uses current loader to load the context from external source into internal data structure. * * @param fileName a string passed to the current loader * @return interface to internal context representation * @throws SMatchException SMatchException */ IBaseContext loadContext(String fileName) throws SMatchException; /** * Returns currently configured context loader. * * @return currently configured context loader */ IBaseContextLoader getContextLoader(); /** * Renders the context using a current renderer. * * @param ctxSource context to be rendered * @param fileName a render destination passed to the context renderer * @throws SMatchException SMatchException */ void renderContext(IBaseContext ctxSource, String fileName) throws SMatchException; /** * Returns currently configured context renderer. * * @return currently configured context renderer */ IBaseContextRenderer getContextRenderer(); /** * Loads the mapping between source and target contexts using the current mapping loader. * * @param ctxSource source context * @param ctxTarget target context * @param inputFile a mapping location passed to the mapping loader * @return a mapping * @throws SMatchException SMatchException */ IContextMapping loadMapping(IContext ctxSource, IContext ctxTarget, String inputFile) throws SMatchException; /** * Returns currently configured mapping loader. * * @return currently configured mapping loader */ IMappingLoader getMappingLoader(); /** * Renders the mapping using a current mapping renderer. * * @param mapping a mapping * @param outputFile a render destination passed to the mapping renderer * @throws SMatchException SMatchException */ void renderMapping(IContextMapping mapping, String outputFile) throws SMatchException; /** * Returns currently configured mapping renderer. * * @return currently configured mapping renderer */ IMappingRenderer getMappingRenderer(); /** * Filters a mapping. For example, filtering could be a minimization. * * @param mapping a mapping to filter * @return a filtered mapping * @throws SMatchException SMatchException */ IContextMapping filterMapping(IContextMapping mapping) throws SMatchException; /** * Performs the first step of the semantic matching algorithm. * * @param context interface to a context to be preprocessed * @throws SMatchException SMatchException */ void preprocess(IContext context) throws SMatchException; /** * Returns currently configured context preprocessor. * * @return currently configured context preprocessor */ IContextPreprocessor getContextPreprocessor(); /** * Performs the second step of the semantic matching algorithm. * * @param context interface to the preprocessed context * @throws SMatchException SMatchException */ void classify(IContext context) throws SMatchException; /** * Performs the third step of semantic matching algorithm. * * @param sourceContext interface of source context with concept at node formula * @param targetContext interface of target context with concept at node formula * @return interface to a matrix of semantic relations between atomic concepts of labels in the contexts * @throws SMatchException SMatchException */ IContextMapping elementLevelMatching(IContext sourceContext, IContext targetContext) throws SMatchException; /** * Performs the fourth step of semantic matching algorithm. * * @param sourceContext interface of source context with concept at node formula * @param targetContext interface of target context with concept at node formula * @param acolMapping mapping between atomic concepts of labels in the contexts * @return mapping between the concepts at nodes in the contexts * @throws SMatchException SMatchException */ IContextMapping structureLevelMatching(IContext sourceContext, IContext targetContext, IContextMapping acolMapping) throws SMatchException; /** * Performs the first two steps of the semantic matching algorithm. * * @param context interface to context to be preprocessed * @throws SMatchException SMatchException */ void offline(IContext context) throws SMatchException; /** * Performs the last two steps of the semantic matching algorithm. * * @param sourceContext interface to preprocessed source context to be matched * @param targetContext interface to preprocessed target context to be matched * @return interface to resulting mapping * @throws SMatchException SMatchException */ IContextMapping online(IContext sourceContext, IContext targetContext) throws SMatchException; /** * Performs the whole matching process. * * @param sourceContext interface to source context to be matched * @param targetContext interface to target context to be matched * @return interface to resulting mapping * @throws SMatchException SMatchException */ IContextMapping match(IContext sourceContext, IContext targetContext) throws SMatchException; }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy