4 * License : The MIT License
5 * Copyright(c) 2009 olyutorskii
8 package jp.osdn.jindolf.parser;
10 import jp.osdn.jindolf.parser.content.DecodedContent;
11 import jp.sourceforge.jindolf.corelib.EventFamily;
12 import jp.sourceforge.jindolf.corelib.GameRole;
13 import jp.sourceforge.jindolf.corelib.PeriodType;
14 import jp.sourceforge.jindolf.corelib.SysEventType;
15 import jp.sourceforge.jindolf.corelib.TalkType;
16 import jp.sourceforge.jindolf.corelib.Team;
17 import jp.sourceforge.jindolf.corelib.VillageState;
20 * インタフェース{@link HtmlHandler}の抽象アダプタクラス。
23 public abstract class HtmlAdapter implements HtmlHandler{
28 protected HtmlAdapter(){
36 * @param content {@inheritDoc}
37 * @throws HtmlParseException {@inheritDoc}
40 public void startParse(DecodedContent content)
41 throws HtmlParseException{
47 * @param content {@inheritDoc}
48 * @param titleRange {@inheritDoc}
49 * @throws HtmlParseException {@inheritDoc}
52 public void pageTitle(DecodedContent content, SeqRange titleRange)
53 throws HtmlParseException{
59 * @param content {@inheritDoc}
60 * @param loginRange {@inheritDoc}
61 * @throws HtmlParseException {@inheritDoc}
64 public void loginName(DecodedContent content, SeqRange loginRange)
65 throws HtmlParseException{
71 * @param type {@inheritDoc}
72 * @throws HtmlParseException {@inheritDoc}
75 public void pageType(PageType type)
76 throws HtmlParseException{
82 * @param content {@inheritDoc}
83 * @param villageRange {@inheritDoc}
84 * @throws HtmlParseException {@inheritDoc}
87 public void villageName(DecodedContent content, SeqRange villageRange)
88 throws HtmlParseException{
94 * @param month {@inheritDoc}
95 * @param day {@inheritDoc}
96 * @param hour {@inheritDoc}
97 * @param minute {@inheritDoc}
98 * @throws HtmlParseException {@inheritDoc}
101 public void commitTime(int month, int day, int hour, int minute)
102 throws HtmlParseException{
108 * @param content {@inheritDoc}
109 * @param anchorRange {@inheritDoc}
110 * @param periodType {@inheritDoc}
111 * @param day {@inheritDoc}
112 * @throws HtmlParseException {@inheritDoc}
115 public void periodLink(DecodedContent content,
116 SeqRange anchorRange,
117 PeriodType periodType, int day)
118 throws HtmlParseException{
124 * @param content {@inheritDoc}
125 * @param anchorRange {@inheritDoc}
126 * @param villageRange {@inheritDoc}
127 * @param hour {@inheritDoc}
128 * @param minute {@inheritDoc}
129 * @param state {@inheritDoc}
130 * @throws HtmlParseException {@inheritDoc}
133 public void villageRecord(DecodedContent content,
134 SeqRange anchorRange,
135 SeqRange villageRange,
136 int hour, int minute,
138 throws HtmlParseException{
144 * @throws HtmlParseException {@inheritDoc}
147 public void endParse() throws HtmlParseException{
153 * @throws HtmlParseException {@inheritDoc}
156 public void startTalk() throws HtmlParseException{
162 * @throws HtmlParseException {@inheritDoc}
165 public void endTalk() throws HtmlParseException{
171 * @param talkNo {@inheritDoc}
172 * @throws HtmlParseException {@inheritDoc}
175 public void talkNo(int talkNo) throws HtmlParseException{
181 * @param content {@inheritDoc}
182 * @param idRange {@inheritDoc}
183 * @throws HtmlParseException {@inheritDoc}
186 public void talkId(DecodedContent content, SeqRange idRange)
187 throws HtmlParseException{
193 * @param content {@inheritDoc}
194 * @param avatarRange {@inheritDoc}
195 * @throws HtmlParseException {@inheritDoc}
198 public void talkAvatar(DecodedContent content, SeqRange avatarRange)
199 throws HtmlParseException{
205 * @param hour {@inheritDoc}
206 * @param minute {@inheritDoc}
207 * @throws HtmlParseException {@inheritDoc}
210 public void talkTime(int hour, int minute) throws HtmlParseException{
216 * @param content {@inheritDoc}
217 * @param urlRange {@inheritDoc}
218 * @throws HtmlParseException {@inheritDoc}
221 public void talkIconUrl(DecodedContent content, SeqRange urlRange)
222 throws HtmlParseException{
228 * @param type {@inheritDoc}
229 * @throws HtmlParseException {@inheritDoc}
232 public void talkType(TalkType type) throws HtmlParseException{
238 * @param content {@inheritDoc}
239 * @param textRange {@inheritDoc}
240 * @throws HtmlParseException {@inheritDoc}
243 public void talkText(DecodedContent content, SeqRange textRange)
244 throws HtmlParseException{
250 * @throws HtmlParseException {@inheritDoc}
253 public void talkBreak() throws HtmlParseException{
259 * @param eventFamily {@inheritDoc}
260 * @throws HtmlParseException {@inheritDoc}
263 public void startSysEvent(EventFamily eventFamily)
264 throws HtmlParseException{
270 * @param type {@inheritDoc}
271 * @throws HtmlParseException {@inheritDoc}
274 public void sysEventType(SysEventType type) throws HtmlParseException{
280 * @throws HtmlParseException {@inheritDoc}
283 public void endSysEvent() throws HtmlParseException{
289 * @param content {@inheritDoc}
290 * @param entryNo {@inheritDoc}
291 * @param avatarRange {@inheritDoc}
292 * @throws HtmlParseException {@inheritDoc}
295 public void sysEventOnStage(DecodedContent content,
297 SeqRange avatarRange )
298 throws HtmlParseException{
304 * @param role {@inheritDoc}
305 * @param num {@inheritDoc}
306 * @throws HtmlParseException {@inheritDoc}
309 public void sysEventOpenRole(GameRole role, int num)
310 throws HtmlParseException{
316 * @param content {@inheritDoc}
317 * @param avatarRange {@inheritDoc}
318 * @throws HtmlParseException {@inheritDoc}
321 public void sysEventSurvivor(DecodedContent content,
322 SeqRange avatarRange)
323 throws HtmlParseException{
329 * @param content {@inheritDoc}
330 * @param voteByRange {@inheritDoc}
331 * @param voteToRange {@inheritDoc}
332 * @throws HtmlParseException {@inheritDoc}
335 public void sysEventCounting(DecodedContent content,
336 SeqRange voteByRange,
337 SeqRange voteToRange )
338 throws HtmlParseException{
344 * @param content {@inheritDoc}
345 * @param voteByRange {@inheritDoc}
346 * @param voteToRange {@inheritDoc}
347 * @throws HtmlParseException {@inheritDoc}
350 public void sysEventCounting2(DecodedContent content,
351 SeqRange voteByRange,
352 SeqRange voteToRange )
353 throws HtmlParseException{
359 * @param content {@inheritDoc}
360 * @param avatarRange {@inheritDoc}
361 * @throws HtmlParseException {@inheritDoc}
364 public void sysEventSuddenDeath(DecodedContent content,
365 SeqRange avatarRange )
366 throws HtmlParseException{
372 * @param content {@inheritDoc}
373 * @param avatarRange {@inheritDoc}
374 * @throws HtmlParseException {@inheritDoc}
377 public void sysEventMurdered(DecodedContent content,
378 SeqRange avatarRange )
379 throws HtmlParseException{
385 * @param content {@inheritDoc}
386 * @param avatarRange {@inheritDoc}
387 * @param anchorRange {@inheritDoc}
388 * @param loginRange {@inheritDoc}
389 * @param isLiving {@inheritDoc}
390 * @param role {@inheritDoc}
391 * @throws HtmlParseException {@inheritDoc}
394 public void sysEventPlayerList(DecodedContent content,
395 SeqRange avatarRange,
396 SeqRange anchorRange,
400 throws HtmlParseException{
406 * @param content {@inheritDoc}
407 * @param avatarRange {@inheritDoc}
408 * @param votes {@inheritDoc}
409 * @throws HtmlParseException {@inheritDoc}
412 public void sysEventExecution(DecodedContent content,
413 SeqRange avatarRange,
415 throws HtmlParseException{
421 * @param content {@inheritDoc}
422 * @param avatarRange {@inheritDoc}
423 * @throws HtmlParseException {@inheritDoc}
426 public void sysEventVanish(DecodedContent content,
427 SeqRange avatarRange )
428 throws HtmlParseException{
434 * @param content {@inheritDoc}
435 * @param avatarRange {@inheritDoc}
436 * @throws HtmlParseException {@inheritDoc}
439 public void sysEventCheckout(DecodedContent content,
440 SeqRange avatarRange )
441 throws HtmlParseException{
447 * @param content {@inheritDoc}
448 * @param judgeByRange {@inheritDoc}
449 * @param judgeToRange {@inheritDoc}
450 * @throws HtmlParseException {@inheritDoc}
453 public void sysEventJudge(DecodedContent content,
454 SeqRange judgeByRange,
455 SeqRange judgeToRange )
456 throws HtmlParseException{
462 * @param content {@inheritDoc}
463 * @param guardByRange {@inheritDoc}
464 * @param guardToRange {@inheritDoc}
465 * @throws HtmlParseException {@inheritDoc}
468 public void sysEventGuard(DecodedContent content,
469 SeqRange guardByRange,
470 SeqRange guardToRange )
471 throws HtmlParseException{
477 * @param hour {@inheritDoc}
478 * @param minute {@inheritDoc}
479 * @param minLimit {@inheritDoc}
480 * @param maxLimit {@inheritDoc}
481 * @throws HtmlParseException {@inheritDoc}
484 public void sysEventAskEntry(int hour, int minute,
485 int minLimit, int maxLimit)
486 throws HtmlParseException{
492 * @param hour {@inheritDoc}
493 * @param minute {@inheritDoc}
494 * @throws HtmlParseException {@inheritDoc}
497 public void sysEventAskCommit(int hour, int minute)
498 throws HtmlParseException{
504 * @param content {@inheritDoc}
505 * @param avatarRange {@inheritDoc}
506 * @throws HtmlParseException {@inheritDoc}
509 public void sysEventNoComment(DecodedContent content,
510 SeqRange avatarRange )
511 throws HtmlParseException{
517 * @param winner {@inheritDoc}
518 * @param hour {@inheritDoc}
519 * @param minute {@inheritDoc}
520 * @throws HtmlParseException {@inheritDoc}
523 public void sysEventStayEpilogue(Team winner, int hour, int minute)
524 throws HtmlParseException{
530 * @param content {@inheritDoc}
531 * @param contentRange {@inheritDoc}
532 * @throws HtmlParseException {@inheritDoc}
535 public void sysEventContent(DecodedContent content,
536 SeqRange contentRange )
537 throws HtmlParseException{
543 * @throws HtmlParseException {@inheritDoc}
546 public void sysEventContentBreak() throws HtmlParseException{
552 * @param content {@inheritDoc}
553 * @param anchorRange {@inheritDoc}
554 * @param contentRange {@inheritDoc}
555 * @throws HtmlParseException {@inheritDoc}
558 public void sysEventContentAnchor(DecodedContent content,
559 SeqRange anchorRange,
560 SeqRange contentRange )
561 throws HtmlParseException{