Move export/criteria rules to Java.