private void setReferent ( SNode n , long index , int value ) { if ( n instanceof SToken ) { SToken tok = ( SToken ) n ; if ( ! referentOfToken . containsKey ( tok . getId ( ) ) ) { HashMap < Long , Integer > newlist = new HashMap < Long , Integer > ( ) ; newlist . put ( index , value ) ; //globalindex? referentOfToken . put ( tok . getId ( ) , newlist ) ; } else { referentOfToken . get ( tok . getId ( ) ) . put ( globalIndex , value ) ; } } else { List < SRelation < SNode , SNode > > outEdges = n . getGraph ( ) . getOutRelations ( n . getId ( ) ) ; if ( outEdges != null ) { for ( SRelation < ? extends SNode , ? extends SNode > edge : outEdges ) { if ( ! ( edge instanceof SPointingRelation ) ) { if ( edge . getSource ( ) != null && edge . getTarget ( ) != null ) { setReferent ( edge . getTarget ( ) , index , value ) ; } } } } } }
adds a Referent for all Nodes dominated or covered by outgoing Edges of AnnisNode a