term.addSynonym(elements[i].substring(elements[i].indexOf(":") + 1));
term.addSynonym(new DagTermSynonym(elements[i].substring(elements[i].indexOf(":") + 1)));
    public DagTerm dagTermFromString(String details) throws Exception {        details = details.trim();        String[] elements = details.split(DELIMITER);        String name = stripEscaped(elements[0]);        if (elements.length < 2) {            throw new Exception("term does not have an id: " + details);        }        String id = stripList(elements[1]);        // TODO check that 0 and 1 are name and id, handle broken terms better        Identifier identifier = new Identifier(id, name);        DagTerm term = (DagTerm) seenTerms.get(identifier);        if (term == null) {            term = new DagTerm(id, name);            seenTerms.put(identifier, term);        }        // zero or more synonyms follow name and id        for (int i = 2; i < elements.length; i++) {            if (elements[i].startsWith("synonym:")) {                term.addSynonym(elements[i].substring(elements[i].indexOf(":") + 1));            }        }        return term;    }