57 lines
1.5 KiB
Java
57 lines
1.5 KiB
Java
package eu.eudat.file.transformer.entities.descriptiontemplate;
|
|
|
|
import eu.eudat.file.transformer.entities.common.DatabaseViewStyleDefinition;
|
|
import eu.eudat.file.transformer.entities.definition.DefinitionSerializable;
|
|
import eu.eudat.file.transformer.entities.xml.XmlSerializable;
|
|
import eu.eudat.file.transformer.model.descriptiontemplatedefinition.Page;
|
|
import org.w3c.dom.Document;
|
|
import org.w3c.dom.Element;
|
|
|
|
|
|
public class PageEntity implements DatabaseViewStyleDefinition, DefinitionSerializable<PageEntity, Page> {
|
|
private String id;
|
|
private int ordinal;
|
|
private String title;
|
|
|
|
public String getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(String id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public int getOrdinal() {
|
|
return ordinal;
|
|
}
|
|
|
|
public void setOrdinal(int ordinal) {
|
|
this.ordinal = ordinal;
|
|
}
|
|
|
|
public String getTitle() {
|
|
return title;
|
|
}
|
|
|
|
public void setTitle(String title) {
|
|
this.title = title;
|
|
}
|
|
|
|
/*@Override
|
|
public Element toXml(Document doc) {
|
|
Element root = doc.createElement("page");
|
|
root.setAttribute("title", this.title);
|
|
root.setAttribute("ordinal", "" + this.ordinal);
|
|
root.setAttribute("id", this.id);
|
|
return root;
|
|
}*/
|
|
|
|
@Override
|
|
public PageEntity fromDefinition(Page object) {
|
|
this.ordinal = object.getOrdinal();
|
|
this.id = object.getId();
|
|
this.title = object.getTitle();
|
|
return this;
|
|
}
|
|
}
|