001/* 002 * Copyright (c) 2009 The openGion Project. 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 013 * either express or implied. See the License for the specific language 014 * governing permissions and limitations under the License. 015 */ 016package org.opengion.hayabusa.resource; 017 018import org.opengion.fukurou.util.StringUtil ; 019import org.opengion.hayabusa.common.HybsSystemException; // 6.4.7.0 (2016/06/03) 020 021import static org.opengion.fukurou.system.HybsConst.BUFFER_MIDDLE; // 6.1.0.0 (2014/12/26) refactoring 022import static org.opengion.fukurou.system.HybsConst.CR ; // 6.1.0.0 (2014/12/26) 023 024import java.text.MessageFormat; 025import java.util.Arrays; // 6.4.7.0 (2016/06/03) 026 027/** 028 * systemId , lang に対応したラベルデータを作成します。 029 * 030 * ラベルデータは、項目(CLM)に対して、各種ラベル情報を持っています。 031 * 従来のラベルは、表示名称として、一種類しか持っていませんでしたが、 032 * ラベルデータは、3種類の名称と、1種類の概要を持っています。 033 * 034 * label : 名称(長) 従来のラベルと同じで定義された文字そのものです。 035 * shortLabel : 名称(HTML短) 概要説明をバルーン表示する短い名称です。 036 * longLabel : 名称(HTML長) 概要説明をバルーン表示する長い名称です。 037 * description : 概要説明 カラムの説明やバルーンに使用します。 038 * 039 * 名称(HTML長)は、従来の表示名称にあたります。これは、一般的なラベルとして 040 * 使用されます。名称(HTML短)は、テーブル一覧のヘッダーの様に、特殊なケースで、 041 * 簡略化された名称を使用するときに利用されます。この切り替えは、自動で判断されます。 042 * 名称(HTML短)に、なにも設定されていない場合は、名称(HTML長)が自動的に使用されますので 043 * 初期データ移行時には、そのまま、通常時もテーブルヘッダー時も同じ文字列が 044 * 使用されます。 045 * ただし、一覧表示のうち、EXCEL出力などのデータには、名称(長)が使用されます。 046 * これは、名称(HTML短)や名称(HTML長)は、Tips表示を行う為のHTML構文を採用している為 047 * テキスト等に出力するには不適切だからです。また、EXCEL等のツールでは、ラベル名が 048 * 長くてもセル幅等で調整できる為、簡略化された名称よりも正式名称で出力します。 049 * 050 * ラベルデータを作成する場合は、同一ラベルで、作成区分(KBSAKU)違いの場合は、 051 * 最も大きな作成区分を持つコードを使用します。 052 * 作成区分(KBSAKU)は、0:システム予約、1:アプリ設定、2:ユーザー設定 という具合に 053 * カスタマイズの度合いに応じて大きな数字を割り当てることで、キー情報を上書き修正 054 * することが可能になります。(削除することは出来ません。) 055 * 056 * @og.rev 4.0.0.0 (2004/12/31) 新規作成 057 * @og.group リソース管理 058 * 059 * @version 4.0 060 * @author Kazuhiko Hasegawa 061 * @since JDK5.0, 062 */ 063public final class LabelData implements LabelInterface { 064 065 /** 内部データのカラム番号 {@value} */ 066 public static final int CLM = 0 ; 067 /** 内部データのカラム番号 {@value} */ 068 public static final int SNAME = 1 ; 069 /** 内部データのカラム番号 {@value} */ 070 public static final int LNAME = 2 ; 071 /** 内部データのカラム番号 {@value} */ 072 public static final int DESCRIPTION = 3 ; 073// /** 内部データのカラム数 {@value} */ 074// public static final int DATA_SIZE = 4 ; // 7.2.6.0 (2020/06/30) 未使用なので削除 075 076 /** リソース読み込みのために一時利用 4.3.5.7 (2009/03/22) */ 077 /* default */ static final int FG_LOAD = 4 ; 078 /** FGLOAD の読み込み済み設定用のUNIQ 6.3.1.1 (2015/07/10) */ 079 /* default */ static final int UNIQ = 5 ; 080 /** FGLOAD の読み込み済み設定用のSYSTEM_ID 6.3.1.1 (2015/07/10) */ 081 /* default */ static final int SYSTEM_ID = 6 ; 082 083 /** 内部データのカラム番号 {@value} */ 084 public static final int SNO = 7 ; // 7.2.6.1 (2020/07/17) 内部的に使ってないが定義しておく 085 086 private final String key ; // 項目 087 private final String label ; // 名称(長) 088 private final String shortLabel ; // 名称(HTML短) 089 private final String longLabel ; // 名称(HTML長) 090 private final String description ; // 概要説明 091 private final boolean official ; // リソースDBから作成されたかどうか 092// private final boolean isFormat ; // メッセージフォーマット対象かどうか 4.0.0.0 (2007/10/17) 7.1.0.1 (2020/02/07) 長,短,概要などあるため、直前にチェック 093 private final String rawShortLabel; // 名称(未変換短) 4.3.8.0 (2009/08/01) 094// private final boolean isFormatDesc; // 概要がフォーマット対象か 4.3.7.6 (2009/07/15) 7.1.0.1 (2020/02/07) 未使用 095 private final String rawLongLabel; // 名称(未変換長) 5.6.8.2 (2013/09/20) 096 097 /** 098 * null LabelData オブジェクトを作成します。 099 * このオブジェクトは、DBリソース上に存在しない場合に使用される 100 * null 情報を表す、LabelData オブジェクトです。 101 * 102 * @og.rev 5.6.8.2 (2013/09/20) rawLongLabel対応 103 * @og.rev 5.7.3.0 (2014/02/07) public に格上げします。 104 * @og.rev 7.0.1.5 (2018/12/10) 名前とラベルだけ異なるLabelDataオブジェクトを作成します。 105 * 106 * @param inkey キー情報 107 */ 108 public LabelData( final String inkey ) { 109 this( inkey,inkey ); 110// key = inkey.intern() ; 111// label = key ; // 名称(長) 112// shortLabel = key ; // 名称(HTML短) 113// longLabel = key ; // 名称(HTML長) 114// description = "" ; // 概要説明 115// official = false; // 非正式 116// isFormat = false; // 非フォーマット 4.0.0.0 (2007/10/17) 117// rawShortLabel = key; // 名称(未変換短) 4.3.8.0 (2009/08/01) 118// isFormatDesc = false; // 概要フォーマット 4.3.7.6 (2009/07/15) 119// rawLongLabel = key; // 名称(未変換長)5.6.8.2 (2013/09/20) 120 } 121 122 /** 123 * 名前とラベルだけ異なるLabelDataオブジェクトを作成します。 124 * 125 * これは、ラベルを簡易的に利用する場合に使用する、LabelData オブジェクトです。 126 * 127 * @og.rev 7.0.1.5 (2018/12/10) 名前とラベルだけ異なるLabelDataオブジェクトを作成します。 128 * @og.rev 7.1.0.1 (2020/02/07) isFormat、isFormatDescは、長,短,概要などあるため、直前にチェックするので廃止。 129 * 130 * @param inkey キー情報 131 * @param inLbl ラベル 132 */ 133 public LabelData( final String inkey,final String inLbl ) { 134 key = inkey.intern() ; 135 label = inLbl ; // 名称(長) …(not null) 136 shortLabel = inLbl ; // 名称(HTML短) 137 longLabel = inLbl ; // 名称(HTML長) 138 description = "" ; // 概要説明 139 official = false; // 非正式 140// isFormat = false; // 非フォーマット 4.0.0.0 (2007/10/17) 7.1.0.1 (2020/02/07) 廃止 141 rawShortLabel = inLbl; // 名称(未変換短) 4.3.8.0 (2009/08/01) 142// isFormatDesc = false; // 概要フォーマット 4.3.7.6 (2009/07/15) 7.1.0.1 (2020/02/07) 廃止 143 rawLongLabel = inLbl; // 名称(未変換長)5.6.8.2 (2013/09/20) 144 } 145 146 /** 147 * 配列文字列のデータを元に、LabelDataオブジェクトを構築します。 148 * このコンストラクタは、他のパッケージから呼び出せないように、 149 * パッケージプライベートにしておきます。 150 * このコンストラクタは、DBリソースファイルを想定しています。 151 * 152 * @og.rev 5.4.0.1 (2011/11/01) SNAME、概要説明、rawShortLabel 関係の処理を修正 153 * @og.rev 5.6.8.2 (2013/09/20) rawLongLabel対応 154 * @og.rev 6.2.2.0 (2015/03/27) BRと\nを相互に変換する処理を追加 155 * @og.rev 6.2.2.3 (2015/04/10) htmlフィルターに、BR→改行処理機能を追加。 156 * @og.rev 6.3.9.0 (2015/11/06) StringUtil.yenN2br は、null を返しません。 157 * @og.rev 7.1.0.1 (2020/02/07) isFormat、isFormatDescは、長,短,概要などあるため、直前にチェックするので廃止。 158 * @og.rev 7.2.9.0 (2020/10/12) rawShortLabelは、DB検索未設定の場合は、nullなので、初期値指定を行う。 159 * 160 * @param data CLM,SNAME,LNAME,DESCRIPTION 161 */ 162 LabelData( final String[] data ) { 163 key = data[CLM].intern() ; // 項目 164 label = StringUtil.yenN2br( data[LNAME] ) ; // 6.2.2.3 (2015/04/10) 名称(HTML長) 165 description = StringUtil.yenN2br( data[DESCRIPTION] ) ; // 6.2.2.3 (2015/04/10) 概要説明 166 official = true; // 正式 167// isFormat = label.indexOf( '{' ) >= 0 ; // 4.0.0.0 (2007/10/17) 168 String title = null; 169 170 rawLongLabel = label; // 名称(未変換長)5.6.8.2 (2013/09/20) 171 if( description.isEmpty() ) { // 6.3.9.0 (2015/11/06) StringUtil.yenN2br は、null を返しません。 172// isFormatDesc = false; 173 // 5.4.0.1 (2011/11/01) title と label が間違っている。(SNAME が存在する場合) 174 title = StringUtil.htmlFilter( label,true ) ; // 6.2.2.0 (2015/03/27) 175 176 // 概要説明がない場合は、そのままラベルを使用する。 177 longLabel = label; 178 } 179 else { 180// isFormatDesc = description.indexOf( '{' ) >= 0 ; // 5.1.8.0 (2010/07/01) nullポインタの参照外し対策 181 title = StringUtil.htmlFilter( description,true ) ; // 6.2.2.0 (2015/03/27) 182 183 // 概要説明がある場合は、ツールチップにDESCRIPTIONを表示する。 184 longLabel = "<span title=\"" 185 + title 186 + "\">" 187 + label 188 + "</span>" ; 189 } 190 191 final String sname = data[SNAME]; // 名称(HTML短) 192 if( sname == null || sname.isEmpty() ) { 193 // SNAME がない場合は、longLabel を使用する。 194 shortLabel = longLabel; 195// rawShortLabel = label; // 5.4.0.1 (2011/11/01) longLabel を使うと、ツールチップが加味されるため。 196 rawShortLabel = null; // 7.2.9.0 (2020/10/12) 197 } 198 else { 199 // SNAME が存在する場合、ツールチップにdescriptionかlabelを使用する。 200 shortLabel = "<span title=\"" 201 + title 202 + "\">" 203 + sname 204 + "</span>" ; 205 rawShortLabel = sname; // 4.3.8.0 (2009/08/01) 206 } 207 } 208 209 /** 210 * ラベルオブジェクトのキーを返します。 211 * 212 * @return ラベルオブジェクトのキー 213 */ 214 public String getKey() { return key; } 215 216 /** 217 * ラベルオブジェクトの名称を返します。 218 * これは、DB上の LNAME(名称(長))に該当します。 219 * 220 * @return ラベルオブジェクトの名称(短) 221 */ 222 public String getLabel() { return label; } 223 224 /** 225 * ラベルオブジェクトの名称(短)を返します。 226 * 概要説明がない場合でかつDB上のSNAMEが未設定の場合は、 227 * LNAME が返されます。SNAMEが設定されている場合は、 228 * ツールチップにLNAME が表示されます。 229 * 概要説明が存在する場合は、ツールチップに概要説明が 230 * 表示されます。 231 * 232 * @return ラベルオブジェクトの名称(短) 233 */ 234 public String getShortLabel() { return shortLabel; } 235 236 /** 237 * ラベルオブジェクトの名称(長)を返します。 238 * 概要説明が存在する場合は、ツールチップに概要説明が 239 * 表示されます。 240 * 241 * @return ラベルオブジェクトの名称(長) 242 * @see #getLongLabel( String ) 243 */ 244 public String getLongLabel() { return longLabel; } 245 246 /** 247 * ラベルインターフェースの名称(長)を返します。 248 * ツールチップに表示するタイトル属性(概要説明)を置き換えます。 249 * null の場合は、既存のgetLongLabel()を返します。 250 * 251 * @og.rev 6.2.2.0 (2015/03/27) BRと\nを相互に変換する処理を追加 252 * @og.rev 6.2.2.3 (2015/04/10) htmlフィルターに、BR→改行処理機能を追加。 253 * 254 * @param title ツールチップに表示するタイトル属性 255 * 256 * @return ラベルインターフェースの名称(長) 257 * @see #getLongLabel() 258 */ 259 public String getLongLabel( final String title ) { 260 final String tipsLabel ; 261 if( title == null ) { 262 tipsLabel = longLabel; 263 } 264 else { 265 tipsLabel = "<span title=\"" 266 + StringUtil.htmlFilter( title,true ) // 6.2.2.3 (2015/04/10) 267 + "\">" 268 + label 269 + "</span>" ; 270 } 271 return tipsLabel ; 272 } 273 274 /** 275 * ラベルインターフェースの引数付きメッセージを返します。 276 * メッセージの引数部分に、文字列配列を適用して、MessageFormat 277 * で変換した結果を返します。(MessageData でのみ有効です。) 278 * 279 * @og.rev 4.0.0.0 (2007/10/17) メッセージリソース統合に伴い、MessageDataより移行 280 * @og.rev 4.3.8.0 (2009/08/01) 引数にHTMLサニタイジング処理 281 * @og.rev 5.0.0.2 (2009/09/15) サニタイジング処理をやめる 282 * @og.rev 6.4.3.4 (2016/03/11) ラベル {n} が存在しない場合は、引数を連結せず、元のラベルを返す。 283 * @og.rev 6.4.5.0 (2016/04/08) リソースから作成された場合は、引数を連結せず、そうでない場合は連結します。 284 * @og.rev 6.4.7.0 (2016/06/03) IllegalArgumentException が発生した場合に、見えるようにする。 285 * @og.rev 7.0.7.0 (2019/12/13) #getMessage(String...) , #getDescription(String...) , #getShortMessage(String...) を統合します。 286 * @og.rev 7.1.0.1 (2020/02/07) isFormat、isFormatDescは、長,短,概要などあるため、直前にチェックするので廃止。 287 * 288 * @param lbl メッセージを作成する元となるラベル文字列 289 * @param vals メッセージ引数の文字列配列(可変長引数) 290 * 291 * @return ラベルインターフェースの引数付きメッセージ 292 */ 293// public String getMessage( final String... vals ) { // 6.1.1.0 (2015/01/17) 可変長引数でもnullは来る。 294 private String getMessage( final String lbl , final String[] vals ) { 295 final String rtn ; 296 297 final String[] args = ( vals == null ) ? new String[0] : vals ; 298 final boolean isFormat = lbl != null && lbl.indexOf( '{' ) >= 0 ; // 7.1.0.1 (2020/02/07) 299 if( isFormat ) { 300 // 6.4.7.0 (2016/06/03) IllegalArgumentException が発生した場合に、見えるようにする。 301 try { 302// rtn = MessageFormat.format( label,(Object[])args ); 303 rtn = MessageFormat.format( lbl,(Object[])args ); 304 } 305 catch( final IllegalArgumentException ex ) { 306 final String errMsg = "MessageFormatエラー:" 307 + " Key [" + key + "]" 308// + " Pattern [" + label + "]" 309 + " Pattern [" + lbl + "]" 310 + " Arguments [" + Arrays.toString( (Object[])args ) + "]" ; 311 throw new HybsSystemException( errMsg,ex ); 312 } 313 } 314 else { 315 // 6.4.5.0 (2016/04/08) リソースから作成された場合は、引数を連結せず、そうでない場合は連結します。 316 if( official ) { 317// rtn = label ; // 6.4.3.4 (2016/03/11) 318 rtn = lbl ; // 6.4.3.4 (2016/03/11) 319 } 320 else { 321 final StringBuilder buf = new StringBuilder( BUFFER_MIDDLE ) 322// .append( label ); 323 .append( lbl ); 324 for( final String val : args ) { 325// if( val != null && ! val.equals( label ) ) { 326 if( val != null && ! val.equals( lbl ) ) { 327 buf.append( ' ' ).append( val ); // 6.0.2.5 (2014/10/31) char を append する。 328 } 329 } 330 rtn = buf.toString(); 331 } 332 } 333 return rtn ; 334 } 335 336 /** 337 * ラベルインターフェースの引数付きメッセージを返します。 338 * メッセージの引数部分に、文字列配列を適用して、MessageFormat 339 * で変換した結果を返します。(MessageData でのみ有効です。) 340 * 341 * @og.rev 4.0.0.0 (2007/10/17) メッセージリソース統合に伴い、MessageDataより移行 342 * @og.rev 4.3.8.0 (2009/08/01) 引数にHTMLサニタイジング処理 343 * @og.rev 5.0.0.2 (2009/09/15) サニタイジング処理をやめる 344 * @og.rev 6.4.3.4 (2016/03/11) ラベル {n} が存在しない場合は、引数を連結せず、元のラベルを返す。 345 * @og.rev 6.4.5.0 (2016/04/08) リソースから作成された場合は、引数を連結せず、そうでない場合は連結します。 346 * @og.rev 6.4.7.0 (2016/06/03) IllegalArgumentException が発生した場合に、見えるようにする。 347 * @og.rev 7.0.7.0 (2019/12/13) #getMessage(String...) , #getDescription(String...) , #getShortMessage(String...) を統合します。 348 * 349 * @param vals メッセージ引数の文字列配列(可変長引数) 350 * 351 * @return ラベルインターフェースの引数付きメッセージ 352 */ 353 public String getMessage( final String... vals ) { // 6.1.1.0 (2015/01/17) 可変長引数でもnullは来る。 354 return getMessage( label,vals ); 355 356// final String rtn ; 357// 358// final String[] args = ( vals == null ) ? new String[0] : vals ; 359// if( isFormat ) { 360// // 6.4.7.0 (2016/06/03) IllegalArgumentException が発生した場合に、見えるようにする。 361// try { 362// rtn = MessageFormat.format( label,(Object[])args ); 363// } 364// catch( final IllegalArgumentException ex ) { 365// final String errMsg = "MessageFormatエラー:" 366// + " Key [" + key + "]" 367// + " Pattern [" + label + "]" 368// + " Arguments [" + Arrays.toString( (Object[])args ) + "]" ; 369// throw new HybsSystemException( errMsg,ex ); 370// } 371// } 372// else { 373// // 6.4.5.0 (2016/04/08) リソースから作成された場合は、引数を連結せず、そうでない場合は連結します。 374// if( official ) { 375// rtn = label ; // 6.4.3.4 (2016/03/11) 376// } 377// else { 378// final StringBuilder buf = new StringBuilder( BUFFER_MIDDLE ) 379// .append( label ); 380// for( final String val : args ) { 381// if( val != null && ! val.equals( label ) ) { 382// buf.append( ' ' ).append( val ); // 6.0.2.5 (2014/10/31) char を append する。 383// } 384// } 385// rtn = buf.toString(); 386// } 387// } 388// return rtn ; 389 } 390 391 /** 392 * ラベルオブジェクトの概要説明を返します。 393 * 概要説明が存在する場合は、ラベルのツールチップに 394 * 概要説明が表示されます。 395 * 396 * @return ラベルオブジェクトの概要説明 397 */ 398 public String getDescription() { return description; } 399 400 /** 401 * ラベルオブジェクトの概要説明を返します。 402 * このメソッドでは{0},{1}...をパラメータで置換します。 403 * 404 * @og.rev 4.3.7.6 (2009/07/15) 新規作成 405 * @og.rev 4.3.8.0 (2009/08/01) 引数にHTMLサニタイジング処理 406 * @og.rev 5.0.0.2 (2009/09/15) サニタイジング処理をやめる 407 * @og.rev 5.4.0.1 (2011/11/01) {}が存在しない場合は単に概要を出力 408 * @og.rev 6.4.7.0 (2016/06/03) IllegalArgumentException が発生した場合に、見えるようにする。 409 * @og.rev 7.0.7.0 (2019/12/13) #getMessage(String...) , #getDescription(String...) , #getShortMessage(String...) を統合します。 410 * 411 * @param vals メッセージ引数の文字列配列(可変長引数) 412 * 413 * @return ラベルオブジェクトの概要説明 414 */ 415 public String getDescription( final String... vals ) { // 6.1.1.0 (2015/01/17) 可変長引数でもnullは来る。 416 return getMessage( description,vals ); 417 418// final String rtn ; 419// 420// // 6.1.1.0 (2015/01/17) 可変長引数でもnullは来る。 421// final String[] args = ( vals == null ) ? new String[0] : vals ; 422// if( isFormatDesc ) { 423// // 6.4.7.0 (2016/06/03) IllegalArgumentException が発生した場合に、見えるようにする。 424// try { 425// rtn = MessageFormat.format( description,(Object[])args ); 426// } 427// catch( final IllegalArgumentException ex ) { 428// final String errMsg = "MessageFormatエラー:" 429// + " Key [" + key + "]" 430// + " Pattern [" + description + "]" 431// + " Arguments [" + Arrays.toString( (Object[])args ) + "]" ; 432// throw new HybsSystemException( errMsg,ex ); 433// } 434// } 435// else { 436// // 5.4.0.1 (2011/11/01) {}が存在しない場合は単に概要を出力 ・・・ なら、直接セットに変更 437// rtn = description; 438// } 439// return rtn ; 440 } 441 442 /** 443 * ラベルオブジェクトの名称(未変換短)を返します。 444 * このメソッドでは{0},{1}...をパラメータで置換します。 445 * 446 * @og.rev 7.0.7.0 (2019/12/13) #getMessage(String...) , #getDescription(String...) , #getShortMessage(String...) を統合します。 447 * @og.rev 7.2.9.0 (2020/10/12) rawShortLabelは、DB検索未設定の場合は、nullなので、初期値指定を行う。 448 * 449 * @param vals メッセージ引数の文字列配列(可変長引数) 450 * 451 * @return ラベルインターフェースの名前(短) 452 */ 453 public String getShortMessage( final String... vals ) { 454 final String slbl = rawShortLabel == null ? label : rawShortLabel ; // 7.2.9.0 (2020/10/12) 455// return getMessage( rawShortLabel,vals ); 456 return getMessage( slbl,vals ); 457 } 458 459 /** 460 * リソースDBから作成されたかどうかを返します。 461 * 正式な場合は、true / リソースになく、独自に作成された場合は、false になります。 462 * 463 * @return リソースDBから作成されたかどうか 464 */ 465 public boolean isOfficial() { return official; } 466 467 /** 468 * ラベルオブジェクトの名称(長)をそのままの形で返します。 469 * (discription等を付けない) 470 * 471 * @og.rev 5.6.8.2 (2009/08/01) 追加 472 * 473 * @return ラベルオブジェクトの名称(長)そのままの状態 474 * @og.rtnNotNull 475 */ 476 public String getRawLongLabel() { return rawLongLabel; } 477 478 /** 479 * ラベルオブジェクトの名称(短)をspanタグを付けない状態で返します。 480 * SNAMEが未設定の場合は、LNAME が返されます。 481 * 482 * @og.rev 4.3.8.0 (2009/08/01) 追加 483 * @og.rev 7.2.9.0 (2020/10/12) rawShortLabelは、DB検索未設定の場合は、nullなので、初期値指定を行う。 484 * 485 * @return ラベルオブジェクトの名称(短)にspanタグを付けない状態 486 * @og.rtnNotNull 487 */ 488 public String getRawShortLabel() { 489// return rawShortLabel; 490 return getRawShortLabel( label ); // 7.2.9.0 (2020/10/12) 491 } 492 493 /** 494 * ラベルオブジェクトの名称(短)をspanタグを付けない状態で返します。 495 * SNAMEが未設定の場合は、LNAME が返されます。 496 * 497 * @og.rev 7.2.9.0 (2020/10/12) rawShortLabelは、DB検索未設定の場合は、nullなので、初期値指定を行う。 498 * 499 * @param defVal 名称(短)がnullの場合の初期値 500 * 501 * @return ラベルオブジェクトの名称(短)にspanタグを付けない状態 502 */ 503 public String getRawShortLabel( final String defVal ) { 504 return rawShortLabel == null ? defVal : rawShortLabel ; 505 } 506 507 /** 508 * オブジェクトの識別子として,詳細なユーザー情報を返します。 509 * 510 * @return 詳細なユーザー情報 511 * @og.rtnNotNull 512 */ 513 @Override 514 public String toString() { 515 final StringBuilder rtn = new StringBuilder( BUFFER_MIDDLE ) 516 .append( "CLM :" ).append( key ) 517 .append( " SNAME :" ).append( shortLabel ) 518 .append( " LNAME :" ).append( longLabel ) 519 .append( " DESCRIPTION :" ).append( description ).append( CR ); 520 return rtn.toString(); 521 } 522}