/** Creates a new relation between entities and/or sentiment features. It assigns an appropriate ID to it. The relation is added to the document. * @param from source of the relation * @param to target of the relation * @return a new relation */ public Relation newRelation(Relational from, Relational to) { String newId = idManager.getNextId(AnnotationType.RELATION); Relation newRelation = new Relation(newId, from, to); annotationContainer.add(newRelation, Layer.RELATIONS, AnnotationType.RELATION); return newRelation; }
/** Creates a new relation between entities and/or sentiment features. It receives its ID as an argument. The relation is added to the document. * @param id the ID of the relation * @param from source of the relation * @param to target of the relation * @return a new relation */ public Relation newRelation(String id, Relational from, Relational to) { idManager.updateCounter(AnnotationType.RELATION, id); Relation newRelation = new Relation(id, from, to); annotationContainer.add(newRelation, Layer.RELATIONS, AnnotationType.RELATION); return newRelation; }
/** * Creates a new relation between entities and/or sentiment features. It assigns an appropriate ID to it. The relation is added to the document. * * @param from source of the relation * @param to target of the relation * @return a new relation */ public Relation newRelation(Relational from, Relational to) { String newId = idManager.relations.getNext(); Relation newRelation = new Relation(newId, from, to); annotationContainer.add(newRelation); return newRelation; }
/** * Creates a new relation between entities and/or sentiment features. It receives its ID as an argument. The relation is added to the document. * * @param id the ID of the relation * @param from source of the relation * @param to target of the relation * @return a new relation */ public Relation newRelation(String id, Relational from, Relational to) { idManager.relations.update(id); Relation newRelation = new Relation(id, from, to); annotationContainer.add(newRelation); return newRelation; }
Relation relationCopy = new Relation(relation, copiedRelationals); kaf.insertRelation(relationCopy);
Relation relationCopy = new Relation(relation, copiedRelationals); this.insertRelation(relationCopy);