* @param removedTypes
* @param edge
* @return
*/
protected EdgeList findAllValues( Node node, Individual neighbor, Set<ATermAppl> removedTypes, Edge edge){
EdgeList edges = new EdgeList();
boolean applicable = false;
List<ATermAppl> avTypes = neighbor.getTypes( Node.ALL );
List<ATermAppl> applicableRoles = new ArrayList<ATermAppl>();
//inspect all values for a recently deleted type
for( int i = 0; i < avTypes.size(); i++ ){
ATermAppl avType = avTypes.get( i );
ATermAppl role = (ATermAppl) avType.getArgument( 0 );
ATermAppl type = (ATermAppl) avType.getArgument( 1 );
//if we cannot use this edge then continue
if( edge != null && !edge.getRole().isSubRoleOf( abox.getRole( role ) ) )
continue;
if( containsType( type, removedTypes ) ){
applicable = true;
applicableRoles.add( type );
}
}
//only proceed if necessary
if( !applicable )
return edges;
//two cases depending on input
if(edge == null){
//get all edges to this node
for( int i = 0; i < applicableRoles.size(); i++ ){
ATerm p = applicableRoles.get( i );
Role role = abox.getRole( p );
edges.addEdgeList( neighbor.getRNeighborEdges( role, node ) );
}
}else{
edges.addEdge( edge );
}
return edges;
}