Version: 1.1.1

org.biomoby.client
Class DataServiceEdge

java.lang.Object
  extended by org.biomoby.client.ServicesEdge
      extended by org.biomoby.client.DataServiceEdge

public class DataServiceEdge
extends ServicesEdge

An instance of this class is a container for a pair of a data type and a Moby service definitions, and for an information how they can be connected. The parent class, a ServicesEdge, connects two services, this class connects a data type with one service:

 dataType --> targetService 
or
 sourceService --> dataType 
Therefore, only one service (either source, or target one) should be defined - otherwise an instance of this class actually represents two edges (which may not be expected by those who use this class):
 sourceService --> dataType --> targetService 
You can imagine that instances of this class represent starting or ending edges in a graph of services.

Version:
$Id: DataServiceEdge.java,v 1.2 2005/04/07 16:37:02 kawas Exp $
Author:
Martin Senger
See Also:
ServiceConnections

Field Summary
 
Fields inherited from class org.biomoby.client.ServicesEdge
BOTH_COLLECTIONS_CONNECTION, HEAD_COLLECTION_CONNECTION, NO_CONNECTION, NO_OUTPUT, NS_DIVIDER, SIMPLE_CONNECTION, TAIL_COLLECTION_CONNECTION
 
Constructor Summary
DataServiceEdge(MobyDataType sourceDataType, MobyService targetService, String connector)
          Constructs an instance with data type as a source and a service as a target, and a connector.
DataServiceEdge(MobyService sourceService, MobyDataType targetDataType, String connector)
          Constructs an instance with data type as a target and a service as a source, and a connector.
 
Method Summary
 MobyDataType getDataType()
          Retrieves the data type (regardless if it is a source or a target data type, there is always only one data type in this class).
 MobyService getService()
          Retrieves the service from this edge.
 boolean isEndingEdge()
          Indicate if this edge is a starting or ending edge of a graph.
 String toString()
           
 
Methods inherited from class org.biomoby.client.ServicesEdge
extractNamespace, getConnectionType, getConnector, getId, getSourceService, getTargetService, isWeakConnection, setConnectionType, setConnector, setWeakConnection
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataServiceEdge

public DataServiceEdge(MobyDataType sourceDataType,
                       MobyService targetService,
                       String connector)
Constructs an instance with data type as a source and a service as a target, and a connector.


DataServiceEdge

public DataServiceEdge(MobyService sourceService,
                       MobyDataType targetDataType,
                       String connector)
Constructs an instance with data type as a target and a service as a source, and a connector.

Method Detail

getDataType

public MobyDataType getDataType()
Retrieves the data type (regardless if it is a source or a target data type, there is always only one data type in this class).

Returns:
the data type of this edge

getService

public MobyService getService()
Retrieves the service from this edge. Only source or target service should be present - and that one is returned.

Returns:
the service that is present; it returns null if both services (target and source) are null

isEndingEdge

public boolean isEndingEdge()
Indicate if this edge is a starting or ending edge of a graph.

Returns:
return true if this edge has a non-null target service

toString

public String toString()
Overrides:
toString in class ServicesEdge

Version: 1.1.1

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