org.mizartools.system.xml.Term term,
VariableId vid) throws DliException {
if (term == null) return null;
Term termDli = null;
if (term instanceof org.mizartools.system.xml.Var) {
termDli = new Variable(((org.mizartools.system.xml.Var)term).getNr());
} else if (term instanceof org.mizartools.system.xml.LocusVar) {
termDli = new LocusVar(((org.mizartools.system.xml.LocusVar)term).getNr());
} else if (term instanceof org.mizartools.system.xml.Func) {
org.mizartools.system.xml.Func func = (org.mizartools.system.xml.Func) term;
LinkedList<Term> termList = new LinkedList<Term>();
for (org.mizartools.system.xml.Term term1 : func.getTermList()) {
termList.add(getTerm(abstractSignature, term1, vid));
}
if (func.getKind() == org.mizartools.system.xml.Func.Kind.F){
if (func.getNr() == null) throw new DliException();
termDli = new PrivateFunctor(func.getNr(), termList);
} else {
ItemId itemId = getItemId(abstractSignature, func.getKind(), func.getNr());
termDli = new Func(itemId, termList);
}
} else if (term instanceof org.mizartools.system.xml.Choice) {
termDli = new The(getType(abstractSignature, ((org.mizartools.system.xml.Choice)term).getTyp()));
} else if (term instanceof org.mizartools.system.xml.Num) {
termDli = new Num(((org.mizartools.system.xml.Num)term).getNr());
} else if (term instanceof org.mizartools.system.xml.Fraenkel) {
org.mizartools.system.xml.Fraenkel fraenkel = (org.mizartools.system.xml.Fraenkel)term;
LinkedList<Var> varList = new LinkedList<Var>();
VariableId vid2 = new VariableId();
vid2.setId(vid.getId());
for (org.mizartools.system.xml.Typ typ : fraenkel.getTypList()) {
vid2.increment();
Variable variable = new Variable(vid2.getId());
Type type = getType(abstractSignature, typ);
varList.add(new Var(variable, type));
}
Term term1 = getTerm(abstractSignature, fraenkel.getTerm(), vid2);
termDli = new Fraenkel(varList, term1, getFormula(abstractSignature, fraenkel.getFormula(), vid2));