applied intellij code cleanup
This commit is contained in:
parent
0e5cf7a7d8
commit
1271bec1f8
|
@ -26,7 +26,7 @@ import eu.dnetlib.dhp.schema.oaf.*;
|
||||||
public class ModelSupport {
|
public class ModelSupport {
|
||||||
|
|
||||||
/** Defines the mapping between the actual entity type and the main entity type */
|
/** Defines the mapping between the actual entity type and the main entity type */
|
||||||
private static Map<EntityType, MainEntityType> entityMapping = Maps.newHashMap();
|
private static final Map<EntityType, MainEntityType> entityMapping = Maps.newHashMap();
|
||||||
|
|
||||||
static {
|
static {
|
||||||
entityMapping.put(EntityType.publication, MainEntityType.result);
|
entityMapping.put(EntityType.publication, MainEntityType.result);
|
||||||
|
|
|
@ -32,7 +32,7 @@ public class Context extends Qualifier {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int hashCode() {
|
public int hashCode() {
|
||||||
String provenance = new String();
|
String provenance = "";
|
||||||
this.provenance.forEach(p -> provenance.concat(p.toString()));
|
this.provenance.forEach(p -> provenance.concat(p.toString()));
|
||||||
return Objects.hash(getCode(), getLabel(), provenance);
|
return Objects.hash(getCode(), getLabel(), provenance);
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ public class AccessRight extends Qualifier {
|
||||||
String s = super.toComparableString();
|
String s = super.toComparableString();
|
||||||
return Optional
|
return Optional
|
||||||
.ofNullable(getOpenAccessRoute())
|
.ofNullable(getOpenAccessRoute())
|
||||||
.map(x -> s + "::" + x.toString())
|
.map(x -> s + "::" + x)
|
||||||
.orElse(s);
|
.orElse(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -37,10 +37,7 @@ public class CleaningFunctions {
|
||||||
if (CleaningFunctions.PID_BLACKLIST.contains(pidValue)) {
|
if (CleaningFunctions.PID_BLACKLIST.contains(pidValue)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (PidBlacklistProvider.getBlacklist(s.getQualifier().getClassid()).contains(pidValue)) {
|
return !PidBlacklistProvider.getBlacklist(s.getQualifier().getClassid()).contains(pidValue);
|
||||||
return false;
|
|
||||||
}
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -11,7 +11,7 @@ import eu.dnetlib.dhp.schema.oaf.StructuredProperty;
|
||||||
|
|
||||||
public class PidComparator<T extends OafEntity> implements Comparator<StructuredProperty> {
|
public class PidComparator<T extends OafEntity> implements Comparator<StructuredProperty> {
|
||||||
|
|
||||||
private T entity;
|
private final T entity;
|
||||||
|
|
||||||
public PidComparator(T entity) {
|
public PidComparator(T entity) {
|
||||||
this.entity = entity;
|
this.entity = entity;
|
||||||
|
|
|
@ -16,7 +16,7 @@ import eu.dnetlib.dhp.schema.oaf.Publication;
|
||||||
|
|
||||||
public class IdentifierFactoryTest {
|
public class IdentifierFactoryTest {
|
||||||
|
|
||||||
private static ObjectMapper OBJECT_MAPPER = new ObjectMapper()
|
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper()
|
||||||
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false);
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|
Loading…
Reference in New Issue