Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added the config to group/re-index all ROR, removed ringgold references #6828

Merged
merged 1 commit into from
Jun 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ public class LoadDataForOrganizationSource {

private OrgLoadSource rorOrgSource;
private OrgLoadSource fundrefOrgSource;
private OrgLoadSource ringgoldOrgSource;

private static final String ROR_TYPE="ROR";
private static final String FUNDREF_TYPE="FUNDREF";
Expand All @@ -44,7 +43,6 @@ private void init() {
orgLoadManager = (OrgLoadManager) context.getBean("orgLoadManager");
rorOrgSource = (OrgLoadSource) context.getBean("rorOrgDataSource");
fundrefOrgSource = (OrgLoadSource) context.getBean("fundrefOrgDataSource");
ringgoldOrgSource = (OrgLoadSource) context.getBean("ringgoldOrgDataSource");
}

public static void main(String[] args) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,7 @@ public class ProcessOrganizationAsPartOfGroupForDisambiguatedOrgId {
private static final Logger LOG = LoggerFactory.getLogger(ProcessOrganizationAsPartOfGroupForDisambiguatedOrgId.class);
private OrgDisambiguatedManager orgDisambiguatedManager;
private OrgDisambiguatedDao orgDisambiguatedDao;


private OrgLoadSource rorOrgSource;
private OrgLoadSource fundrefOrgSource;
private OrgLoadSource ringgoldOrgSource;


private static final String ROR_TYPE="ROR";
private static final String FUNDREF_TYPE="FUNDREF";
Expand All @@ -48,9 +44,6 @@ public class ProcessOrganizationAsPartOfGroupForDisambiguatedOrgId {
private void init() {
ApplicationContext context = new ClassPathXmlApplicationContext("orcid-scheduler-context.xml");
orgDisambiguatedManager = (OrgDisambiguatedManager) context.getBean("orgDisambiguatedManager");
rorOrgSource = (OrgLoadSource) context.getBean("rorOrgDataSource");
fundrefOrgSource = (OrgLoadSource) context.getBean("fundrefOrgDataSource");
ringgoldOrgSource = (OrgLoadSource) context.getBean("ringgoldOrgDataSource");
orgDisambiguatedDao = (OrgDisambiguatedDao) context.getBean("orgDisambiguatedDao");
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ public class RorOrgLoadSource implements OrgLoadSource {

@Value("${org.orcid.core.orgs.ror.localDataPath:/tmp/grid/ror.json}")
private String localDataPath;

@Value("${org.orcid.core.orgs.ror.indexAllEnabled:false}")
private boolean indexAllEnabled;

@Resource
private OrgDisambiguatedDao orgDisambiguatedDao;
Expand Down Expand Up @@ -223,7 +226,7 @@ private boolean loadData() {
private OrgDisambiguatedEntity processInstitute(String sourceId, String name, Iso3166Country country, String city, String region, String url, String orgType) {
OrgDisambiguatedEntity existingBySourceId = orgDisambiguatedDao.findBySourceIdAndSourceType(sourceId, OrgDisambiguatedSourceType.ROR.name());
if (existingBySourceId != null) {
if (entityChanged(existingBySourceId, name, country.value(), city, region, url, orgType)) {
if (entityChanged(existingBySourceId, name, country.value(), city, region, url, orgType) || indexAllEnabled) {
existingBySourceId.setCity(city);
existingBySourceId.setCountry(country.name());
existingBySourceId.setName(name);
Expand Down
3 changes: 3 additions & 0 deletions properties/development.properties
Original file line number Diff line number Diff line change
Expand Up @@ -233,3 +233,6 @@ org.orcid.core.profile.lockout.window=5

# ISSN Loader Cron Configuration
org.orcid.scheduler.web.loadIssnCronConfig=0 0 0 * * FRI

# Added the config to index all RORs not only the changed ones
org.orcid.core.orgs.ror.indexAllEnabled=false