1
|
1 package de.mpiwg.itgroup.ismi.utils.templates;
|
|
2
|
|
3 import java.io.Serializable;
|
|
4 import java.util.ArrayList;
|
|
5 import java.util.List;
|
|
6
|
|
7 import org.mpi.openmind.repository.bo.Entity;
|
|
8
|
|
9 public abstract class AbstractTemplate implements Serializable{
|
|
10
|
|
11 private static final long serialVersionUID = -3998660931870870851L;
|
|
12
|
|
13
|
|
14 protected List<Entity> refEntityList = new ArrayList<Entity>();
|
|
15 private List<ReferenceTemplate> referenceList = new ArrayList<AbstractTemplate.ReferenceTemplate>();
|
|
16
|
|
17 protected void loadRefernces(){
|
|
18 try{
|
|
19 for(Entity ref : refEntityList){
|
|
20 this.referenceList.add(new ReferenceTemplate(ref));
|
|
21 }
|
|
22 }catch (Exception e) {
|
|
23 e.printStackTrace();
|
|
24 }
|
|
25 }
|
|
26
|
|
27 public class ReferenceTemplate implements Serializable{
|
|
28
|
|
29 private static final long serialVersionUID = -8257628538319156038L;
|
|
30
|
|
31 private String additionalInf;
|
|
32 private String endnoteId;
|
|
33 private String endnoteContent;
|
|
34
|
|
35 public ReferenceTemplate(Entity ent){
|
|
36
|
|
37 this.additionalInf = (ent.getAttributeByName("additional_information") != null) ? ent.getAttributeByName("additional_information").getValue() : null;
|
|
38 this.endnoteId = (ent.getAttributeByName("endnote-id") != null) ? ent.getAttributeByName("endnote-id").getValue() : null;
|
|
39 this.endnoteContent = (ent.getAttributeByName("endnote-content") != null) ? ent.getAttributeByName("endnote-content").getValue() : null;
|
|
40
|
|
41 }
|
|
42
|
|
43 public String getAdditionalInf() {
|
|
44 return additionalInf;
|
|
45 }
|
|
46 public void setAdditionalInf(String additionalInf) {
|
|
47 this.additionalInf = additionalInf;
|
|
48 }
|
|
49 public String getEndnoteId() {
|
|
50 return endnoteId;
|
|
51 }
|
|
52 public void setEndnoteId(String endnoteId) {
|
|
53 this.endnoteId = endnoteId;
|
|
54 }
|
|
55 public String getEndnoteContent() {
|
|
56 return endnoteContent;
|
|
57 }
|
|
58 public void setEndnoteContent(String endnoteContent) {
|
|
59 this.endnoteContent = endnoteContent;
|
|
60 }
|
|
61 }
|
|
62
|
|
63 public List<ReferenceTemplate> getReferenceList() {
|
|
64 return referenceList;
|
|
65 }
|
|
66
|
|
67 public void setReferenceList(List<ReferenceTemplate> referenceList) {
|
|
68 this.referenceList = referenceList;
|
|
69 }
|
|
70 }
|