View Javadoc
1   /*
2    * html-crawler is a library to help crawling websites.
3    * Copyright (C) 2020  Uwe Plonus
4    *
5    * This program is free software: you can redistribute it and/or modify
6    * it under the terms of the GNU Affero General Public License as published by
7    * the Free Software Foundation, either version 3 of the License, or
8    * (at your option) any later version.
9    *
10   * This program is distributed in the hope that it will be useful,
11   * but WITHOUT ANY WARRANTY; without even the implied warranty of
12   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13   * GNU Affero General Public License for more details.
14   *
15   * You should have received a copy of the GNU Affero General Public License
16   * along with this program.  If not, see <https://www.gnu.org/licenses/>.
17   */
18  
19  package org.sw4j.tool.html.crawler;
20  
21  public class ExternalReferenceEvent {
22  
23      private final String elementName;
24  
25      private final LinkType linkType;
26  
27      private final String link;
28  
29      private final RelationType relation;
30  
31      public ExternalReferenceEvent(final String elementName, final LinkType linkType, final String link,
32              final RelationType relation) {
33          this.elementName = elementName;
34          this.linkType = linkType;
35          this.link = link;
36          this.relation = relation;
37      }
38  
39      public String getElementName() {
40          return elementName;
41      }
42  
43      public LinkType getLinkType() {
44          return linkType;
45      }
46  
47      public String getLink() {
48          return link;
49      }
50  
51      public RelationType getRelation() {
52          return relation;
53      }
54  
55  }