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;
    }
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 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