diff options
author | Brett Porter <brett@apache.org> | 2009-11-25 11:45:49 +0000 |
---|---|---|
committer | Brett Porter <brett@apache.org> | 2009-11-25 11:45:49 +0000 |
commit | 78191d6285e7bad6d93cea693ebdd77c37333a54 (patch) | |
tree | fad69ce7ad12a5fc846a4e71f5ebcb29b2a4e878 /archiva-modules/metadata/metadata-model/src | |
parent | 8a0aa76e24cdf63a5b9e709ae29457da70ab8580 (diff) | |
download | archiva-78191d6285e7bad6d93cea693ebdd77c37333a54.tar.gz archiva-78191d6285e7bad6d93cea693ebdd77c37333a54.zip |
[MRM-1282] more reading of Maven POM into metadata
git-svn-id: https://svn.apache.org/repos/asf/archiva/branches/MRM-1025@884062 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'archiva-modules/metadata/metadata-model/src')
-rw-r--r-- | archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/License.java | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/License.java b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/License.java index 456d63951..2f5a141f8 100644 --- a/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/License.java +++ b/archiva-modules/metadata/metadata-model/src/main/java/org/apache/archiva/metadata/model/License.java @@ -25,6 +25,16 @@ public class License private String url; + public License( String name, String url ) + { + this.name = name; + this.url = url; + } + + public License() + { + } + public String getName() { return name; @@ -44,4 +54,44 @@ public class License { this.url = url; } + + @Override + public boolean equals( Object o ) + { + if ( this == o ) + { + return true; + } + if ( o == null || getClass() != o.getClass() ) + { + return false; + } + + License license = (License) o; + + if ( name != null ? !name.equals( license.name ) : license.name != null ) + { + return false; + } + if ( url != null ? !url.equals( license.url ) : license.url != null ) + { + return false; + } + + return true; + } + + @Override + public int hashCode() + { + int result = name != null ? name.hashCode() : 0; + result = 31 * result + ( url != null ? url.hashCode() : 0 ); + return result; + } + + @Override + public String toString() + { + return "License{" + "name='" + name + '\'' + ", url='" + url + '\'' + '}'; + } } |