- 更新日時:
- 2014/01/30 15:00:30 (11 年 前)
- ファイル:
-
- 1 変更
凡例:
- 変更なし
- 追加
- 削除
-
BH13SPARQLBuilder/src/org/biohackathon/SPARQLBuilder/OWL/Label.java
r10 r19 5 5 private String label = null; 6 6 private String language = null; 7 8 9 public Label(String label, String language){ 7 8 public boolean equals(Object oLabel) { 9 if( oLabel == null ){ 10 return false; 11 } 12 Label loLabel = (Label) oLabel; 13 if (label != null) { 14 if (!label.equals(loLabel.getLabel())) { 15 return false; 16 } 17 } else { 18 if (loLabel.getLabel() != null) { 19 return false; 20 } 21 } 22 23 if (language != null) { 24 return language.equals(loLabel.getLanguage()); 25 } else { 26 return loLabel.getLanguage() == null; 27 } 28 } 29 30 public Label(String label, String language) { 10 31 this.label = label; 11 32 this.language = language; 12 33 } 13 14 34 15 35 public String getLabel() { … … 17 37 } 18 38 19 20 39 public void setLabel(String label) { 21 40 this.label = label; 22 41 } 23 24 42 25 43 public String getLanguage() { … … 27 45 } 28 46 29 30 47 public void setLanguage(String language) { 31 48 this.language = language; 32 49 } 33 50 34 public String toString() {51 public String toString() { 35 52 StringBuffer sb = new StringBuffer(); 36 53 sb.append("\""); 37 if ( label != null ){54 if (label != null) { 38 55 sb.append(label); 39 56 } 40 57 sb.append("\""); 41 if ( language != null ){58 if (language != null) { 42 59 sb.append("@"); 43 60 sb.append(language);