The Plate Example

As an example of the definition of a Component Descriptor, consider the Plate component.

The Descriptor for this component is listed below.

<?xml version="1.0" encoding="UTF-8"?>
<MetaModel name="com.engineous.component.plate.Plate"
   version="2017"
   supername="com.engineous.system.component.Activity" superversion="2.*.*" 
>
   <DisplayName>Plate</DisplayName>
   <Description>Calculates the area, volume, and weight of a plate of
      specified shape and thickness and composed of a specified 
      material
   </Description>
   <Icon>com/engineous/component/Plate/images/plate.gif</Icon>
   <Editor type="com.engineous.desktop.sdk.DesktopEditor">
      com.engineous.component.plate.PlateEditor
   </Editor>
   <Editor type="com.engineous.sdk.component.ComponentAPI">
   com.engineous.component.plate.PlateAPI
   </Editor>
   <Runtime type="com.engineous.sdk.runtime.Component">
    com.engineous.component.plate.PlateExecutor
   </Runtime>
   <Handler type="com.engineous.sdk.component.ComponentHandler">
      com.engineous.component.plate.PlateHandler
   </Handler>
   <UserHelp helpIndex="plate help.htm" type="htmlzip"> 
      com/engineous/component/Plate/resources/help.zip
   </UserHelp>
   <Variables>
      <Variable description="" mode="Input" name="Dimensions"
        tag="Dimensions" role="Parameter" structure="Aggregate"/>
      <Variable description="" mode="Input" name="Thickness"
        tag="Thickness" role="Parameter" structure="Scalar" 
        type="com.engineous.datatype.Real">
        <Value><![CDATA[1.0]]></Value>
      </Variable>
      <Variable description="" mode="Input" name="Shape"
        tag="Shape" role="Property" structure="Scalar"
        type="com.engineous.datatype.String">
        <Value><![CDATA[circle]]></Value>
      </Variable>
      <Variable description="" mode="Input" name="Material"
        tag="Material" role="Property" structure="Scalar" 
        type="com.engineous.datatype.String">
        <Value><![CDATA[aluminum]]></Value>
      </Variable>
      <Variable mode="Output" name="Weight" role="Parameter"
      	saveToDB="true" structure="Scalar" tag="Weight" 
      	type="com.engineous.datatype.Real" typeWrittenVersion="2.0.0">
        <Value><![CDATA[0.0]]></Value>
       </Variable>
     <Variable mode="Output" name="Area" role="Parameter"
        saveToDB="true" structure="Scalar" tag="Area"
        type="com.engineous.datatype.Real" typeWrittenVersion="2.0.0">
        <Value><![CDATA[0.0]]></Value>
       </Variable>
	   <Variable mode="Output" name="Volume" role="Parameter"
        	  saveToDB="true" structure="Scalar" tag="Volume"
        	  type="com.engineous.datatype.Real" typeWrittenVersion="2.0.0">
        <Value><![CDATA[0.0]]></Value>
       </Variable>
      <Variable name="affinities" 
        tag="affinities" role="property" 
        structure="Aggregate">
          <Variable role="property"
            structure="scalar" name="Host" 
            tag="Host" 
            type="com.engineous.datatype.String"> 
          </Variable>
          <Variable role="property"
            structure="scalar" name="OS"
            tag="OS"
            type="com.engineous.datatype.String">
            <Value><![CDATA[WINDOWS]]></Value>
          </Variable>
          <Variable role="property" 
            structure="scalar" name="Others"
            tag="Others" 
            type="com.engineous.datatype.String">
          </Variable>
       </Variable>
   </Variables>
</MetaModel>

Other possible attributes that can be defined in the Descriptor are Affinities and UserHelp.

In this example, an affinity has been set to force this component to execute on a Windows computer when it is executed in a full SIMULIA Execution Engine distributed environment. You could also set affinity values for Host or the generic Others by adding a Value node to the appropriate element.

A help file has been defined for this component in the example above. For more information on adding help files to your component, see Adding Help Files.