Skip to content
Lukas Schmelzeisen edited this page Apr 15, 2014 · 2 revisions

Configuring SDD works through editing an XML-File. For an example configuration, displaying Bands, Records, Users and relations between them, see: config.xml.

The structure of the configuration is as follows:

<?xml version="1.0"?>
<sdd-config>
  <!-- Miscellaneous Settings -->

  <details>
    <!-- Output Detail Levels -->
  </details>

  <nodes>
    <!-- Nodes Types -->
  </nodes>
</sdd-config>

Miscellaneous Settings

Specify a path where LevelDB is stored:

<leveldb path="/usr/share/sdd/leveldb"/>

Specify a path were Neo4j is stored:

<neo4j path="/usr/share/sdd/neo4j"/>

Specify a transaction mode:

<transactions mode="single"/>

Valid Arguments are for the mode attribute are single and block. Currently this setting does nothing.

Output Detail Level

<details>
  <detail name="nested"/>
  <detail name="properties"/>
  <!-- more details -->
</details>

You can specify an arbitrary number of details, and can choose any names you wish. Details are used to specify a set of options for which a node can define an output. It should be intuitively understandable what details are used for once you look at an example configuration.

Node Types

<nodes>
  <node type="band">
    <property name="name" type="String"/>
    <!-- more properties -->
    <relation name="records" type="record[]"/>
    <!-- more relations -->

    <output detail="nested">
      <!-- output specifification -->
    </output>
    <!-- more outputs -->

  </node>
  <!-- more nodes -->
</nodes>

Each node type consists of a type (a user defined string), a set of properties, a set of relations, and a set of outputs.

Properties

<property name="name" type="String"/>

Properties are simple key-value style attributes for a node.

name is a user defined name for that property. type defines the type of value the property stores. Currently only "String" is valid.

Relations

<relation name="records" type="record[]"/>

Relations are edges to other nodes in the graph.

name is a user defined name for that relation. type defines the node type this edge can point to. Only valid types are other node types defined in the configuration. If it's just a node type this relation will be a 1:1 relation, meaning each node of this node type has one (or none) edges of this relation type. Alternatively you can append [] behind a node type to make it an 1:n relation, meaning each node of this type can have any number (or none) of edges of this relation type.

Outputs

<output detail="nested">
  <out-property property="name"/>
  <!-- more out-properties -->
  <out-relation relation="records" detail="properties"/>
  <!-- more out-relations -->
</output>

A node output consists of a detail, which has to be a valid detail level specified in the <details/> set. Also each node can only have one output for each detail level. But you can choose to not define an output for a detail level. A node output further consists of out-properties and out-relations.

out-property

<out-property property="name"/>

Defines that the property defined under property should be part of this output. Property has to be a valid property defined in this node.

out-relation

<out-relation relation="records" detail="properties"/>

Defines that the relation defined under relation should be part of this output. Relation has to be a valid relation defined in this node. detail specifies the output detail level that should be used for rendering that node. Be careful not to specify endless recursion loops with this setting as SDD write requests won't terminate in that case.