public WF newWF(int offset, Integer length, String form, int sent) { String newId = idManager.getNextId(AnnotationType.WF); WF newWF = new WF(this.annotationContainer, newId, offset, length, form, sent); annotationContainer.add(newWF, Layer.TEXT, AnnotationType.WF); return newWF; }
public WF newWF(String id, int offset, int length, String form, int sent) { idManager.updateCounter(AnnotationType.WF, id); WF newWF = new WF(this.annotationContainer, id, offset, length, form, sent); annotationContainer.add(newWF, Layer.TEXT, AnnotationType.WF); return newWF; }
/** * Creates a WF object to load an existing word form. It receives the ID as an argument. The WF is added to the document object. * * @param id word form's ID. * @param form text of the word form itself. * @return a new word form. */ public WF newWF(String id, String form, int sent) { idManager.wfs.update(id); WF newWF = new WF(this.annotationContainer, id, form, sent); annotationContainer.add(newWF); return newWF; }
/** * Creates a new WF object. It assigns an appropriate ID to it. The WF is added to the document object. * * @param form text of the word form itself. * @return a new word form. */ public WF newWF(String form, int offset, int sent) { String newId = idManager.wfs.getNext(); WF newWF = new WF(this.annotationContainer, newId, form, sent); newWF.setOffset(offset); newWF.setLength(form.length()); annotationContainer.add(newWF); return newWF; }
/** * Creates a new WF object. It assigns an appropriate ID to it and it also assigns offset and length * attributes. The WF is added to the document object. * * @param form text of the word form itself. * @return a new word form. */ public WF newWF(String form, int offset) { String newId = idManager.wfs.getNext(); int offsetVal = offset; WF newWF = new WF(this.annotationContainer, newId, form, 0); newWF.setOffset(offsetVal); newWF.setLength(form.length()); annotationContainer.add(newWF); return newWF; }
WF wfCopy = new WF(wf, kaf.getAnnotationContainer()); kaf.insertWF(wfCopy); copiedWFs.put(wf.getId(), wfCopy);
WF wfCopy = new WF(wf, this.annotationContainer); this.insertWF(wfCopy); copiedWFs.put(wf.getId(), wfCopy);