Skip to content

Commit

Permalink
improve sonar cloud reliability issues
Browse files Browse the repository at this point in the history
  • Loading branch information
SrdjanStevanetic committed Dec 14, 2024
1 parent e3b131a commit 6c7b062
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@
import static eu.europeana.entitymanagement.vocabulary.WebEntityFields.PROVIDES_SUPPORT_FOR_MEDIA_TYPE;
import static eu.europeana.entitymanagement.vocabulary.WebEntityFields.SAME_AS;
import static eu.europeana.entitymanagement.vocabulary.WebEntityFields.TYPE;
import java.lang.reflect.Field;
import java.util.ArrayList;
import java.util.List;
import com.fasterxml.jackson.annotation.JsonGetter;
Expand Down Expand Up @@ -109,12 +108,6 @@ public String getType() {
return type;
}

@Override
public Object getFieldValue(Field field) throws IllegalAccessException {
// method to call the getters for each field individually
return field.get(this);
}

@JsonGetter(FOAF_MBOX)
public String getMbox() {
return mbox;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,24 @@
package eu.europeana.entitymanagement.solr.model;

import static eu.europeana.entitymanagement.vocabulary.OrganizationSolrFields.COUNTRY;
import static eu.europeana.entitymanagement.vocabulary.OrganizationSolrFields.COUNTRY_LABEL;
import static eu.europeana.entitymanagement.vocabulary.OrganizationSolrFields.COUNTRY_LABEL_ALL;
import static eu.europeana.entitymanagement.vocabulary.OrganizationSolrFields.DC_DESCRIPTION;
import static eu.europeana.entitymanagement.vocabulary.OrganizationSolrFields.DC_DESCRIPTION_ALL;
import static eu.europeana.entitymanagement.vocabulary.OrganizationSolrFields.EDM_ACRONYM;
import static eu.europeana.entitymanagement.vocabulary.OrganizationSolrFields.EDM_ACRONYM_ALL;
import static eu.europeana.entitymanagement.vocabulary.OrganizationSolrFields.EUROPEANA_ROLE;
import static eu.europeana.entitymanagement.vocabulary.OrganizationSolrFields.FOAF_HOMEPAGE;
import static eu.europeana.entitymanagement.vocabulary.OrganizationSolrFields.FOAF_LOGO;
import static eu.europeana.entitymanagement.vocabulary.OrganizationSolrFields.FOAF_PHONE;
import static eu.europeana.entitymanagement.vocabulary.OrganizationSolrFields.VCARD_COUNTRYNAME;
import static eu.europeana.entitymanagement.vocabulary.OrganizationSolrFields.VCARD_HAS_ADDRESS;
import static eu.europeana.entitymanagement.vocabulary.OrganizationSolrFields.VCARD_HAS_GEO;
import static eu.europeana.entitymanagement.vocabulary.OrganizationSolrFields.VCARD_LOCALITY;
import static eu.europeana.entitymanagement.vocabulary.OrganizationSolrFields.VCARD_POSTAL_CODE;
import static eu.europeana.entitymanagement.vocabulary.OrganizationSolrFields.VCARD_POST_OFFICE_BOX;
import static eu.europeana.entitymanagement.vocabulary.OrganizationSolrFields.VCARD_REGION;
import static eu.europeana.entitymanagement.vocabulary.OrganizationSolrFields.VCARD_STREET_ADDRESS;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
Expand All @@ -11,7 +30,6 @@
import eu.europeana.entitymanagement.solr.SolrUtils;
import eu.europeana.entitymanagement.utils.EntityUtils;
import eu.europeana.entitymanagement.vocabulary.EntitySolrFields;
import static eu.europeana.entitymanagement.vocabulary.OrganizationSolrFields.*;

public class SolrOrganization extends SolrEntity<Organization> {

Expand Down Expand Up @@ -70,7 +88,6 @@ public class SolrOrganization extends SolrEntity<Organization> {
private String hasGeo;

public SolrOrganization() {
super();
}

public SolrOrganization(Organization organization) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,8 @@ public static String getOwnerName(Record recordOrganization) {

public static Record getSubRecord(Record record, String fieldName) {
Object keyValue = record.getKeyValue(fieldName);
if(keyValue!=null && keyValue instanceof Record) {
Record subRec = (Record) keyValue;
return subRec;
if(keyValue instanceof Record) {
return (Record)keyValue;
}
return null;
}
Expand Down

0 comments on commit 6c7b062

Please sign in to comment.