Country selector: if or ternary?
Neither. Note: haven't tried this in and IDE, but you should be able to get the idea.

interface RegionID {
    boolean isRegionMatch(String fileID);
    String getRegionCode();
}

class SimpleMatchRegionID implements RegionID {
    private String regionPrefix;
    private String regionCode;

    public SimpleMatchRegionID(String regionPrefix, String regionCode) {
        this.regionPrefix = regionPrefix;
        this.regionCode = regionCode;
    }

    public boolean isRegionMatch(String fileID) {
        return fileID.startsWith(regeionPrefix);
    }

    public String getRegionCode() {
        return regionCode;
    }
}

RegionID us = new SimpleMatchRegionID("CPP420.A1", "US");
RegionID ca = new SimpleMatchRegionID("CPP350", "CA");
RegionID fr = new SimpleMatchRegionID("CPP350", "FR");
RegionID[] regions = {us, ca, fr};

public String findRegionCode(String fileID) {
    for (i = 0; i &lt; regions.length; i++) {
        if (regions[i].isRegionMatch(fileID)) {
            return regions[i].getRegionCode();
        }
    }

    return "";
}


An implementation like this would allow you to load the regions array from a data file, or with some other run-time mechanism. It would also allow you to implement other strategies for recognizing a region that doesn't follow the same basic pattern.