uk.ac.ebi.miriam.data
Class Resource

java.lang.Object
  extended by uk.ac.ebi.miriam.data.Resource
All Implemented Interfaces:
Serializable, Comparable<Object>

public class Resource
extends Object
implements Comparable<Object>, Serializable

Contains all the information about a MIRIAM resource.

Copyright:
Copyright (C) 2006-2012 BioModels.net (EMBL - European Bioinformatics Institute)
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA

Version:
20110309
Author:
Camille Laibe
See Also:
Serialized Form

Constructor Summary
Resource()
           Default constructor (empty object).
 
Method Summary
 int compareTo(Object obj)
          Compares to objects and determine whether they are equivalent or not.
 boolean equals(Resource res)
          Tests if two Resource objects are the same (only checks the ID).
 String getExample()
          Getter of the example
 String getHtmlUrl()
          Returns the URL to access an example of data stored by this resource, specially formated for HTML usage in javascript functions.
 String getId()
          Getter of the stable identifier of the resource
 String getInfo()
          Getter of some general information about the resource
 String getInstitution()
          Getter of the institution managing the resource
 String getLocation()
          Getter of the country of the institution
 String getUrl_prefix()
          Getter of the prefix part of the address (link to an element)
 String getUrl_root()
          Getter of the resource address (front page)
 String getUrl_suffix()
          Getter of the suffix part of the address (link to an element)
 boolean isObsolete()
          Getter of the obsolete parameter
 void setExample(String example)
          Setter of the example.
 void setId(String id)
          Setter of the stable identifier of the resource
 void setInfo(String info)
          Setter of some general information about the resource
 void setInstitution(String institution)
          Setter of the institution managing the resource
 void setLocation(String location)
          Setter of the country of the institution
 void setObsolete(boolean obsolete)
          Setter of the obsolete parameter
 void setUrl_prefix(String url_prefix)
          Setter of the prefix part of the address (link to an element)
 void setUrl_root(String url_root)
          Setter of the resource address (front page)
 void setUrl_suffix(String url_suffix)
          Setter of the suffix part of the address (link to an element)
 String toString()
          Overrides the 'toString()' method for the 'Resource' object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Resource

public Resource()

Default constructor (empty object).

Method Detail

toString

public String toString()
Overrides the 'toString()' method for the 'Resource' object

Overrides:
toString in class Object
Returns:
a string which contains all the information about the resource

equals

public boolean equals(Resource res)
Tests if two Resource objects are the same (only checks the ID).

See Also:
Object.equals(java.lang.Object)

compareTo

public int compareTo(Object obj)
Compares to objects and determine whether they are equivalent or not. Mandatory method for the class to be able to implement 'Comparable'

WARNING: the test only uses the ID of the Resource object!

Specified by:
compareTo in interface Comparable<Object>
Parameters:
obj - an unknown object
Returns:
0 if the two objects are the same

getId

public String getId()
Getter of the stable identifier of the resource

Returns:
the stable identifier of the resource

setId

public void setId(String id)
Setter of the stable identifier of the resource

Parameters:
id - the stable identifier of the resource

getInfo

public String getInfo()
Getter of some general information about the resource

Returns:
some general information about the resource

setInfo

public void setInfo(String info)
Setter of some general information about the resource

Parameters:
info - some general information about the resource

getInstitution

public String getInstitution()
Getter of the institution managing the resource

Returns:
the institution managing the resource

setInstitution

public void setInstitution(String institution)
Setter of the institution managing the resource

Parameters:
institution - the institution managing the resource

getLocation

public String getLocation()
Getter of the country of the institution

Returns:
the country of the institution

setLocation

public void setLocation(String location)
Setter of the country of the institution

Parameters:
location - the country of the institution

isObsolete

public boolean isObsolete()
Getter of the obsolete parameter

Returns:
if the resource is obsolete or not

setObsolete

public void setObsolete(boolean obsolete)
Setter of the obsolete parameter

Parameters:
obsolete - the resource is obsolete or not (that is the question)

getUrl_prefix

public String getUrl_prefix()
Getter of the prefix part of the address (link to an element)

Returns:
the prefix part of the address (link to an element)

setUrl_prefix

public void setUrl_prefix(String url_prefix)
Setter of the prefix part of the address (link to an element)

Parameters:
url_prefix - the prefix part of the address (link to an element)

getUrl_root

public String getUrl_root()
Getter of the resource address (front page)

Returns:
the resource address (front page)

setUrl_root

public void setUrl_root(String url_root)
Setter of the resource address (front page)

Parameters:
url_root - the resource address (front page)

getUrl_suffix

public String getUrl_suffix()
Getter of the suffix part of the address (link to an element)

Returns:
the suffix part of the address (link to an element)

setUrl_suffix

public void setUrl_suffix(String url_suffix)
Setter of the suffix part of the address (link to an element)

Parameters:
url_suffix - the suffix part of the address (link to an element)

getHtmlUrl

public String getHtmlUrl()
Returns the URL to access an example of data stored by this resource, specially formated for HTML usage in javascript functions.

Returns:
HTML encoded URL to access an example of data

getExample

public String getExample()
Getter of the example

Returns:
the example

setExample

public void setExample(String example)
Setter of the example.

Parameters:
example - the example to set


BioModels.net, EMBL-EBI - Feb 2012