Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

org.evolvica.engine
Interface IElement

All Known Implementing Classes:
AbstractElement

public interface IElement

Interface for an algorithmic element used in algorithms. Actually this is used as a wrapper for IOperator instances. Algorithmic elements are connected by IConnection objects. These connections transport data between algorithmic elements.

Since:
0.4.0
Version:
$Revision: 1.6 $ $Date: 2004/05/26 11:58:24 $
Author:
Andreas Rummler

Method Summary
 void activate()
          Activates this element.
 void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
          Adds a property change listener to this element.
 void firePropertyChangeEvent(java.beans.PropertyChangeEvent event)
          Fires a property change event.
 IAlgorithm getAlgorithm()
          Returns the algorithm this element is contained in.
 IConnection getIncoming(int index)
          Gets an incoming connection.
 int getIncomingIndex(IConnection connection)
          Returns the index of the given incoming connection.
 Metadata getMetadata(java.lang.String path)
          Returns a metadata object for this element from the associated metadata store.
 IOperator getOperator()
          Returns the operator that is assigned to this element.
 IConnection getOutgoing(int index)
          Gets an outgoing connection.
 int getOutgoingIndex(IConnection connection)
          Returns the index of the given outgoing connection.
 int incomingSize()
          Returns the number of incoming connections.
 boolean isActivatable()
          Checks if this element can activated.
 int outgoingSize()
          Returns the number of outgoing connections.
 void removeConnection(IConnection connection)
          Removes a connection from this element.
 void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
          Removes a property change listener from this element.
 void setAlgorithm(IAlgorithm algorithm)
          Sets the algorithm this element belongs to.
 void setIncoming(IConnection connection, int index)
          Sets an incoming connection.
 void setIncomingSize(int size)
          Sets a new value for the number of incoming slots.
 void setMetadata(Metadata data)
          Sets a metadata object for this element.
 void setOutgoing(IConnection connection, int index)
          Sets an outgoing connection.
 void setOutgoingSize(int size)
          Sets a new value for the number of outgoing slots.
 

Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener listener)
Adds a property change listener to this element.

Parameters:
listener - property change listener to be added

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener listener)
Removes a property change listener from this element.

Parameters:
listener - property change listener to be removed

firePropertyChangeEvent

public void firePropertyChangeEvent(java.beans.PropertyChangeEvent event)
Fires a property change event.

Parameters:
event - event to be fired

getAlgorithm

public IAlgorithm getAlgorithm()
Returns the algorithm this element is contained in.

Returns:
algorithm this element is contained in

setAlgorithm

public void setAlgorithm(IAlgorithm algorithm)
Sets the algorithm this element belongs to.

Parameters:
algorithm - the algorithm this element belongs to

getOperator

public IOperator getOperator()
Returns the operator that is assigned to this element.

Returns:
assigned operator

getMetadata

public Metadata getMetadata(java.lang.String path)
Returns a metadata object for this element from the associated metadata store. The metadata is stored in the associated algorithms metadata store.

Parameters:
path - metadata path
Returns:
metadata object or null if no such object exists

setMetadata

public void setMetadata(Metadata data)
Sets a metadata object for this element. The metadata is stored in the associated algorithms metadata store.

Parameters:
data - metadata object

incomingSize

public int incomingSize()
Returns the number of incoming connections.

Returns:
number of incoming connections

outgoingSize

public int outgoingSize()
Returns the number of outgoing connections.

Returns:
number of outgoing connections

getIncoming

public IConnection getIncoming(int index)
Gets an incoming connection.

Parameters:
index - index of the connection
Returns:
incoming connection with the specified index

getIncomingIndex

public int getIncomingIndex(IConnection connection)
Returns the index of the given incoming connection.

Parameters:
connection - incoming connection
Returns:
index of the connection or -1 if the connection is not an incoming connection for this element

setIncoming

public void setIncoming(IConnection connection,
                        int index)
Sets an incoming connection.

Parameters:
connection - connection to set
index - index of the coonection

setIncomingSize

public void setIncomingSize(int size)
Sets a new value for the number of incoming slots.

Parameters:
size - number of incoming slots

getOutgoing

public IConnection getOutgoing(int index)
Gets an outgoing connection.

Parameters:
index - index of the connection
Returns:
outgoing connection with the specified index

getOutgoingIndex

public int getOutgoingIndex(IConnection connection)
Returns the index of the given outgoing connection.

Parameters:
connection - outgoing connection
Returns:
index of the connection or -1 if the connection is not an outgoing connection for this element

setOutgoing

public void setOutgoing(IConnection connection,
                        int index)
Sets an outgoing connection.

Parameters:
connection - connection to set
index - index of the coonection

setOutgoingSize

public void setOutgoingSize(int size)
Sets a new value for the number of outgoing slots.

Parameters:
size - number of outgoing slots

removeConnection

public void removeConnection(IConnection connection)
Removes a connection from this element.

Parameters:
connection - connection to be removed

activate

public void activate()
Activates this element.


isActivatable

public boolean isActivatable()
Checks if this element can activated.

Returns:
true if this element can be activated, false instead

Evolvica Core API Version 0.6.2
Last Modified: June 29 2004

Copyright © 2000-2004 Technical University of Ilmenau, Department Electronic Circuits and Systems