for (SSTspan s : ssts) { Element lEnt = new Element("sst"); lEnt.setAttribute("id", s.getId()); lEnt.setAttribute("type", s.getType()); lEnt.setAttribute("label", s.getLabel()); Comment spanComment = new Comment(s.getSpanStr()); lEnt.addContent(spanComment); Element spanElem = new Element("span"); for (Term target : s.getTerms().getTargets()) { Element targetElem = new Element("target"); targetElem.setAttribute("id", target.getId());
/** * Creates a SSTspan object and add it to the document * * @param term the Term of the coreference. * @return a new factuality. */ public SSTspan newSST(Span<Term> span) { String newId = idManager.ssts.getNext(); SSTspan sst = new SSTspan(newId, span); annotationContainer.add(sst); return sst; }