introduced specific type for result.subject
This commit is contained in:
parent
3e9c91a741
commit
5e6dce133c
2
pom.xml
2
pom.xml
|
@ -5,7 +5,7 @@
|
||||||
<groupId>eu.dnetlib.dhp</groupId>
|
<groupId>eu.dnetlib.dhp</groupId>
|
||||||
<artifactId>dhp-schemas</artifactId>
|
<artifactId>dhp-schemas</artifactId>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<version>2.12.2-SNAPSHOT</version>
|
<version>2.13.2-SNAPSHOT</version>
|
||||||
|
|
||||||
<licenses>
|
<licenses>
|
||||||
<license>
|
<license>
|
||||||
|
|
|
@ -38,6 +38,9 @@ public class ModelConstants {
|
||||||
public static final String ACCESS_RIGHT_EMBARGO = "EMBARGO";
|
public static final String ACCESS_RIGHT_EMBARGO = "EMBARGO";
|
||||||
public static final String ACCESS_RIGHT_CLOSED = "CLOSED";
|
public static final String ACCESS_RIGHT_CLOSED = "CLOSED";
|
||||||
|
|
||||||
|
public static final String DNET_SUBJECT_KEYWORD = "keyword";
|
||||||
|
|
||||||
|
public static final String DNET_SUBJECT_FOS = "FOS";
|
||||||
|
|
||||||
public static final String DNET_SUBJECT_TYPOLOGIES = "dnet:subject_classification_typologies";
|
public static final String DNET_SUBJECT_TYPOLOGIES = "dnet:subject_classification_typologies";
|
||||||
public static final String DNET_RESULT_TYPOLOGIES = "dnet:result_typologies";
|
public static final String DNET_RESULT_TYPOLOGIES = "dnet:result_typologies";
|
||||||
|
|
|
@ -60,7 +60,7 @@ public class Result extends OafEntity implements Serializable {
|
||||||
/**
|
/**
|
||||||
* The Subject.
|
* The Subject.
|
||||||
*/
|
*/
|
||||||
private List<StructuredProperty> subject;
|
private List<Subject> subject;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The Title.
|
* The Title.
|
||||||
|
@ -258,7 +258,7 @@ public class Result extends OafEntity implements Serializable {
|
||||||
*
|
*
|
||||||
* @return the subject
|
* @return the subject
|
||||||
*/
|
*/
|
||||||
public List<StructuredProperty> getSubject() {
|
public List<Subject> getSubject() {
|
||||||
return subject;
|
return subject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -267,7 +267,7 @@ public class Result extends OafEntity implements Serializable {
|
||||||
*
|
*
|
||||||
* @param subject the subject
|
* @param subject the subject
|
||||||
*/
|
*/
|
||||||
public void setSubject(List<StructuredProperty> subject) {
|
public void setSubject(List<Subject> subject) {
|
||||||
this.subject = subject;
|
this.subject = subject;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
package eu.dnetlib.dhp.schema.oaf;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
public class Subject extends StructuredProperty implements Serializable {
|
||||||
|
}
|
|
@ -443,8 +443,8 @@ class MergeTest {
|
||||||
Publication a = publication();
|
Publication a = publication();
|
||||||
Publication b = publication();
|
Publication b = publication();
|
||||||
|
|
||||||
a.setSubject(Arrays.asList(setSP("a", "open", "classe"), setSP("b", "open", "classe")));
|
a.setSubject(Arrays.asList(setSub("a", "open", "classe"), setSub("b", "open", "classe")));
|
||||||
b.setSubject(Arrays.asList(setSP("A", "open", "classe"), setSP("c", "open", "classe")));
|
b.setSubject(Arrays.asList(setSub("A", "open", "classe"), setSub("c", "open", "classe")));
|
||||||
|
|
||||||
a.mergeFrom(b);
|
a.mergeFrom(b);
|
||||||
|
|
||||||
|
@ -599,6 +599,18 @@ class MergeTest {
|
||||||
return k;
|
return k;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private Subject setSub(final String value, final String schema, final String classname) {
|
||||||
|
Subject s = new Subject();
|
||||||
|
s.setValue(value);
|
||||||
|
Qualifier q = new Qualifier();
|
||||||
|
q.setClassname(classname);
|
||||||
|
q.setClassid(classname);
|
||||||
|
q.setSchemename(schema);
|
||||||
|
q.setSchemeid(schema);
|
||||||
|
s.setQualifier(q);
|
||||||
|
return s;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Sets sp.
|
* Sets sp.
|
||||||
*
|
*
|
||||||
|
|
Loading…
Reference in New Issue