2020-07-24 17:21:48 +02:00
|
|
|
|
2020-07-20 17:46:27 +02:00
|
|
|
package eu.dnetlib.dhp.schema.dump.oaf.graph;
|
|
|
|
|
|
|
|
import java.io.Serializable;
|
|
|
|
|
2020-08-13 18:23:24 +02:00
|
|
|
/**
|
|
|
|
* To represent the semantics of the generic relation between two entities. It has the following parameters:
|
|
|
|
* - private String name to store the semantics of the relation (i.e. isAuthorInstitutionOf). It corresponds to the
|
|
|
|
* relclass parameter in the relation represented in the internal model
|
|
|
|
* represented in the internal model
|
|
|
|
* - private String type to store the type of the relation (i.e. affiliation). It corresponds to the subreltype parameter
|
|
|
|
* of the relation represented in theinternal model
|
|
|
|
*/
|
2020-07-20 17:46:27 +02:00
|
|
|
public class RelType implements Serializable {
|
2020-07-24 17:21:48 +02:00
|
|
|
private String name; // relclass
|
|
|
|
private String type; // subreltype
|
|
|
|
|
|
|
|
public String getName() {
|
|
|
|
return name;
|
|
|
|
}
|
2020-07-20 17:46:27 +02:00
|
|
|
|
2020-07-24 17:21:48 +02:00
|
|
|
public void setName(String name) {
|
|
|
|
this.name = name;
|
|
|
|
}
|
2020-07-20 17:46:27 +02:00
|
|
|
|
2020-07-24 17:21:48 +02:00
|
|
|
public String getType() {
|
|
|
|
return type;
|
|
|
|
}
|
2020-07-20 17:46:27 +02:00
|
|
|
|
2020-07-24 17:21:48 +02:00
|
|
|
public void setType(String type) {
|
|
|
|
this.type = type;
|
|
|
|
}
|
2020-07-20 17:46:27 +02:00
|
|
|
|
2020-07-24 17:21:48 +02:00
|
|
|
public static RelType newInstance(String name, String type) {
|
|
|
|
RelType rel = new RelType();
|
|
|
|
rel.name = name;
|
|
|
|
rel.type = type;
|
|
|
|
return rel;
|
|
|
|
}
|
2020-07-20 17:46:27 +02:00
|
|
|
}
|