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 generic node in a relation. It has the following parameters:
|
|
|
|
* - private String id the openaire id of the entity in the relation
|
|
|
|
* - private String type the type of the entity in the relation.
|
|
|
|
*
|
|
|
|
* Consider the generic relation between a Result R and a Project P, the node representing R will have
|
|
|
|
* as id the id of R and as type result, while the node representing the project will have as id the id of the project
|
|
|
|
* and as type project
|
|
|
|
*/
|
2020-07-20 17:46:27 +02:00
|
|
|
public class Node implements Serializable {
|
2020-07-24 17:21:48 +02:00
|
|
|
private String id;
|
|
|
|
private String type;
|
|
|
|
|
|
|
|
public String getId() {
|
|
|
|
return id;
|
|
|
|
}
|
2020-07-20 17:46:27 +02:00
|
|
|
|
2020-07-24 17:21:48 +02:00
|
|
|
public void setId(String id) {
|
|
|
|
this.id = id;
|
|
|
|
}
|
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 Node newInstance(String id, String type) {
|
|
|
|
Node node = new Node();
|
|
|
|
node.id = id;
|
|
|
|
node.type = type;
|
|
|
|
return node;
|
|
|
|
}
|
2020-07-20 17:46:27 +02:00
|
|
|
}
|