2017-12-15 00:01:26 +01:00
|
|
|
package eu.eudat.entities;
|
2017-09-14 12:37:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
import org.hibernate.annotations.GenericGenerator;
|
|
|
|
import org.hibernate.annotations.Type;
|
|
|
|
|
2018-02-16 11:34:02 +01:00
|
|
|
import javax.persistence.*;
|
|
|
|
import java.io.Serializable;
|
|
|
|
import java.util.UUID;
|
2017-09-14 12:37:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
@Entity
|
2018-02-16 11:34:02 +01:00
|
|
|
@Table(name = "\"DatasetProfileRuleset\"")
|
2018-02-20 08:50:17 +01:00
|
|
|
public class DatasetProfileRuleset {
|
2018-02-16 11:34:02 +01:00
|
|
|
|
|
|
|
@Id
|
|
|
|
@GeneratedValue
|
2017-09-14 12:37:36 +02:00
|
|
|
@GenericGenerator(name = "uuid2", strategy = "uuid2")
|
|
|
|
@Column(name = "\"ID\"", updatable = false, nullable = false, columnDefinition = "BINARY(16)")
|
2018-02-16 11:34:02 +01:00
|
|
|
private UUID id;
|
2018-01-03 11:44:54 +01:00
|
|
|
|
2017-09-14 12:37:36 +02:00
|
|
|
|
2018-02-16 11:34:02 +01:00
|
|
|
@Column(name = "\"Label\"")
|
|
|
|
private String label;
|
2017-09-14 12:37:36 +02:00
|
|
|
|
2018-02-16 11:34:02 +01:00
|
|
|
@Type(type = "eu.eudat.typedefinition.XMLType")
|
|
|
|
@Column(name = "\"Definition\"", columnDefinition = "xml", nullable = false)
|
|
|
|
private String definition;
|
2017-09-14 12:37:36 +02:00
|
|
|
|
2018-02-16 11:34:02 +01:00
|
|
|
public UUID getId() {
|
|
|
|
return id;
|
|
|
|
}
|
2017-09-14 12:37:36 +02:00
|
|
|
|
2018-02-16 11:34:02 +01:00
|
|
|
public void setId(UUID id) {
|
|
|
|
this.id = id;
|
|
|
|
}
|
2017-09-14 12:37:36 +02:00
|
|
|
|
2018-02-16 11:34:02 +01:00
|
|
|
public String getLabel() {
|
|
|
|
return label;
|
|
|
|
}
|
2017-09-14 12:37:36 +02:00
|
|
|
|
2018-02-16 11:34:02 +01:00
|
|
|
public void setLabel(String label) {
|
|
|
|
this.label = label;
|
|
|
|
}
|
|
|
|
|
|
|
|
public String getDefinition() {
|
2017-09-14 12:37:36 +02:00
|
|
|
// return XML.toJSONObject(definition).toString(); //return definition as json
|
2018-02-16 11:34:02 +01:00
|
|
|
return definition;
|
|
|
|
}
|
2017-09-14 12:37:36 +02:00
|
|
|
|
2018-02-16 11:34:02 +01:00
|
|
|
public void setDefinition(String definition) {
|
2017-09-14 12:37:36 +02:00
|
|
|
// this.definition = XML.toString(definition); //if definition is in json
|
2018-02-16 11:34:02 +01:00
|
|
|
this.definition = definition;
|
|
|
|
}
|
2017-09-14 12:37:36 +02:00
|
|
|
|
2018-02-01 10:08:06 +01:00
|
|
|
|
2017-09-14 12:37:36 +02:00
|
|
|
}
|