inprogress
[jalview.git] / forester / java / src / org / forester / archaeopteryx / WebLink.java
1 // $Id:
2 // FORESTER -- software libraries and applications
3 // for evolutionary biology research and applications.
4 //
5 // Copyright (C) 2008-2009 Christian M. Zmasek
6 // Copyright (C) 2008-2009 Burnham Institute for Medical Research
7 // All rights reserved
8 //
9 // This library is free software; you can redistribute it and/or
10 // modify it under the terms of the GNU Lesser General Public
11 // License as published by the Free Software Foundation; either
12 // version 2.1 of the License, or (at your option) any later version.
13 //
14 // This library is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 // Lesser General Public License for more details.
18 //
19 // You should have received a copy of the GNU Lesser General Public
20 // License along with this library; if not, write to the Free Software
21 // Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
22 //
23 // Contact: phylosoft @ gmail . com
24 // WWW: https://sites.google.com/site/cmzmasek/home/software/forester
25
26 package org.forester.archaeopteryx;
27
28 import java.net.URL;
29
30 class WebLink {
31
32     private final URL    _url;
33     private final String _desc;
34     private final String _source_identifier;
35
36     WebLink( final URL url, final String desc, final String source_identifier ) {
37         _url = url;
38         _desc = desc;
39         _source_identifier = source_identifier;
40     }
41
42     String getDesc() {
43         return _desc;
44     }
45
46     String getSourceIdentifier() {
47         return _source_identifier;
48     }
49
50     URL getUrl() {
51         return _url;
52     }
53
54     @Override
55     public String toString() {
56         final StringBuilder sb = new StringBuilder();
57         sb.append( getDesc() );
58         sb.append( " [" );
59         sb.append( getSourceIdentifier() );
60         sb.append( "]: " );
61         sb.append( getUrl().toString() );
62         return sb.toString();
63     }
64 }