update verigraph
[parser.git] / verigraph / src / it / polito / verigraph / model / Link.java
1 /*******************************************************************************
2  * Copyright (c) 2017 Politecnico di Torino and others.
3  *
4  * All rights reserved. This program and the accompanying materials
5  * are made available under the terms of the Apache License, Version 2.0
6  * which accompanies this distribution, and is available at
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *******************************************************************************/
9 package it.polito.verigraph.model;
10
11 import io.swagger.annotations.ApiModel;
12 import io.swagger.annotations.ApiModelProperty;
13
14 @ApiModel(value = "Link")
15 public class Link {
16     @ApiModelProperty(required = false, hidden = true)
17     private String link;
18     @ApiModelProperty(required = false, hidden = true)
19     private String rel;
20
21     public String getLink() {
22         return link;
23     }
24
25     public void setLink(String link) {
26         this.link = link;
27     }
28
29     public String getRel() {
30         return rel;
31     }
32
33     public void setRel(String rel) {
34         this.rel = rel;
35     }
36
37     @Override
38     public int hashCode() {
39         final int prime = 31;
40         int result = 1;
41         result = prime * result + ((link == null) ? 0 : link.hashCode());
42         result = prime * result + ((rel == null) ? 0 : rel.hashCode());
43         return result;
44     }
45
46     @Override
47     public boolean equals(Object obj) {
48         if (this == obj)
49             return true;
50         if (obj == null)
51             return false;
52         if (getClass() != obj.getClass())
53             return false;
54         Link other = (Link) obj;
55         if (link == null) {
56             if (other.link != null)
57                 return false;
58         }
59         else if (!link.equals(other.link))
60             return false;
61         if (rel == null) {
62             if (other.rel != null)
63                 return false;
64         }
65         else if (!rel.equals(other.rel))
66             return false;
67         return true;
68     }
69
70 }