BooleanresourceIsSameKind=aService.checkIsKindResource(res)||aService.getServiceCharacteristicByName("Kind")==null;//either Kind is the same or simply does not exist. Then behave the same
if(resourceIsSameKind){//if this service is the same kind as the resource then don't prefix the characteristic
kind="";
resourcename="";
//rlist.add(res); //add only this one
}else{
//enable the following to remove crXXXXXX prefix in name