| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| Page |
|
| 1.0;1 |
| 1 | package org.jtheque.primary.utils.web.analyzers.generic; | |
| 2 | ||
| 3 | import org.jtheque.primary.utils.web.analyzers.generic.transform.Transformer; | |
| 4 | ||
| 5 | import java.util.ArrayList; | |
| 6 | import java.util.Collection; | |
| 7 | ||
| 8 | /* | |
| 9 | * This file is part of JTheque. | |
| 10 | * | |
| 11 | * JTheque is free software: you can redistribute it and/or modify | |
| 12 | * it under the terms of the GNU General Public License as published by | |
| 13 | * the Free Software Foundation, either version 3 of the License. | |
| 14 | * | |
| 15 | * JTheque is distributed in the hope that it will be useful, | |
| 16 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| 17 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
| 18 | * GNU General Public License for more details. | |
| 19 | * | |
| 20 | * You should have received a copy of the GNU General Public License | |
| 21 | * along with JTheque. If not, see <http://www.gnu.org/licenses/>. | |
| 22 | */ | |
| 23 | ||
| 24 | /** | |
| 25 | * A Page for a generic web getter. | |
| 26 | * | |
| 27 | * @author Baptiste Wicht | |
| 28 | */ | |
| 29 | 0 | public final class Page { |
| 30 | private String url; | |
| 31 | private Collection<Transformer> transformers; | |
| 32 | ||
| 33 | /** | |
| 34 | * Return the URL of the page. | |
| 35 | * | |
| 36 | * @return The page's url. | |
| 37 | */ | |
| 38 | public String getUrl(){ | |
| 39 | 0 | return url; |
| 40 | } | |
| 41 | ||
| 42 | /** | |
| 43 | * Set the URL of the page. | |
| 44 | * | |
| 45 | * @param url The URL of the page. | |
| 46 | */ | |
| 47 | public void setUrl(String url){ | |
| 48 | 0 | this.url = url; |
| 49 | 0 | } |
| 50 | ||
| 51 | /** | |
| 52 | * Return all the transformers of the page's url. | |
| 53 | * | |
| 54 | * @return The transformers of the page url. | |
| 55 | */ | |
| 56 | public Collection<Transformer> getTransformers(){ | |
| 57 | 0 | return transformers; |
| 58 | } | |
| 59 | ||
| 60 | /** | |
| 61 | * Set the transformers of the page url. | |
| 62 | * | |
| 63 | * @param transformers The transformers. | |
| 64 | */ | |
| 65 | public void setTransformers(Collection<Transformer> transformers){ | |
| 66 | 0 | this.transformers = new ArrayList<Transformer>(transformers); |
| 67 | 0 | } |
| 68 | } |