1 package transex3.model; 2 3 public class SdfEntity { 4 private String project; 5 private String source_file; 6 private String dummy1; 7 private String resource_type; 8 private String gid; 9 private String lid; 10 private String helpid; 11 private String platform; 12 private String dummy2; 13 private String langid; 14 private String text; 15 private String helptext; 16 private String quickhelptext; 17 private String title; 18 private String date; 19 20 public static int PROJECT_POS = 0; 21 public static int SOURCE_FILE_POS = 1; 22 public static int DUMMY1_POS = 2; 23 public static int RESOURCE_TYPE_POS = 3; 24 public static int GID_POS = 4; 25 public static int LID_POS = 5; 26 public static int HELPID_POS = 6; 27 public static int PLATFORM_POS = 7; 28 public static int DUMMY2_POS = 8; 29 public static int LANGID_POS = 9; 30 public static int TEXT_POS = 10; 31 public static int HELPTEXT_POS = 11; 32 public static int QUICKHELPTEXT_POS = 12; 33 public static int TITLE_POS = 13; 34 public static int DATE_POS = 14; 35 36 public SdfEntity(){} 37 public SdfEntity(String project, String source_file, String dummy1, String resource_type, String gid, String lid, String helpid, String platform, String dummy2, String langid, String text, String helptext, String quickhelptext, String title , String date) { 38 super(); 39 this.project = project; 40 this.source_file = source_file; 41 this.dummy1 = dummy1; 42 this.resource_type = resource_type; 43 this.gid = gid; 44 this.lid = lid; 45 this.helpid = helpid; 46 this.platform = platform; 47 this.dummy2 = dummy2; 48 this.langid = langid; 49 this.text = text; 50 this.helptext = helptext; 51 this.quickhelptext = quickhelptext; 52 this.title = title; 53 this.date = date; 54 } 55 56 public void setProperties( String line ){ 57 58 String[] splitted = line.split("\t"); 59 60 setProject( splitted[ SdfEntity.PROJECT_POS ] ); 61 setSource_file( splitted[ SdfEntity.SOURCE_FILE_POS ] ); 62 setDummy1( splitted[ SdfEntity.DUMMY1_POS ] ); 63 setResource_type( splitted[ SdfEntity.RESOURCE_TYPE_POS ] ); 64 setGid( splitted[ SdfEntity.GID_POS ] ); 65 setLid( splitted[ SdfEntity.LID_POS ] ); 66 setHelpid( splitted[ SdfEntity.HELPID_POS ] ); 67 setPlatform( splitted[ SdfEntity.PLATFORM_POS ] ); 68 setDummy2( splitted[ SdfEntity.DUMMY2_POS ] ); 69 setLangid( splitted[ SdfEntity.LANGID_POS ] ); 70 setText( splitted[ SdfEntity.TEXT_POS ] ); 71 setHelptext( splitted[ SdfEntity.HELPTEXT_POS ] ); 72 setQuickhelptext( splitted[ SdfEntity.QUICKHELPTEXT_POS ] ); 73 setTitle( splitted[ SdfEntity.TITLE_POS ] ); 74 setDate( splitted[ SdfEntity.DATE_POS ] ); 75 } 76 77 public String getFileId(){ 78 return project+"\\"+source_file; 79 } 80 public String getResourcePath(){ 81 return source_file.substring(0 , source_file.lastIndexOf( "\\" )-1 ); 82 } 83 public String toString(){ 84 return project+"\t"+source_file+"\t"+dummy1+"\t"+resource_type+"\t"+gid+"\t" 85 +lid+"\t"+helpid+"\t"+platform+"\t"+dummy2+"\t"+langid+"\t" 86 +text+"\t"+helptext+"\t"+quickhelptext+"\t"+title+"\t"+date; 87 } 88 public String getId(){ 89 return project+gid+lid+source_file+resource_type+platform+helpid; 90 } 91 92 public String getDummy1() { 93 return dummy1; 94 } 95 96 public void setDummy1(String dummy1) { 97 this.dummy1 = dummy1; 98 } 99 100 public String getPlatform() { 101 return platform; 102 } 103 104 public void setPlatform(String platform) { 105 this.platform = platform; 106 } 107 108 public String getDummy2() { 109 return dummy2; 110 } 111 112 public void setDummy2(String dummy2) { 113 this.dummy2 = dummy2; 114 } 115 116 public String getGid() { 117 return gid; 118 } 119 120 public void setGid(String gid) { 121 this.gid = gid; 122 } 123 124 public String getHelpid() { 125 return helpid; 126 } 127 128 public void setHelpid(String helpid) { 129 this.helpid = helpid; 130 } 131 132 public String getHelptext() { 133 return helptext; 134 } 135 136 public void setHelptext(String helptext) { 137 this.helptext = helptext; 138 } 139 140 public String getLangid() { 141 return langid; 142 } 143 144 public void setLangid(String langid) { 145 this.langid = langid; 146 } 147 148 public String getLid() { 149 return lid; 150 } 151 152 public void setLid(String lid) { 153 this.lid = lid; 154 } 155 156 public String getProject() { 157 return project; 158 } 159 160 public void setProject(String project) { 161 this.project = project; 162 } 163 164 public String getQuickhelptext() { 165 return quickhelptext; 166 } 167 168 public void setQuickhelptext(String quickhelptext) { 169 this.quickhelptext = quickhelptext; 170 } 171 172 public String getResource_type() { 173 return resource_type; 174 } 175 176 public void setResource_type(String resource_type) { 177 this.resource_type = resource_type; 178 } 179 180 public String getSource_file() { 181 return source_file; 182 } 183 184 public void setSource_file(String source_file) { 185 this.source_file = source_file; 186 } 187 188 public String getText() { 189 return text; 190 } 191 192 public void setText(String text) { 193 this.text = text; 194 } 195 196 public String getTitle() { 197 return title; 198 } 199 200 public void setTitle(String title) { 201 this.title = title; 202 } 203 public String getDate() { 204 return date; 205 } 206 public void setDate(String date) { 207 this.date = date; 208 } 209 210 211 } 212