55 lines
1.4 KiB
Java
55 lines
1.4 KiB
Java
package eu.eudat.commons.types.descriptiontemplate.importmodel.fields;
|
|
|
|
import eu.eudat.model.persist.descriptiontemplatedefinition.RulePersist;
|
|
import jakarta.xml.bind.annotation.XmlAttribute;
|
|
import jakarta.xml.bind.annotation.XmlElement;
|
|
import jakarta.xml.bind.annotation.XmlRootElement;
|
|
|
|
@XmlRootElement(name = "rule")
|
|
public class RuleImportXml {
|
|
|
|
private String ruleStyle;
|
|
private String target;
|
|
private String type;
|
|
private ValueImportXml value;
|
|
|
|
@XmlAttribute(name = "ruleStyle")
|
|
public String getRuleStyle() {
|
|
return ruleStyle;
|
|
}
|
|
|
|
public void setRuleStyle(String ruleStyle) {
|
|
this.ruleStyle = ruleStyle;
|
|
}
|
|
@XmlAttribute(name = "target")
|
|
public String getTarget() {
|
|
return target;
|
|
}
|
|
|
|
public void setTarget(String target) {
|
|
this.target = target;
|
|
}
|
|
@XmlAttribute(name = "type")
|
|
public String getType() {
|
|
return type;
|
|
}
|
|
|
|
public void setType(String type) {
|
|
this.type = type;
|
|
}
|
|
@XmlElement(name = "value")
|
|
public ValueImportXml getValue() {
|
|
return value;
|
|
}
|
|
|
|
public void setValue(ValueImportXml value) {
|
|
this.value = value;
|
|
}
|
|
|
|
public RulePersist toPersistModel(){
|
|
RulePersist ruleEntity = new RulePersist();
|
|
ruleEntity.setTarget(target);
|
|
ruleEntity.setValue(value.getValue());
|
|
return ruleEntity;
|
|
}
|
|
} |