Version: 1.1.1

org.biomoby.shared
Class MobyRelationship

java.lang.Object
  extended by org.biomoby.shared.MobyRelationship

public class MobyRelationship
extends Object

A container representing a name of a BioMoby data type and its relationship to another BioMoby data type.

Version:
$Id: MobyRelationship.java,v 1.5 2006/07/07 04:12:40 gordonp Exp $
Author:
Martin Senger

Constructor Summary
MobyRelationship()
          Default constructor.
MobyRelationship(String name, String dataTypeName, int relationshipType)
          Normal constructor.
 
Method Summary
 String getDataTypeName()
          Return a name of a data type that is linked by this relationship.
 String getName()
          Return name of this relationship (an "article name").
 int getRelationshipType()
          Return type of this relationship.
 void setDataTypeName(String value)
           
 void setName(String value)
           
 void setRelationshipType(int value)
           
 String toString()
           
static String type2str(int relationshipType)
          A static method converting a relationship type to its string representation.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MobyRelationship

public MobyRelationship()
Default constructor.


MobyRelationship

public MobyRelationship(String name,
                        String dataTypeName,
                        int relationshipType)
Normal constructor.

Parameters:
name - is a name how this relationship is known (an "article name" in the BioMoby speak), e.g. 'length'. Because of the backward compatibility it accepts also a null or empty string here - but according to the BioMoby API (0.8) this name should be always given.
dataTypeName - is a name of a data type that is defined by this relationship, e.g. 'Integer'.
relationshipType - is either HASA or HAS. If it is something else it is silently changed to HASA.
Method Detail

getName

public String getName()
Return name of this relationship (an "article name").


setName

public void setName(String value)

getDataTypeName

public String getDataTypeName()
Return a name of a data type that is linked by this relationship.


setDataTypeName

public void setDataTypeName(String value)

getRelationshipType

public int getRelationshipType()
Return type of this relationship. It is either HASA or HAS.


setRelationshipType

public void setRelationshipType(int value)

type2str

public static String type2str(int relationshipType)
A static method converting a relationship type to its string representation.

Returns:
a reasonable string, or "unknown"

toString

public String toString()
Overrides:
toString in class Object

Version: 1.1.1

Submit a bug or feature
Generated: Sat May 29 04:26:35 EDT 2010