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

org.ggp.base.util.gdl.model.AbstractSentenceDomainModel Maven / Gradle / Ivy

The newest version!
package org.ggp.base.util.gdl.model;

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

import org.ggp.base.util.gdl.grammar.Gdl;
import org.ggp.base.util.gdl.grammar.GdlRule;
import org.ggp.base.util.gdl.grammar.GdlSentence;

import com.google.common.collect.Multimap;

/**
 * Allows SentenceDomainModels to delegate their SentenceFormModel aspects
 * to an existing SentenceFormModel.
 */
public abstract class AbstractSentenceDomainModel implements SentenceDomainModel {
    private final SentenceFormModel formModel;

    protected AbstractSentenceDomainModel(SentenceFormModel formModel) {
        this.formModel = formModel;
    }

    /*package-private*/ SentenceFormModel getFormModel() {
        return formModel;
    }

    @Override
    public Set getIndependentSentenceForms() {
        return formModel.getIndependentSentenceForms();
    }

    @Override
    public Set getConstantSentenceForms() {
        return formModel.getConstantSentenceForms();
    }

    @Override
    public Multimap getDependencyGraph() {
        return formModel.getDependencyGraph();
    }

    @Override
    public Set getSentencesListedAsTrue(SentenceForm form) {
        return formModel.getSentencesListedAsTrue(form);
    }

    @Override
    public Set getRules(SentenceForm form) {
        return formModel.getRules(form);
    }

    @Override
    public Set getSentenceForms() {
        return formModel.getSentenceForms();
    }

    @Override
    public List getDescription() {
        return formModel.getDescription();
    }

    @Override
    public SentenceForm getSentenceForm(GdlSentence sentence) {
        return formModel.getSentenceForm(sentence);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy