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

be.ugent.rml.termgenerator.TermGenerator Maven / Gradle / Ivy

Go to download

The RMLMapper executes RML rules to generate high quality Linked Data from multiple originally (semi-)structured data sources.

The newest version!
package be.ugent.rml.termgenerator;

import be.ugent.idlab.knows.dataio.record.Record;
import be.ugent.rml.functions.SingleRecordFunctionExecutor;
import be.ugent.rml.term.Term;

import java.util.List;

public abstract class TermGenerator {

    protected SingleRecordFunctionExecutor functionExecutor;

    /**
     * Indicates whether the functionExecutor needs a special marker in the data to indicate End-of-File (EOF)
     */
    private final boolean needsEOFMarker;

    public TermGenerator(SingleRecordFunctionExecutor functionExecutor) {
        this.functionExecutor = functionExecutor;
        needsEOFMarker = functionExecutor != null && functionExecutor.needsEOFMarker();
    }

    public abstract List generate(Record record) throws Exception;

    /**
     * to string method
     * @return string
     */
    @Override
    public String toString() {
        return "gen(" + functionExecutor +
                ')';
    }

    public boolean needsEOFMarker() {
        return needsEOFMarker;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy