added comparator for refereed field instances, updated constants
This commit is contained in:
parent
f683019c3d
commit
5a21b8bee3
4
pom.xml
4
pom.xml
|
@ -5,7 +5,7 @@
|
|||
<groupId>eu.dnetlib.dhp</groupId>
|
||||
<artifactId>dhp-schemas</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<version>2.10.31-SNAPSHOT</version>
|
||||
<version>2.10.30-SNAPSHOT</version>
|
||||
|
||||
|
||||
<licenses>
|
||||
|
@ -33,7 +33,7 @@
|
|||
<connection>scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git</connection>
|
||||
<developerConnection>scm:git:gitea@code-repo.d4science.org:D-Net/dhp-schemas.git</developerConnection>
|
||||
<url>https://code-repo.d4science.org/D-Net/dhp-schemas/</url>
|
||||
<tag>dhp-schemas-2.10.25</tag>
|
||||
<tag>dhp-schemas-2.10.30</tag>
|
||||
</scm>
|
||||
|
||||
<description>This module contains common schema classes meant to be used across the dnet-hadoop submodules</description>
|
||||
|
|
|
@ -57,8 +57,10 @@ public class ModelConstants {
|
|||
public static final String DNET_RELATION_SUBRELTYPE = "dnet:relation_subRelType";
|
||||
public static final String DNET_RELATION_RELCLASS = "dnet:relation_relClass";
|
||||
|
||||
public static final String PEER_REVIEWED = "nonPeerReviewed";
|
||||
public static final String NON_PEER_REVIEWED = "nonPeerReviewed";
|
||||
public static final String PEER_REVIEWED_CLASSNAME = "nonPeerReviewed";
|
||||
public static final String NON_PEER_REVIEWED_CLASSNAME = "nonPeerReviewed";
|
||||
public static final String PEER_REVIEWED_CLASSID = "0001";
|
||||
public static final String NON_PEER_REVIEWED_CLASSID = "0002";
|
||||
|
||||
public static final String SYSIMPORT_CROSSWALK_REPOSITORY = "sysimport:crosswalk:repository";
|
||||
public static final String SYSIMPORT_CROSSWALK_ENTITYREGISTRY = "sysimport:crosswalk:entityregistry";
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
|
||||
package eu.dnetlib.dhp.schema.common;
|
||||
|
||||
import eu.dnetlib.dhp.schema.oaf.Qualifier;
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
import eu.dnetlib.dhp.schema.oaf.Qualifier;
|
||||
|
||||
public class RefereedComparator implements Comparator<Qualifier> {
|
||||
|
||||
@Override
|
||||
|
@ -23,14 +23,14 @@ public class RefereedComparator implements Comparator<Qualifier> {
|
|||
if (lClass.equals(rClass))
|
||||
return 0;
|
||||
|
||||
if (lClass.equals(ModelConstants.PEER_REVIEWED))
|
||||
if (lClass.equals(ModelConstants.PEER_REVIEWED_CLASSID))
|
||||
return -1;
|
||||
if (rClass.equals(ModelConstants.PEER_REVIEWED))
|
||||
if (rClass.equals(ModelConstants.PEER_REVIEWED_CLASSID))
|
||||
return 1;
|
||||
|
||||
if (lClass.equals(ModelConstants.NON_PEER_REVIEWED))
|
||||
if (lClass.equals(ModelConstants.NON_PEER_REVIEWED_CLASSID))
|
||||
return -1;
|
||||
if (rClass.equals(ModelConstants.NON_PEER_REVIEWED))
|
||||
if (rClass.equals(ModelConstants.NON_PEER_REVIEWED_CLASSID))
|
||||
return 1;
|
||||
|
||||
if (lClass.equals(ModelConstants.UNKNOWN))
|
||||
|
|
Loading…
Reference in New Issue