Tim: In other words, I'm barking up the wrong tree with this.
Moojid: Below is the .project file for an EJB project I created. The settings directory is much more useful though. And it looks simple enough to write code - I am no longer looking for an API. The file org.eclipse.wst.common.project.facet.core.xml contains things like:
<installed facet="jst.web" version="xxx"/>
<installed facet="jst.ejb" version="xxx"/>
This is just as easy to parse as the .profile. So I think my algorithm is:
Thanks for all the helpful nudges in the right direction
.project file in case anyone still curious: