gov.sandia.ccaffeine.dc.user_iface.MVC
Class CcaComponent

java.lang.Object
  extended by gov.sandia.ccaffeine.dc.user_iface.MVC.CcaComponent

public class CcaComponent
extends java.lang.Object


Field Summary
 java.lang.String className
           
 java.lang.String instanceName
           
 CcaPort[] providerPorts
           
 java.lang.String status
           
 CcaPort[] userPorts
           
 
Constructor Summary
CcaComponent(java.lang.String xmlComponent)
          Parse the xml contents of a component.
 
Method Summary
protected  CcaPort[] toCcaPorts(java.lang.String xmlPorts)
          Parse the xml contents of several ports.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

className

public java.lang.String className

instanceName

public java.lang.String instanceName

userPorts

public CcaPort[] userPorts

providerPorts

public CcaPort[] providerPorts

status

public java.lang.String status
Constructor Detail

CcaComponent

public CcaComponent(java.lang.String xmlComponent)
Parse the xml contents of a component. The parsed values are copied into the class's attributes.

The XML code will contains something like this:
<component>
 <instanceName>name1</instanceName>
 <className>name2</className>
 <userPorts>
  <port>
   <instanceName>x11</instanceName>
   <className>x12</className>
  </port>
  <port>
   <instanceName>x21</instanceName>
   <className>x22</className>
  </port>
 </userPorts>
 <providerPorts>
  <port>
   <instanceName>y11</instanceName>
   <className>y12</className>
  </port>
  <port>
   <instanceName>y21</instanceName>
   <className>y22</className>
  </port>
 </providerPorts>
</component>

Parameters:
xmlComponent - The xml code of one component.
Method Detail

toCcaPorts

protected CcaPort[] toCcaPorts(java.lang.String xmlPorts)
Parse the xml contents of several ports. The parsed values are copied into the class's attributes.

The XML code will contains something like this:
<port>
  <instanceName>x1</instanceName>
  <className>x2</className>
</port>
<port>
  <instanceName>y1</instanceName>
  <className>y2</className>
</port>

In this example, we will return an array of two ports. The 1st port has an instance name of x1 and a classname of x2. The 2nd port has an instance name of y1 and a classname of y2.

Parameters:
xmlPorts - The xml code for one or more ports.
Returns:
An arra the contains the ports we extracted from the xml code.