OSDN Git Service

XML出力実体のインスタンス化
[jindolf/JinArchiver.git] / src / main / java / jp / sourceforge / jindolf / archiver / PeriodResource.java
1 /*
2  * Period resource
3  *
4  * License : The MIT License
5  * Copyright(c) 2008 olyutorskii
6  */
7
8 package jp.sourceforge.jindolf.archiver;
9
10 import java.net.URL;
11 import jp.sourceforge.jindolf.corelib.LandDef;
12 import jp.sourceforge.jindolf.corelib.PeriodType;
13
14 /**
15  * Periodのロード元情報。
16  */
17 public class PeriodResource{
18
19     private final LandDef landDef;
20     private final int villageId;
21     private final PeriodType periodType;
22     private final int day;
23     private final String origUrlText;
24     private long downTimeMs;
25     private URL resourceUrl;
26
27     /**
28      * コンストラクタ。
29      * @param landDef 国情報
30      * @param villageId 村ID
31      * @param periodType Period種別
32      * @param day 日付
33      * @param origUrlText ロード元URI文字列
34      * @param downTimeMs ロード時刻
35      * @param resourceUrl ロード元URL
36      */
37     public PeriodResource(LandDef landDef,
38                             int villageId,
39                             PeriodType periodType,
40                             int day,
41                             String origUrlText,
42                             long downTimeMs,
43                             URL resourceUrl ) {
44         super();
45
46         this.landDef = landDef;
47         this.villageId = villageId;
48         this.periodType = periodType;
49         this.day = day;
50         this.origUrlText = origUrlText;
51         this.downTimeMs = downTimeMs;
52         this.resourceUrl = resourceUrl;
53
54         return;
55     }
56
57     /**
58      * 国情報を取得する。
59      * @return 国情報
60      */
61     public LandDef getLandDef(){
62         return this.landDef;
63     }
64
65     /**
66      * 村番号を取得する。
67      * @return 村番号
68      */
69     public int getVillageId(){
70         return this.villageId;
71     }
72
73     /**
74      * Periodの種別を取得する。
75      * @return Period種別
76      */
77     public PeriodType getPeriodType(){
78         return this.periodType;
79     }
80
81     /**
82      * 日付を取得する。
83      * @return 日付
84      */
85     public int getDay(){
86         return this.day;
87     }
88
89     /**
90      * オリジナルのダウンロード元URL文字列を取得する。
91      * @return ダウンロード元URL文字列
92      */
93     public String getOrigUrlText(){
94         return this.origUrlText;
95     }
96
97     /**
98      * オリジナルのダウンロード時刻を取得する。
99      * @return ダウンロード時刻。エポック秒(ms)
100      */
101     public long getDownTimeMs(){
102         return this.downTimeMs;
103     }
104
105     /**
106      * オリジナルのダウンロード時刻を設定する。
107      * @param downTimeMs ダウンロード時刻。エポック秒(ms)
108      */
109     public void setDownTimeMs(long downTimeMs){
110         this.downTimeMs = downTimeMs;
111         return;
112     }
113
114     /**
115      * XHTML格納先URLを取得する。
116      * @return 格納先URL
117      */
118     public URL getResourceUrl(){
119         return this.resourceUrl;
120     }
121
122     /**
123      * XHTML格納先URLを設定する。
124      * @param resourceUrl 格納先URL
125      */
126     public void setResourceUrl(URL resourceUrl){
127         this.resourceUrl = resourceUrl;
128         return;
129     }
130
131 }