Court rules for Oakland terminal in coal dispute