public CLink newCLink(Predicate from, Predicate to) { String newId = idManager.getNextId(AnnotationType.CLINK); CLink newCLink = new CLink(newId, from, to); annotationContainer.add(newCLink, Layer.CAUSAL_RELATIONS, AnnotationType.CLINK); return newCLink; }
Map<AnnotationType, List<Annotation>> getReferencedAnnotations() { Map<AnnotationType, List<Annotation>> referenced = new HashMap<AnnotationType, List<Annotation>>(); List<Annotation> predicates = new ArrayList<Annotation>(); predicates.add(this.getFrom()); predicates.add(this.getTo()); referenced.put(AnnotationType.PREDICATE, predicates); return referenced; }
for (CLink cLink : cLinks) { String commentStr = ""; if (cLink.hasRelType()) { commentStr += cLink.getRelType(); commentStr += "(" + cLink.getFrom().getId() + ", " + cLink.getTo().getId() + ")"; Comment cLinkComment = new Comment(commentStr); cLinksElem.addContent(cLinkComment); Element cLinkElem = new Element("clink"); cLinkElem.setAttribute("id", cLink.getId()); cLinkElem.setAttribute("from", cLink.getFrom().getId()); cLinkElem.setAttribute("to", cLink.getTo().getId()); if (cLink.hasRelType()) { cLinkElem.setAttribute("relType", cLink.getRelType());
CLink clink = kaf.newCLink(clid, from, to); if (relType != null) { clink.setRelType(relType);
for (CLink cLink : cLinks) { String commentStr = ""; if (cLink.hasRelType()) { commentStr += cLink.getRelType(); commentStr += "(" + cLink.getFrom().getId() + ", " + cLink.getTo().getId() + ")"; Comment cLinkComment = new Comment(StringEscapeUtils.escapeXml11(commentStr)); cLinksElem.addContent(cLinkComment); Element cLinkElem = new Element("clink"); cLinkElem.setAttribute("id", cLink.getId()); cLinkElem.setAttribute("from", cLink.getFrom().getId()); cLinkElem.setAttribute("to", cLink.getTo().getId()); if (cLink.hasRelType()) { cLinkElem.setAttribute("relType", cLink.getRelType());
CLink clink = kaf.newCLink(clid, from, to); if (relType != null) { clink.setRelType(relType);
public CLink newCLink(Predicate from, Predicate to) { String newId = idManager.clinks.getNext(); CLink newCLink = new CLink(newId, from, to); annotationContainer.add(newCLink); return newCLink; }
public CLink newCLink(String id, Predicate from, Predicate to) { idManager.updateCounter(AnnotationType.CLINK, id); CLink newCLink = new CLink(id, from, to); annotationContainer.add(newCLink, Layer.CAUSAL_RELATIONS, AnnotationType.CLINK); return newCLink; }
public CLink newCLink(String id, Predicate from, Predicate to) { idManager.clinks.update(id); CLink newCLink = new CLink(id, from, to); annotationContainer.add(newCLink); return newCLink; }