org.ggp.base.util.gdl.model.AbstractSentenceDomainModel Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of alloy-ggp-base Show documentation
Show all versions of alloy-ggp-base Show documentation
A modified version of the GGP-Base library for Alloy.
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);
}
}