f54243df01d4dbcd36db4631cb5e5047cbb39c2e
[chesshog-scanner.git] / src / main / java / org / hedgecode / chess / scanner / regex / RegexParams.java
1 /*
2  * Copyright (c) 2019-2020. Developed by Hedgecode.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *   http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16
17 package org.hedgecode.chess.scanner.regex;
18
19 /**
20  * RegexParams
21  *
22  * @author Dmitry Samoshin aka gotty
23  */
24 public final class RegexParams {
25
26     public static final String TOURNAMENT_ID = "[tournamentId]";
27     public static final String PAGE_ID = "[pageId]";
28     public static final String GAME_ID = "[gameId]";
29     public static final String QUERY = "[query]";
30
31     private String tournamentId;
32     private String pageId;
33     private String gameId;
34     private String query;
35     private boolean isUrlEncode;
36
37     public RegexParams(String tournamentId, String pageId) {
38         this.tournamentId = tournamentId;
39         this.pageId = pageId;
40     }
41
42     public RegexParams(String gameId) {
43         this.gameId = gameId;
44     }
45
46     public RegexParams(String query, boolean isUrlEncode) {
47         this.query = query;
48         this.isUrlEncode = isUrlEncode;
49     }
50
51     public String getTournamentId() {
52         return tournamentId;
53     }
54
55     public String getPageId() {
56         return pageId;
57     }
58
59     public String getGameId() {
60         return gameId;
61     }
62
63     public String getQuery() {
64         return query;
65     }
66
67     public boolean isUrlEncode() {
68         return isUrlEncode;
69     }
70
71 }