IBM Streams 4.3.0

Editing with the Operator model editor (<operator-name>.xml)

You can edit Operator models with the Operator model editor in Streams Studio. The model for an operator is an XML document that is named after the operator. For example, the model file for the Functor operator is contained in a file named Functor.xml.

Before you begin

Create a primitive operator using the instructions in Creating C++ primitive operators or Creating Java primitive operators.

About this task

The Operator model editor contains two tabs:
  • The Tree tab contains the logical view of the model.
  • The Source tab contains the XML source for the model.

Context-sensitive help is available for all elements in the Tree view. Introductory material is provided for the top-most element. Help for the other elements describes the element and its properties. To access the context-sensitive help, select an element in the Tree view and press Ctrl+F1, or click Help > Dynamic Help. You can also access the context-sensitive help from the Properties view when it is open and displaying properties for an Operator model Tree view element.

To access model files in an SPL project, use the Operator model editor, and follow these steps:

Procedure

  1. In the Project Explorer view, locate the icon that represents an operator that you created and double-click it to open the Operator Model editor. Alternatively, you can open the Resources folder, and then open the Operator Model file in the operator's directory. The Operator Model file is named <operator-name>.xml. You can open the file with the SPL Operator Model editor as follows:
    1. Select the file and right-click on it.
    2. From the menu, select Open With > Other > SPL Operator Model Editor.
  2. In the Tree tab, open the twistie for the This image displays the icon in the Tree tab that is discussed in this step. icon to reveal child elements in the model.
  3. Select and right-click on an element.
  4. From the menu, select Show Properties. The properties for that element, if any, are displayed in the Eclipse Properties view.
  5. To change the value of a property, update the value in the Value column and click Save.
  6. To view and edit the XML source, select the Source tab. As you update items in the logical view within the Tree tab and save, the XML source is updated in the Source tab. Likewise, if you update the text in the Source tab and click Save, the Tree view is updated.