public PersistenceContext bootstrapPersistenceContext(String name, EntityManagerFactory emf, URI baseURI, String version, boolean replace) {
PersistenceContext persistenceContext = new PersistenceContext(name, (EntityManagerFactoryImpl) emf, baseURI);
persistenceContext.setBaseURI(baseURI);
persistenceContext.setVersion(version);
if (persistenceContext.isVersionGreaterOrEqualTo(AbstractResource.SERVICE_VERSION_2_0)) {
persistenceContext.setSupportedFeatureSet(new FeatureSetV2());
} else {
persistenceContext.setSupportedFeatureSet(new FeatureSetPreV2());
}
return persistenceContext;
}