public Entity newEntity ( List < Span < Term > > references ) { String newId = idManager . getNextId ( AnnotationType . ENTITY ) ; Entity newEntity = new Entity ( newId , references ) ; annotationContainer . add ( newEntity , Layer . ENTITIES , AnnotationType . ENTITY ) ; return newEntity ; }
Creates a new Entity . It assigns an appropriate ID to it . The entity is added to the document object .