Example of a Specification File
Here is a complete example of a CLEF specification file, in this case for a simple data transformer node.
<?xml version="1.0" encoding="UTF-8"?>
<Extension version="1.0" debug="true">
<ExtensionDetails id="urlparser" providerTag="spss" label="URL CLEF Module" version="1.0"
provider="IBM Corp." copyright="(c) 2005-2011 IBM Corp." description="A Url Transform CLEF Extension"/>
<Resources>
<SharedLibrary id="urlparser_library" path="spss.urlparser/urlparser" />
</Resources>
<Node id="urlparser_node" type="dataTransformer" palette="fieldOp" label="URL Parser">
<Properties>
<Property name="id_fieldname" valueType="integer" label="ID field" />
<Property name="url_fieldname" valueType="string" label="URL field" />
</Properties>
<UserInterface>
<Icons />
<Tabs>
<Tab label="Types" labelKey="optionsTab.LABEL">
<PropertiesPanel>
<SingleFieldChooserControl property="id_fieldname" storage="integer" />
<SingleFieldChooserControl property="url_fieldname" storage="string" />
</PropertiesPanel>
</Tab>
</Tabs>
<Controls />
</UserInterface>
<Execution>
<Module libraryId="urlparser_library" name="">
<StatusCodes>
<StatusCode code="0" status="error" message="Cannot initialise a peer" />
<StatusCode code="1" status="error" message="error reading input data" />
<StatusCode code="2" status="error" message="Internal Error" />
<StatusCode code="3" status="error" message="Input Field Does Not Exist" />
</StatusCodes>
</Module>
</Execution>
<OutputDataModel mode="replace">
<AddField name="${id_fieldname}" fieldRef="${id_fieldname}"/>
<AddField name="${url_fieldname}" fieldRef="${url_fieldname}"/>
<AddField name="${url_fieldname}_server" storage="string" />
<AddField name="${url_fieldname}_path" storage="string" />
<AddField name="${url_fieldname}_field" storage="string" />
<AddField name="${url_fieldname}_value" storage="string" />
</OutputDataModel>
</Node>
</Extension>
The ExtensionDetails element supplies basic information about the extension that is used internally by IBM® SPSS® Modeler.
The Resources element specifies the location of a server-side library that will be referenced later in the file. The path specification indicates that the library is located in the IBM SPSS Modeler installation directory under \ext\bin\spss.urlparser\urlparser.dll.
This particular specification file does not include a CommonObjects element.
The Node element specifies all the information about the node itself:
- Under Properties, two properties are initially declared for later use on a tab of the node dialog.
- The UserInterface element defines the appearance and layout of the node dialog tab that is specific to this extension (other tabs are supplied by IBM SPSS Modeler).
- The Execution element defines items that are used when the node is executed. In this case, these items are the server-side library that was declared earlier in the file, and a set of messages for display if the execution returns a particular status code.
- The OutputDataModel element defines the data transformation that this node performs. It specifies that the input data model (the set of fields input to this node) is to be replaced by the set of fields defined here, which constitute the output data model (the set of fields passed on to all nodes downstream from here, unless the model is subsequently modified further). In this particular example, the node passes on the two original fields (id_fieldname and url_fieldname) unchanged, but adds four more fields whose names are derived from url_fieldname.
This particular specification file is taken from one of the example nodes that are supplied as part of the IBM SPSS Modeler installation. See the topic Data Transformer Node (URL Parser) for more information.