fern.network
Class AbstractNetworkImpl

java.lang.Object
  extended by fern.network.AbstractNetworkImpl
All Implemented Interfaces:
Network
Direct Known Subclasses:
AutocatalyticNetwork, CellDesignerNetworkWrapper, CytoscapeNetworkWrapper, FernMLNetwork, SBMLNetwork

public abstract class AbstractNetworkImpl
extends Object
implements Network

Base implementation for the Network interface. Implementing class only have to create all the protected fields.

Author:
Florian Erhard

Constructor Summary
AbstractNetworkImpl(String name)
          Create the network and give it an identifier.
 
Method Summary
 AmountManager getAmountManager()
          Gets the AmountManager for this network.
 AnnotationManager getAnnotationManager()
          Gets the AnnotationManager for this network.
 String getName()
          Gets an identifier of the network.
 int getNumReactions()
          Gets the number of reaction within the network.
 int getNumSpecies()
          Gets the number of species within the network.
 int[] getProducts(int reaction)
          Gets the products of the specified reaction.
 PropensityCalculator getPropensityCalculator()
          Gets the PropensityCalculator for this network.
 int[] getReactants(int reaction)
          Gets the reactants of the specified reaction.
 String getReactionName(int index)
          Gets a string representation of the reaction.
 int getSpeciesByName(String name)
          Gets the species index by name.
 Map<String,Integer> getSpeciesMapping()
          Gets the mapping from species names to their indices.
 String getSpeciesName(int index)
          Gets the species name by index.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface fern.network.Network
getInitialAmount, setInitialAmount
 

Constructor Detail

AbstractNetworkImpl

public AbstractNetworkImpl(String name)
Create the network and give it an identifier.

Parameters:
name - identifier for the network
Method Detail

getAmountManager

public AmountManager getAmountManager()
Description copied from interface: Network
Gets the AmountManager for this network.

Specified by:
getAmountManager in interface Network
Returns:
the AmountManager

getPropensityCalculator

public PropensityCalculator getPropensityCalculator()
Description copied from interface: Network
Gets the PropensityCalculator for this network.

Specified by:
getPropensityCalculator in interface Network
Returns:
the PropensityCalculator

getAnnotationManager

public AnnotationManager getAnnotationManager()
Description copied from interface: Network
Gets the AnnotationManager for this network.

Specified by:
getAnnotationManager in interface Network
Returns:
the AnnotationManager

getNumReactions

public int getNumReactions()
Description copied from interface: Network
Gets the number of reaction within the network.

Specified by:
getNumReactions in interface Network
Returns:
number of reactions

getNumSpecies

public int getNumSpecies()
Description copied from interface: Network
Gets the number of species within the network.

Specified by:
getNumSpecies in interface Network
Returns:
number of species

getProducts

public int[] getProducts(int reaction)
Description copied from interface: Network
Gets the products of the specified reaction.

Specified by:
getProducts in interface Network
Parameters:
reaction - index of the reaction
Returns:
indices of the products

getReactants

public int[] getReactants(int reaction)
Description copied from interface: Network
Gets the reactants of the specified reaction.

Specified by:
getReactants in interface Network
Parameters:
reaction - index of the reaction
Returns:
indices of the reactants

getSpeciesByName

public int getSpeciesByName(String name)
Description copied from interface: Network
Gets the species index by name. If the argument is no valid species, -1 is returned.

Specified by:
getSpeciesByName in interface Network
Parameters:
name - name of the species
Returns:
index of the species

getSpeciesMapping

public Map<String,Integer> getSpeciesMapping()
Gets the mapping from species names to their indices.

Returns:
species mapping

getSpeciesName

public String getSpeciesName(int index)
Description copied from interface: Network
Gets the species name by index.

Specified by:
getSpeciesName in interface Network
Parameters:
index - index of the species
Returns:
name of the species

getReactionName

public String getReactionName(int index)
Description copied from interface: Network
Gets a string representation of the reaction.

Specified by:
getReactionName in interface Network
Parameters:
index - reaction index
Returns:
string representation

getName

public String getName()
Description copied from interface: Network
Gets an identifier of the network.

Specified by:
getName in interface Network
Returns:
identifier of the network