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.resource;
017    
018    import java.util.Calendar;
019    
020    /**
021     * カレンãƒ?ƒ‡ータインターフェースですã?
022     *
023     * カレンãƒ?ƒ‡ータはã€?¼¤?¢またã?標準ã?カレンãƒ?‚ˆり休日を求めることができますã?
024     *
025     * @og.rev 3.6.0.0 (2004/09/17) 新規作æ?
026     * @og.group リソース管ç�?
027     *
028     * @version  4.0
029     * @author   Kazuhiko Hasegawa
030     * @since    JDK5.0,
031     */
032    public interface CalendarData {
033    
034            /**
035             * æŒ?®šã?日付けがã?休日かどã�?�‹を返しますã?
036             * æŒ?®šã?日付けがã?キャãƒ?‚·ュしてã�?‚‹ãƒ??タのæœ?¤§とæœ?°�ã?間に
037             * 存在しなã�??合ã?、エラーとしますã?
038             *
039             * @param       day     æŒ?®šã?日付け
040             *
041             * @return      休日?štrue それ以外:false
042             *
043             */
044            boolean isHoliday( Calendar day ) ;
045    
046            /**
047             * æŒ?®šã?日付けから、ç¯?›²の間に、本日を含ã‚?�‹どã�?�‹を返しますã?
048             * æŒ?®šã?日付けがã?キャãƒ?‚·ュしてã�?‚‹ãƒ??タのæœ?¤§とæœ?°�ã?間に
049             * 存在しなã�??合ã?、常に false になりますã?
050             * 判定ã?、年月日のé ?›®のみで比è¼?�—、時åˆ?§’ã?無視しますã?
051             *
052             * @og.rev 3.7.1.1 (2005/05/31) 新規追åŠ?
053             *
054             * @param       day             æŒ?®šã?開始日付け
055             * @param       scope   ç¯?›²の日数
056             *
057             * @return      本日?štrue それ以外:false
058             */
059            boolean isContainedToday( Calendar day,int scope ) ;
060    
061            /**
062             * æŒ?®šã?開始ã?終äº?—¥の期間に、平日(稼働日)が何日あるか求めますã?
063             * start と end がã?リストç¯?›²外ã?場合ã?、エラーとしますã?
064             * 開始と終äº?�Œ同じ日の場合ã?ã€?¼‘を返しますã?
065             *
066             * @param       start   開始日付け(稼働日に含めまã�?
067             * @param       end             終äº?—¥付け(稼働日に含めまã�?
068             *
069             * @return      稼働日数
070             *
071             */
072            int getKadoubisu( Calendar start,Calendar end ) ;
073    
074            /**
075             * æŒ?®šã?開始日に平日のみ期間を加算して求められる日付けを返しますã?
076             * これは、実稼働日計算に使用しますã?
077             * 例えば、start=20040810 , span=5 で、休日がなければã€?0,11,12,13,14 となりã?
078             * 20040815 を返しますã?
079             * æŒ?®šã?日付けã‚??期間åŠ?®—後ã?日付けがã?キャãƒ?‚·ュしてã�?‚‹ãƒ??タの
080             * æœ?¤§とæœ?°�ã?間に存在しなã�??合ã?、エラーとしますã?
081             *
082             * @param       start   開始日付け(YYYYMMDD 形å¼?
083             * @param       span    稼動期é–?
084             *
085             * @return      開始日から稼動期間をåŠ?®—した日付け(当日を含ã‚?
086             *
087             */
088            Calendar getAfterDay( Calendar start,int span ) ;
089    }