1*d127360fSAndrew Rist /************************************************************** 2*d127360fSAndrew Rist * 3*d127360fSAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one 4*d127360fSAndrew Rist * or more contributor license agreements. See the NOTICE file 5*d127360fSAndrew Rist * distributed with this work for additional information 6*d127360fSAndrew Rist * regarding copyright ownership. The ASF licenses this file 7*d127360fSAndrew Rist * to you under the Apache License, Version 2.0 (the 8*d127360fSAndrew Rist * "License"); you may not use this file except in compliance 9*d127360fSAndrew Rist * with the License. You may obtain a copy of the License at 10*d127360fSAndrew Rist * 11*d127360fSAndrew Rist * http://www.apache.org/licenses/LICENSE-2.0 12*d127360fSAndrew Rist * 13*d127360fSAndrew Rist * Unless required by applicable law or agreed to in writing, 14*d127360fSAndrew Rist * software distributed under the License is distributed on an 15*d127360fSAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*d127360fSAndrew Rist * KIND, either express or implied. See the License for the 17*d127360fSAndrew Rist * specific language governing permissions and limitations 18*d127360fSAndrew Rist * under the License. 19*d127360fSAndrew Rist * 20*d127360fSAndrew Rist *************************************************************/ 21*d127360fSAndrew Rist 22cdf0e10cSrcweir package transex3.model; 23cdf0e10cSrcweir 24cdf0e10cSrcweir public class SdfEntity { 25cdf0e10cSrcweir private String project; 26cdf0e10cSrcweir private String source_file; 27cdf0e10cSrcweir private String dummy1; 28cdf0e10cSrcweir private String resource_type; 29cdf0e10cSrcweir private String gid; 30cdf0e10cSrcweir private String lid; 31cdf0e10cSrcweir private String helpid; 32cdf0e10cSrcweir private String platform; 33cdf0e10cSrcweir private String dummy2; 34cdf0e10cSrcweir private String langid; 35cdf0e10cSrcweir private String text; 36cdf0e10cSrcweir private String helptext; 37cdf0e10cSrcweir private String quickhelptext; 38cdf0e10cSrcweir private String title; 39cdf0e10cSrcweir private String date; 40cdf0e10cSrcweir 41cdf0e10cSrcweir public static int PROJECT_POS = 0; 42cdf0e10cSrcweir public static int SOURCE_FILE_POS = 1; 43cdf0e10cSrcweir public static int DUMMY1_POS = 2; 44cdf0e10cSrcweir public static int RESOURCE_TYPE_POS = 3; 45cdf0e10cSrcweir public static int GID_POS = 4; 46cdf0e10cSrcweir public static int LID_POS = 5; 47cdf0e10cSrcweir public static int HELPID_POS = 6; 48cdf0e10cSrcweir public static int PLATFORM_POS = 7; 49cdf0e10cSrcweir public static int DUMMY2_POS = 8; 50cdf0e10cSrcweir public static int LANGID_POS = 9; 51cdf0e10cSrcweir public static int TEXT_POS = 10; 52cdf0e10cSrcweir public static int HELPTEXT_POS = 11; 53cdf0e10cSrcweir public static int QUICKHELPTEXT_POS = 12; 54cdf0e10cSrcweir public static int TITLE_POS = 13; 55cdf0e10cSrcweir public static int DATE_POS = 14; 56cdf0e10cSrcweir SdfEntity()57cdf0e10cSrcweir public SdfEntity(){} 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)58cdf0e10cSrcweir 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) { 59cdf0e10cSrcweir super(); 60cdf0e10cSrcweir this.project = project; 61cdf0e10cSrcweir this.source_file = source_file; 62cdf0e10cSrcweir this.dummy1 = dummy1; 63cdf0e10cSrcweir this.resource_type = resource_type; 64cdf0e10cSrcweir this.gid = gid; 65cdf0e10cSrcweir this.lid = lid; 66cdf0e10cSrcweir this.helpid = helpid; 67cdf0e10cSrcweir this.platform = platform; 68cdf0e10cSrcweir this.dummy2 = dummy2; 69cdf0e10cSrcweir this.langid = langid; 70cdf0e10cSrcweir this.text = text; 71cdf0e10cSrcweir this.helptext = helptext; 72cdf0e10cSrcweir this.quickhelptext = quickhelptext; 73cdf0e10cSrcweir this.title = title; 74cdf0e10cSrcweir this.date = date; 75cdf0e10cSrcweir } 76cdf0e10cSrcweir setProperties( String line )77cdf0e10cSrcweir public void setProperties( String line ){ 78cdf0e10cSrcweir 79cdf0e10cSrcweir String[] splitted = line.split("\t"); 80cdf0e10cSrcweir 81cdf0e10cSrcweir setProject( splitted[ SdfEntity.PROJECT_POS ] ); 82cdf0e10cSrcweir setSource_file( splitted[ SdfEntity.SOURCE_FILE_POS ] ); 83cdf0e10cSrcweir setDummy1( splitted[ SdfEntity.DUMMY1_POS ] ); 84cdf0e10cSrcweir setResource_type( splitted[ SdfEntity.RESOURCE_TYPE_POS ] ); 85cdf0e10cSrcweir setGid( splitted[ SdfEntity.GID_POS ] ); 86cdf0e10cSrcweir setLid( splitted[ SdfEntity.LID_POS ] ); 87cdf0e10cSrcweir setHelpid( splitted[ SdfEntity.HELPID_POS ] ); 88cdf0e10cSrcweir setPlatform( splitted[ SdfEntity.PLATFORM_POS ] ); 89cdf0e10cSrcweir setDummy2( splitted[ SdfEntity.DUMMY2_POS ] ); 90cdf0e10cSrcweir setLangid( splitted[ SdfEntity.LANGID_POS ] ); 91cdf0e10cSrcweir setText( splitted[ SdfEntity.TEXT_POS ] ); 92cdf0e10cSrcweir setHelptext( splitted[ SdfEntity.HELPTEXT_POS ] ); 93cdf0e10cSrcweir setQuickhelptext( splitted[ SdfEntity.QUICKHELPTEXT_POS ] ); 94cdf0e10cSrcweir setTitle( splitted[ SdfEntity.TITLE_POS ] ); 95cdf0e10cSrcweir setDate( splitted[ SdfEntity.DATE_POS ] ); 96cdf0e10cSrcweir } 97cdf0e10cSrcweir getFileId()98cdf0e10cSrcweir public String getFileId(){ 99cdf0e10cSrcweir return project+"\\"+source_file; 100cdf0e10cSrcweir } getResourcePath()101cdf0e10cSrcweir public String getResourcePath(){ 102cdf0e10cSrcweir return source_file.substring(0 , source_file.lastIndexOf( "\\" )-1 ); 103cdf0e10cSrcweir } toString()104cdf0e10cSrcweir public String toString(){ 105cdf0e10cSrcweir return project+"\t"+source_file+"\t"+dummy1+"\t"+resource_type+"\t"+gid+"\t" 106cdf0e10cSrcweir +lid+"\t"+helpid+"\t"+platform+"\t"+dummy2+"\t"+langid+"\t" 107cdf0e10cSrcweir +text+"\t"+helptext+"\t"+quickhelptext+"\t"+title+"\t"+date; 108cdf0e10cSrcweir } getId()109cdf0e10cSrcweir public String getId(){ 110cdf0e10cSrcweir return project+gid+lid+source_file+resource_type+platform+helpid; 111cdf0e10cSrcweir } 112cdf0e10cSrcweir getDummy1()113cdf0e10cSrcweir public String getDummy1() { 114cdf0e10cSrcweir return dummy1; 115cdf0e10cSrcweir } 116cdf0e10cSrcweir setDummy1(String dummy1)117cdf0e10cSrcweir public void setDummy1(String dummy1) { 118cdf0e10cSrcweir this.dummy1 = dummy1; 119cdf0e10cSrcweir } 120cdf0e10cSrcweir getPlatform()121cdf0e10cSrcweir public String getPlatform() { 122cdf0e10cSrcweir return platform; 123cdf0e10cSrcweir } 124cdf0e10cSrcweir setPlatform(String platform)125cdf0e10cSrcweir public void setPlatform(String platform) { 126cdf0e10cSrcweir this.platform = platform; 127cdf0e10cSrcweir } 128cdf0e10cSrcweir getDummy2()129cdf0e10cSrcweir public String getDummy2() { 130cdf0e10cSrcweir return dummy2; 131cdf0e10cSrcweir } 132cdf0e10cSrcweir setDummy2(String dummy2)133cdf0e10cSrcweir public void setDummy2(String dummy2) { 134cdf0e10cSrcweir this.dummy2 = dummy2; 135cdf0e10cSrcweir } 136cdf0e10cSrcweir getGid()137cdf0e10cSrcweir public String getGid() { 138cdf0e10cSrcweir return gid; 139cdf0e10cSrcweir } 140cdf0e10cSrcweir setGid(String gid)141cdf0e10cSrcweir public void setGid(String gid) { 142cdf0e10cSrcweir this.gid = gid; 143cdf0e10cSrcweir } 144cdf0e10cSrcweir getHelpid()145cdf0e10cSrcweir public String getHelpid() { 146cdf0e10cSrcweir return helpid; 147cdf0e10cSrcweir } 148cdf0e10cSrcweir setHelpid(String helpid)149cdf0e10cSrcweir public void setHelpid(String helpid) { 150cdf0e10cSrcweir this.helpid = helpid; 151cdf0e10cSrcweir } 152cdf0e10cSrcweir getHelptext()153cdf0e10cSrcweir public String getHelptext() { 154cdf0e10cSrcweir return helptext; 155cdf0e10cSrcweir } 156cdf0e10cSrcweir setHelptext(String helptext)157cdf0e10cSrcweir public void setHelptext(String helptext) { 158cdf0e10cSrcweir this.helptext = helptext; 159cdf0e10cSrcweir } 160cdf0e10cSrcweir getLangid()161cdf0e10cSrcweir public String getLangid() { 162cdf0e10cSrcweir return langid; 163cdf0e10cSrcweir } 164cdf0e10cSrcweir setLangid(String langid)165cdf0e10cSrcweir public void setLangid(String langid) { 166cdf0e10cSrcweir this.langid = langid; 167cdf0e10cSrcweir } 168cdf0e10cSrcweir getLid()169cdf0e10cSrcweir public String getLid() { 170cdf0e10cSrcweir return lid; 171cdf0e10cSrcweir } 172cdf0e10cSrcweir setLid(String lid)173cdf0e10cSrcweir public void setLid(String lid) { 174cdf0e10cSrcweir this.lid = lid; 175cdf0e10cSrcweir } 176cdf0e10cSrcweir getProject()177cdf0e10cSrcweir public String getProject() { 178cdf0e10cSrcweir return project; 179cdf0e10cSrcweir } 180cdf0e10cSrcweir setProject(String project)181cdf0e10cSrcweir public void setProject(String project) { 182cdf0e10cSrcweir this.project = project; 183cdf0e10cSrcweir } 184cdf0e10cSrcweir getQuickhelptext()185cdf0e10cSrcweir public String getQuickhelptext() { 186cdf0e10cSrcweir return quickhelptext; 187cdf0e10cSrcweir } 188cdf0e10cSrcweir setQuickhelptext(String quickhelptext)189cdf0e10cSrcweir public void setQuickhelptext(String quickhelptext) { 190cdf0e10cSrcweir this.quickhelptext = quickhelptext; 191cdf0e10cSrcweir } 192cdf0e10cSrcweir getResource_type()193cdf0e10cSrcweir public String getResource_type() { 194cdf0e10cSrcweir return resource_type; 195cdf0e10cSrcweir } 196cdf0e10cSrcweir setResource_type(String resource_type)197cdf0e10cSrcweir public void setResource_type(String resource_type) { 198cdf0e10cSrcweir this.resource_type = resource_type; 199cdf0e10cSrcweir } 200cdf0e10cSrcweir getSource_file()201cdf0e10cSrcweir public String getSource_file() { 202cdf0e10cSrcweir return source_file; 203cdf0e10cSrcweir } 204cdf0e10cSrcweir setSource_file(String source_file)205cdf0e10cSrcweir public void setSource_file(String source_file) { 206cdf0e10cSrcweir this.source_file = source_file; 207cdf0e10cSrcweir } 208cdf0e10cSrcweir getText()209cdf0e10cSrcweir public String getText() { 210cdf0e10cSrcweir return text; 211cdf0e10cSrcweir } 212cdf0e10cSrcweir setText(String text)213cdf0e10cSrcweir public void setText(String text) { 214cdf0e10cSrcweir this.text = text; 215cdf0e10cSrcweir } 216cdf0e10cSrcweir getTitle()217cdf0e10cSrcweir public String getTitle() { 218cdf0e10cSrcweir return title; 219cdf0e10cSrcweir } 220cdf0e10cSrcweir setTitle(String title)221cdf0e10cSrcweir public void setTitle(String title) { 222cdf0e10cSrcweir this.title = title; 223cdf0e10cSrcweir } getDate()224cdf0e10cSrcweir public String getDate() { 225cdf0e10cSrcweir return date; 226cdf0e10cSrcweir } setDate(String date)227cdf0e10cSrcweir public void setDate(String date) { 228cdf0e10cSrcweir this.date = date; 229cdf0e10cSrcweir } 230cdf0e10cSrcweir 231cdf0e10cSrcweir 232cdf0e10cSrcweir } 233