Swanson sworn in as attorney general