
it.unitn.disi.smatch.loaders.context.FileFunctionLoader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of s-match Show documentation
Show all versions of s-match Show documentation
A version of S-Match semantic matching framework for Open Data
The newest version!
package it.unitn.disi.smatch.loaders.context;
import it.unitn.disi.smatch.data.trees.Context;
import it.unitn.disi.smatch.data.trees.IContext;
import it.unitn.disi.smatch.loaders.ILoader;
import java.io.BufferedReader;
import java.io.IOException;
/**
* Loads a function from a file into a tree structure.
* The file should contain one string to be converted in the form: fn(arg,arg,..), where arg can be fn(arg,..)
*
* @author Aliaksandr Autayeu
*/
public class FileFunctionLoader extends BaseFileContextLoader implements IContextLoader {
protected IContext process(BufferedReader input) throws IOException {
final String function = input.readLine();
IContext result = new Context();
if (null != function) {
StringFunctionLoader.parse(function, result, null);
}
return result;
}
public String getDescription() {
return ILoader.TXT_FILES;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy