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

be.ugent.rml.MappingInfo Maven / Gradle / Ivy

package be.ugent.rml;

import be.ugent.rml.term.Term;
import be.ugent.rml.termgenerator.TermGenerator;

import javax.annotation.Nonnull;
import java.util.Collections;
import java.util.List;

public class MappingInfo {
    private final Term term;
    private final TermGenerator termGenerator;
    private final List targets;

    public MappingInfo(@Nonnull Term term, @Nonnull TermGenerator termGenerator, @Nonnull List targets) {
        this.term = term;
        this.termGenerator = termGenerator;
        this.targets = targets;
    }

    public MappingInfo(@Nonnull Term term, @Nonnull TermGenerator termGenerator) {
        this.term = term;
        this.termGenerator = termGenerator;
        this.targets = Collections.emptyList();
    }

    public MappingInfo(@Nonnull Term term, @Nonnull List targets) {
        this.term = term;
        this.termGenerator = null;
        this.targets = targets;
    }

    public Term getTerm() {
        return term;
    }

    public TermGenerator getTermGenerator() {
        return termGenerator;
    }

    public List getTargets() {
        return targets;
    }

    public void addTargets(List targets) {
        this.targets.addAll(targets);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy