This project has retired. For details please refer to its
Attic page.
TreeEntry xref
1 package org.apache.archiva.maven2.model;
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 import com.fasterxml.jackson.annotation.JsonIgnore;
23
24 import javax.xml.bind.annotation.XmlRootElement;
25 import java.io.Serializable;
26 import java.util.ArrayList;
27 import java.util.List;
28
29
30
31
32 @XmlRootElement( name = "treeEntry" )
33 public class TreeEntry
34 implements Serializable
35 {
36
37 private List<TreeEntry> childs = new ArrayList<>();
38
39 private Artifact artifact;
40
41 @JsonIgnore
42 private TreeEntry parent;
43
44 public TreeEntry()
45 {
46
47 }
48
49 public TreeEntry( Artifact artifact )
50 {
51 this.artifact = artifact;
52 }
53
54
55 public Artifact getArtifact()
56 {
57 return artifact;
58 }
59
60 public void setArtifact( Artifact artifact )
61 {
62 this.artifact = artifact;
63 }
64
65 public List<TreeEntry> getChilds()
66 {
67 return childs;
68 }
69
70 public void setChilds( List<TreeEntry> childs )
71 {
72 this.childs = childs;
73 }
74
75 @JsonIgnore
76 public TreeEntry getParent()
77 {
78 return parent;
79 }
80
81 @JsonIgnore
82 public void setParent( TreeEntry parent )
83 {
84 this.parent = parent;
85 }
86
87 @Override
88 public boolean equals( Object o )
89 {
90 if ( this == o )
91 {
92 return true;
93 }
94 if ( !( o instanceof TreeEntry ) )
95 {
96 return false;
97 }
98
99 TreeEntry treeEntry = (TreeEntry) o;
100
101 if ( artifact != null ? !artifact.equals( treeEntry.artifact ) : treeEntry.artifact != null )
102 {
103 return false;
104 }
105
106 return true;
107 }
108
109 @Override
110 public int hashCode()
111 {
112 return artifact != null ? artifact.hashCode() : 0;
113 }
114 }