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     */
016    package org.opengion.hayabusa.report;
017    
018    import org.opengion.hayabusa.common.HybsSystem;
019    import org.opengion.hayabusa.db.DBTableModelUtil;
020    import org.opengion.hayabusa.db.DBTableModel;
021    import org.opengion.hayabusa.resource.ResourceFactory;
022    import org.opengion.hayabusa.resource.ResourceManager;
023    import org.opengion.fukurou.util.StringUtil;
024    import org.opengion.fukurou.util.FileUtil;
025    import org.opengion.fukurou.util.ApplicationInfo;
026    import org.opengion.fukurou.db.DBUtil;
027    
028    import java.io.File;
029    
030    /**
031     * ã€ãƒ¬ãƒã?トå?力ã?DBTableModelオブジェクトをレãƒã?ト形å¼ã«è¿”é‚„ã™ã‚‹ã‚¿ã‚°ãƒªãƒ–クラスã§ã™ã?
032     * ã“ã?オブジェクトã«ã€?ãƒ??ã‚¿(DBTableModel)ã¨ã€ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ©(DBTableReport クラス)を与ãˆã¦ã€?
033     * 外部ã‹ã‚‰ã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«ã™ã‚‹ã“ã¨ã§ã€å„種形å¼ã§ ãƒ??ã‚¿(DBTableModel)を表示ã•ã›ã‚‹ã“ã¨ã?
034     * å¯èƒ½ã§ã™ã?
035     *
036     * @og.group 帳票シスãƒ?ƒ 
037     *
038     * @version  4.0
039     * @author   Kazuhiko Hasegawa
040     * @since    JDK5.0,
041     */
042    public class ReportConverter {
043    
044            private static final String CR     = HybsSystem.CR ;
045    
046            private final StringBuilder errMsg = new StringBuilder();
047    
048            // DBTableReport ã«å¯¾ã—ã¦è¨­å®šã™ã‚‹æƒ…å ±
049            private String[]        headerKeys              = null;   // 固定部㮠key 部åˆ?‚’æŒ?®šã™ã‚‹ã?カンマã§è¤?•°æŒ?®šã§ãã‚‹ã€?
050            private String[]        headerVals              = null;   // 固定部㮠key ã«å¯¾å¿œã™ã‚‹å?を指定ã™ã‚‹ã?
051            private String[]        footerKeys              = null;   // 繰り返ã—部ã®çµ‚äº?¾Œã«è¡¨ç¤ºã™ã‚‹ key 部åˆ?‚’æŒ?®šã™ã‚‹ã?カンマã§è¤?•°æŒ?®šã§ãã‚‹ã€?
052            private String[]        footerVals              = null;   // 繰り返ã—部ã®çµ‚äº?¾Œã«è¡¨ç¤ºã™ã‚‹ key ã«å¯¾ã™ã‚‹å€¤ã‚’指定ã™ã‚‹ã?
053            private boolean         pageEndCut              = false;  // ボディー部(繰り返ã—部)ãŒãªããªã£ãŸã¨ãã«ã€ãれ以é™ã?ペã?ジをå?力ã™ã‚‹ã‹æŒ?®šã™ã‚‹ã?
054            private File            templateFile    = null;         // 3.8.0.0 (2005/06/07)
055            private File            firstTemplateFile = null;       // 3.8.0.0 (2005/06/07)
056            private DBTableModel    table           = null;
057            private ResourceManager resource        = null;         // 4.0.0 (2005/01/31)
058    
059            // å—ã‘æ¸¡ã—変数
060            private final String    SYSTEM_ID       ;
061            private final String    YKNO            ;
062            private final String    LISTID          ;
063            private final String    HTML_DIR        ;
064            private final String    LANG            ;
065            private final boolean   DEBUG           ;       // 3.8.5.0 (2006/03/06) ãƒ?ƒãƒ?‚°ç”¨ã®ãƒ•ラグを追åŠ?
066    
067            // GE54 帳票定義マスタ
068            private String          modelDIR        = null;
069            private String          modelFILE       = null;
070            private String          hSQL            = null;
071            private String          fSQL            = null;
072            private String          bSQL            = null;
073            private boolean         fgLOCAL         = false;        // 0:未使用 1:使用 4.0.0 (2005/01/31)
074            private boolean         fgDIRECT        = false;        // 0:未使用 1:使用 4.0.0 (2005/01/31)
075    
076            // GE54 ã®å¸³ç¥¨å®šç¾©æƒ??ã‚’å–å¾—ã™ã‚‹SQLæ–?§ã™ã?
077            // 4.0.0 (2005/01/31) å…±æœ?system_id ã‚’ã?è€??
078            private static final String GE54_SELECT =
079                    "SELECT MODELDIR,MODELFILE,FGCUT,HSQL,FSQL,BSQL,FGLOCAL,FGDIRECT,SYSTEM_ID" +   // 4.0.0 (2005/01/31)
080                    " FROM GE54" +
081                    " WHERE FGJ = '1'" +
082                    " AND  SYSTEM_ID IN (?,'**')" +
083                    " AND  LISTID = ?" ;
084    
085            private static final int GE54_MODELDIR  = 0;
086            private static final int GE54_MODELFILE = 1;
087            private static final int GE54_FGCUT             = 2;
088            private static final int GE54_HSQL              = 3;
089            private static final int GE54_FSQL              = 4;
090            private static final int GE54_BSQL              = 5;
091            private static final int GE54_FGLOCAL   = 6;
092            private static final int GE54_FGDIRECT  = 7;
093            private static final int GE54_SYSTEM_ID = 8;
094    
095            /** コãƒã‚¯ã‚·ãƒ§ãƒ³ã«ã‚¢ãƒ—リケーションæƒ??を追記ã™ã‚‹ã‹ã©ã?‹æŒ?®?*/
096            public static final boolean USE_DB_APPLICATION_INFO  = HybsSystem.sysBool( "USE_DB_APPLICATION_INFO" ) ;
097    
098            // 3.8.7.0 (2006/12/15) アクセスログå–å¾—ã?為,ApplicationInfoオブジェクトを設å®?
099            private final ApplicationInfo appInfo;
100            private final String DBID = HybsSystem.sys( "RESOURCE_DBID" );          // 5.5.5.1 (2012/08/07) リソース系DBID 付ã‘忘れ対å¿?
101    
102            /**
103             * コンストラクター
104             * 引数をå—ã‘ã¨ã£ã¦ã€ã‚¤ãƒ³ã‚¹ã‚¿ãƒ³ã‚¹ã‚’作æ?ã—ã¾ã™ã?
105             *
106             * @og.rev 3.0.0.4 (2003/02/26) FGRUN ã?PRT ã®ã¿ã®ã¨ãã??ŒMODELFILE ã®ã¿ã‚»ãƒ?ƒˆã—ã¦çµ‚äº?™ã‚‹ã?
107             * @og.rev 3.8.0.0 (2005/06/07) FGRUNã¯?Œä½¿ç”¨ã—ãªã?
108             * @og.rev 3.8.7.0 (2006/12/15) アクセスログå–å¾—ã?為,ApplicationInfoオブジェクトを設å®?
109             *
110             * @param system_id シスãƒ?ƒ ID
111             * @param ykno è¦æ±‚番å·
112             * @param listId 帳票ID
113             * @param tempDir 出力ディレクトリ
114             * @param lang è¨?ª?
115             * @param debug ãƒ?ƒãƒ?‚°ãƒ•ラグè¨?ª?
116             */
117            public ReportConverter( final String system_id, final String ykno, final String listId,
118                                                             final String tempDir,final String lang,final boolean debug ) {
119                    SYSTEM_ID       = system_id;
120                    YKNO            = ykno;
121                    LISTID          = listId;
122                    HTML_DIR        = tempDir;
123                    LANG            = lang;
124                    DEBUG           = debug;
125    
126                    // 3.8.7.0 (2006/12/15) アクセスログå–å¾—ã?為,ApplicationInfoオブジェクトを設å®?
127                    if( USE_DB_APPLICATION_INFO ) {
128                            appInfo = new ApplicationInfo();
129                            // ユーザーID,IPアドレス,ホストå
130                            appInfo.setClientInfo( SYSTEM_ID,HybsSystem.HOST_ADRS,HybsSystem.HOST_NAME );
131                            // ç”»é¢ID,æ“ä½?プログラãƒ?D
132                            appInfo.setModuleInfo( "ReportConverter",YKNO,LISTID );
133                    }
134                    else {
135                            appInfo = null;
136                    }
137            }
138    
139            /**
140             * 変æ›å‡¦ç?‚’実行ã—ã¾ã™ã?
141             *
142             * @og.rev 3.0.0.4 (2003/02/26) FGRUN ã?PRT ã®ã¿ã®ã¨ãã??ŒMODELFILE ã®ã¿ã‚»ãƒ?ƒˆã—ã¦çµ‚äº?™ã‚‹ã?
143             * @og.rev 3.5.4.9 (2004/02/25) 存在ãƒã‚§ãƒ?‚¯ã‚¨ãƒ©ãƒ¼(åŽŸå› ä¸æ?)ã®æš«å®šå¯¾å¿?
144             * @og.rev 3.8.0.0 (2005/06/07) initialDataSet() ã‚?ReportProcessing å´ã§å‘¼ã³å‡ºã—ã¾ã™ã?
145             *
146             * @return çµæžœ [true:正常/false:異常]
147             */
148            public boolean execute() {
149                    System.out.print( "ReportConverter Started ... " );
150                    boolean flag = true;
151    
152                    try {
153                            // 雛形ファイルã®ãƒã‚§ãƒ?‚¯
154                            // 3.8.0.0 (2005/06/07) 存在ãƒã‚§ãƒ?‚¯ã¯ã€FileUtil.checkFile ã§è¡Œã†ã€?
155                            if( flag ) {
156                                    System.out.print( "MDL CK," );
157                                    templateFile = FileUtil.checkFile( modelDIR, modelFILE + ".html" );
158                                    flag = ( templateFile != null ) ;               // ãƒã‚§ãƒ?‚¯ã®çµæžœã?null ãªã‚‰ã?見ã¤ã‹ã‚‰ãªã‹ã£ãŸã?
159    
160                                    if( !flag ) {
161                                            errMsg.append( "ModelFile Not Found Error !" ).append( CR );
162                                            errMsg.append( "MODELDIR=" ).append( modelDIR ).append( CR );
163                                            errMsg.append( "MODELFILE=" ).append( modelFILE + ".html" ).append( CR );
164                                    }
165                            }
166    
167                            // ファーストã?ージ雛形ファイルã®ãƒã‚§ãƒ?‚¯(ãªãã¦ã‚‚良ã?
168                            // 3.8.0.0 (2005/06/07) 存在ãƒã‚§ãƒ?‚¯ã¯ã€FileUtil.checkFile ã§è¡Œã†ã€?
169                            if( flag ) {
170                                    // ãƒã‚§ãƒ?‚¯ã¯ã€?¼‘回ã®ã¿è¡Œã†ã€?
171                                    firstTemplateFile = FileUtil.checkFile( modelDIR, modelFILE + "_FIRST.html",1 );
172                            }
173    
174                            // ヘッãƒ?¼Œãƒ•ãƒ?‚¿, ボディー部㮠SQL を実行ã—ã¾ã™ã?
175                            if( flag ) {
176    //                              flag = getHeaderFooter();
177                                    flag = isHeaderFooter();
178                                    if( flag ) { System.out.print( "HF SQL," ); }
179                            }
180    
181                            // 帳票変æ›å‡¦ç?‚’実行ã—ã¾ã™ã?
182                            if( flag ) {
183                                    flag = reportRun();
184                                    if( flag ) { System.out.print( "RPT RUN," ); }
185                            }
186                    }
187                    catch ( RuntimeException ex ) {
188                            errMsg.append( "ReportConverter Execute Exception Error!" ).append( CR );
189                            errMsg.append( "==============================" ).append( CR );
190                            errMsg.append( StringUtil.stringStackTrace( ex ) ) ;
191                            errMsg.append( CR ) ;
192                            flag = false;
193                    }
194    
195                    System.out.println( "End." );
196                    return flag ;
197            }
198    
199            /**
200             * åˆæœŸãƒ??ã‚¿ã‚»ãƒ?ƒˆã‚’行ã„ã¾ã™ã?
201             * ã“ã“ã§ã¯ã€GE54 ãƒ??ブルよりå¿?¦ãªæƒ??ã‚’å–å¾—ã—ã¾ã™ã?
202             *
203             * @og.rev 3.8.0.0 (2005/06/07) initialDataSet() ã‚?ReportProcessing å´ã§å‘¼ã³å‡ºã—ã¾ã™ã?
204             * @og.rev 3.8.7.0 (2006/12/15) アクセスログå–å¾—ã?為,ApplicationInfoオブジェクトを設å®?
205             * @og.rev 4.0.0.0 (2005/01/31) ローカルリソースフラグã¨ãƒ?‚¤ãƒ¬ã‚¯ãƒˆã‚¢ã‚¯ã‚»ã‚¹ãƒ•ラグを追åŠ?
206             * @og.rev 5.5.5.1 (2012/08/07) リソース系DBID 付ã‘忘れ対ç­?
207             *
208             * @return çµæžœ [true:正常/false:異常]
209             */
210            public boolean initialDataSet() {
211                    String[] args = new String[] { SYSTEM_ID,LISTID };
212                    // modeldir,modelfile,fgcut,hsql,fsql,bsql,fglocal,fgdirect,system_id
213    //              String[][] vals = DBUtil.dbExecute( GE54_SELECT,args,appInfo );                         // 3.8.7.0 (2006/12/15)
214                    String[][] vals = DBUtil.dbExecute( GE54_SELECT,args,appInfo, DBID );           // 5.5.5.1 (2012/08/07)
215                    if( vals == null || vals.length == 0 ) {
216                            errMsg.append( "Data does not exist in GE54 table." ).append( CR );
217                            errMsg.append( "==============================" ).append( CR );
218                            errMsg.append( "SYSTEM_ID=[" ).append( SYSTEM_ID ).append( "] , " );
219                            errMsg.append( "LISTID=["    ).append( LISTID    ).append( "]" );
220                            errMsg.append( CR );
221                            return false;
222                    }
223    
224                    int row = 0;
225                    // æ¤œç´¢çµæžœãŒè¤?•°å¸°ã£ãŸã¨ãã?SYSTEM_ID ã?æŒ?®šã•れã¦ã?‚‹æ–¹ã®ãƒ??ã‚¿(è¡?を採用ã™ã‚‹ã€?
226                    for( int i=0; i<vals.length; i++ ) {
227                            if( SYSTEM_ID.equalsIgnoreCase( vals[i][GE54_SYSTEM_ID] ) ) { row = i; break; }
228                    }
229    
230                    modelDIR        = StringUtil.nval( vals[row][GE54_MODELDIR],modelDIR );
231                    modelFILE       = StringUtil.nval( vals[row][GE54_MODELFILE],modelFILE );
232                    pageEndCut      = StringUtil.nval( vals[row][GE54_FGCUT],pageEndCut );  // boolean タイ�
233    
234                    if( DEBUG ) {
235                            System.out.println( "MODELDIR   = [" + modelDIR   + "]" );
236                            System.out.println( "MODELFILE  = [" + modelFILE  + "]" );
237                            System.out.println( "pageEndCut = [" + pageEndCut + "]" );
238                    }
239    
240                    hSQL = StringUtil.nval( vals[row][GE54_HSQL],hSQL );
241                    fSQL = StringUtil.nval( vals[row][GE54_FSQL],fSQL );
242                    bSQL = StringUtil.nval( vals[row][GE54_BSQL],bSQL );
243                    if( bSQL == null || bSQL.length() == 0 ) {
244                            errMsg.append( "Body SQL Columns does not exist in GE54 table." ).append( CR );
245                            errMsg.append( "==============================" ).append( CR );
246                            errMsg.append( "SYSTEM_ID=[" ).append( SYSTEM_ID ).append( "] , " );
247                            errMsg.append( "LISTID=["    ).append( LISTID    ).append( "] " );
248                            errMsg.append( CR );
249                            return false;
250                    }
251    
252                    // 4.0.0 (2005/01/31) ローカルリソースフラグã¨ãƒ?‚¤ãƒ¬ã‚¯ãƒˆã‚¢ã‚¯ã‚»ã‚¹ãƒ•ラグを追åŠ?
253                    fgLOCAL = ( vals[row][GE54_FGLOCAL]  != null && vals[row][GE54_FGLOCAL].trim().equals( "1" ) ) ? true : false ;
254                    fgDIRECT= ( vals[row][GE54_FGDIRECT] != null && vals[row][GE54_FGDIRECT].trim().equals( "1" ) ) ? true : false ;
255    
256                    return true;
257            }
258    
259            /**
260             * ヘッãƒ??フッターæƒ??ã®å–得を行ã„ã¾ã™ã?
261             * GE54 ã® HSQL,FSQL,BSQL ã®ã‚³ãƒžãƒ³ãƒ‰ã‚’実行ã—ã¦ã€ãƒ‡ãƒ¼ã‚¿ã‚’å–å¾—ã—ã¾ã™ã?
262             * ヘッãƒ??æƒ??ã€ãƒ•ãƒ?‚¿ãƒ¼æƒ??ãŒãªãã¦ã‚‚異常ã¨ã¯åˆ¤æ–­ã•れã¾ã›ã‚“ãŒã?
263             * ボディæƒ??ãŒå­˜åœ¨ã—ãªã??åˆã?ã€ã‚¨ãƒ©ãƒ¼ã¨ãªã‚Šã¾ã™ã?
264             *
265             * @og.rev 3.0.0.1 (2003/02/14) ヘッãƒ??ã€ãƒ•ãƒ?‚¿ãƒ¼æƒ??ã?null ã®ã¨ãã?処ç?¿½åŠ??
266             * @og.rev 3.0.1.3 (2003/03/11) 検索時ã?æœ?¤§ä»¶æ•°ã§ã®æ‰“ã¡åˆ?‚Šã‚’エラーã¨ã™ã‚‹ã€?
267             * @og.rev 3.8.7.0 (2006/12/15) アクセスログå–å¾—ã?為,ApplicationInfoオブジェクトを設å®?
268             * @og.rev 4.0.0.0 (2005/01/31) lang â‡?ResourceManager ã¸å¤‰æ›´ , メソãƒ?ƒ‰å変更
269             *
270             * @return çµæžœ [true:正常/false:異常]
271             */
272    //      private boolean getHeaderFooter() {
273            private boolean isHeaderFooter() {
274                    // 4.0.0 (2005/01/31) FGLOCAL æŒ?®šæ™‚ã¯ã€SYSTEM_ID を指定ã—ã¦ãƒªã‚½ãƒ¼ã‚¹ä½œæ?
275                    if( fgLOCAL ) {
276                            // ローカルリソースæŒ?®šæ™‚ã¯ã€SYSTEM_ID,LANG を使用ã—ã¾ã™ã?先読ã¿ã¯ã€ä½¿ç”¨ã—ã¾ã›ã‚“ã€?
277                            resource = ResourceFactory.newInstance( SYSTEM_ID,LANG,false ); // 4.0.0 (2005/01/31)
278                    }
279                    else {
280                            // 従æ¥ã¨äº’æ›æ€§ã®ã‚るモーãƒ?ローカルリソースã¯ä½¿ç”¨ã—ãªã??
281                            resource = ResourceFactory.newInstance( LANG ); // 4.0.0 (2005/01/31)
282                    }
283    
284                    // 4.0.0 (2005/01/31) FGDIRECT æŒ?®šæ™‚ã¯ã€where æ¡ä»¶ã¯ã€null ã«ãªã‚Šã¾ã™ã?
285                    String[] where = ( fgDIRECT ) ? null : new String[] { SYSTEM_ID , YKNO } ;
286    
287                    // ヘッãƒ??æƒ??ã®å–å¾?
288                    DBTableModel header = DBTableModelUtil.makeDBTable( hSQL, where, resource, appInfo );           // 3.8.7.0 (2006/12/15)
289                    if( header != null && header.getRowCount() > 0 ) {
290                            headerKeys              = header.getNames();
291                            Object[] obj    = header.getValues(0);
292                            headerVals              = new String[obj.length];
293                            for( int i=0; i<obj.length; i++ ) {
294                                    headerVals[i] = obj[i].toString().trim();
295                            }
296                    }
297    
298                    // フッターæƒ??ã®å–å¾?
299                    DBTableModel footer = DBTableModelUtil.makeDBTable( fSQL, where, resource ,appInfo );           // 3.8.7.0 (2006/12/15)
300                    if( footer != null && footer.getRowCount() > 0 ) {
301                            footerKeys              = footer.getNames();
302                            Object[] obj    = footer.getValues(0);
303                            footerVals              = new String[obj.length];
304                            for( int i=0; i<obj.length; i++ ) {
305                                    footerVals[i] = obj[i].toString().trim();
306                            }
307                    }
308    
309                    // ボディーæƒ??ã®å–å¾?
310                    table = DBTableModelUtil.makeDBTable( bSQL, where, resource ,appInfo );         // 3.8.7.0 (2006/12/15)
311                    if( table.getRowCount() <= 0 ) {
312                            errMsg.append( "Database Body row count is Zero." ).append( CR );
313                            errMsg.append( "==============================" ).append( CR );
314                            errMsg.append( bSQL );
315                            errMsg.append( CR );
316                            return false;
317                    }
318                    // 3.0.1.3 (2003/03/11) 検索時ã?æœ?¤§ä»¶æ•°ã§ã®æ‰“ã¡åˆ?‚Šã‚’エラーã¨ã™ã‚‹ã€?
319                    if( table.isOverflow() ) {
320                            errMsg.append( "Database is Overflow. [" );
321                            errMsg.append( table.getRowCount() );
322                            errMsg.append( "]" ).append( CR ).append( CR );
323                            errMsg.append( "==============================" ).append( CR );
324                            errMsg.append( "Check SystemParameter Data in DB_MAX_ROW_COUNT Overflow" );
325                            errMsg.append( CR );
326                            return false;
327                    }
328    
329                    return true;
330            }
331    
332            /**
333             * 実際ã®ãƒ¬ãƒã?ト変æ›å‡¦ç?‚’行ã„ã¾ã™ã?
334             *
335             * @og.rev 3.5.4.3 (2004/01/05) HTMLDBTableReport ã®ã‚¯ãƒ©ã‚¹å変更ã€?
336             * @og.rev 3.6.0.0 (2004/09/17) メソãƒ?ƒ‰åã?変更。setInputFile â‡?setTemplateFile
337             * @og.rev 3.6.1.0 (2005/01/05) 帳票?©?¤(LISTID)ã‚’ã‚»ãƒ?ƒˆã—ã¾ã™ã?
338             * @og.rev 3.8.5.1 (2006/04/28) setOutputFileKey ã®ä»£ã‚りã«ã€setYkno を使用ã—ã¾ã™ã?
339             * @og.rev 4.0.0.0 (2005/01/31) lang â‡?ResourceManager ã¸å¤‰æ›´
340             *
341             * @return çµæžœ [true:正常/false:異常]
342             */
343            private boolean reportRun() {
344                    DBTableReport report = new DBTableReport_HTML();
345    
346                    report.setDBTableModel( table );
347                    report.setTemplateFile( templateFile );                         // 3.6.0.0 (2004/09/17)
348                    report.setFirstTemplateFile( firstTemplateFile );       // 3.6.0.0 (2004/09/17)
349                    report.setOutputDir( HTML_DIR );
350                    report.setOutputFileKey( YKNO );        // è¦æ±‚番å·ã‚’ファイルåã¨ã—ã¦ä½¿ç”¨ã—ã¾ã™ã?
351                    report.setYkno( YKNO );                                                         // 3.8.5.1 (2006/04/28)
352                    report.setHeaderKeys( headerKeys );
353                    report.setHeaderVals( headerVals );
354                    report.setFooterKeys( footerKeys );
355                    report.setFooterVals( footerVals );
356                    report.setPageEndCut( pageEndCut );
357                    report.setResourceManager( resource );          // 4.0.0 (2005/01/31)
358                    report.setListId( LISTID );             // 3.6.1.0 (2005/01/05)
359                    report.writeReport();
360    
361                    return true;
362            }
363    
364            /**
365             * modelFILE ã‚’è¿”ã—ã¾ã™ã?
366             *
367             * @return modelFILEå?
368             */
369            public String modelFile() {
370                    return modelFILE ;
371            }
372    
373            /**
374             * エラーãŒå­˜åœ¨ã—ãŸå ´åˆã«ã€ã‚¨ãƒ©ãƒ¼ãƒ¡ãƒ?‚»ãƒ¼ã‚¸ã‚’è¿”ã—ã¾ã™ã?
375             *
376             * @return エラーメãƒ?‚»ãƒ¼ã‚¸ String
377             */
378            public String getErrMsg() {
379                    return errMsg.toString();
380            }
381    }