That's an interesting question. Generally, Star Alliance credits based upon the metal you fly on, but oneworld credits based upon the airline code on your ticket. Two different ways of approaching codeshares.
An example of a Star Alliance anomaly is TK8000, a flight operated by Malaysia between IST
with the Turkish code on it. There are many threads on other sites that state because of the way *A credits flights, TK8000 doesn't earn miles in *A accounts, unless Malaysia is a partner of the airline where you're crediting miles (ANA I believe is one).
I'd submit it to AAdvantage and see what they do with it. Post your results!