Configuration

Configuration of the Application #

Dossier Configuration #

For each DBMS, we can define the rendering type of property key values such that URLs become links or image URLs show the respective image etc. This is done in a separate dossier configuration.

As an example, consider the following data about a node in a DBMS of name neo4j:

CREATE (derivo:Company
   { name: "Derivo",
     image: "https://www.derivo.de/fileadmin/externe_websites/ext.derivo/images/layout/logo_deutsch_01.png",
     email: "info@derivo.de",
     url: "https://www.derivo.de/home/" })

In Neo4j Browser this node exposes as follows:

Now, to specify the UI types of the respective property keys (called attributes in the configuration), a YAML dossier configuration is required:

version: 1
databases:
  - database: neo4j
    attributes:
      - id: 'image'
        type: 'IMAGE'
      - id: 'url'
        type: 'URL'
      - id: 'email'
        type: 'EMAIL'

SemSpect is reading the dossier configuration by default from the following path:

  • <DBMS_HOME>/plugins/semspect_dossier_configuration.yaml

Result in SemSpect:

Facet Configuration (Experimental) #

In SemSpect, facets are configurable filter for groups shown in separate sections of the dossier on the right-hand side. They behave in the same way as the label filters and can be collapsed or expanded in the case of a hierarchy. In fact, facets display labels from the list of labels. With the help of a facet configuration one can define which parts of the labels at which particular combination are shown as a separate facet. This is useful to distinguish between the backbone label schema and labels that provide a “second perspective” on the data. As an example, consider the following data set that deals with clothes and their sales status:

In case our main focus is on the type of clothing (shirt, trouser etc.) it might be useful to declare the sales information as a facet. This has the advantage that the label tree and exploration menu becomes shorter (facets are not shown in the label tree and exploration menu). However, the facet labels are still available for filtering on those groups that contain nodes with those labels:

Please note that all specified labels of a facet no longer appear in the label tree view shown on the left, unless they also occur in a branch that is not declared as a facet.

Facets are defined in a facet configuration file. Each facet definition consists of one or more so-called facet values and a facet name. There are two types of facets:

  • simple (default): only the listed labels are used as facet values, not their sub-labels (unless they are also listed). This setting is mostly relevant for Neo4j SemSpect where the label hierarchies are computed from the data.
    Remark: unlisted sub-labels of a simple facet labels will be moved up one level in the label tree and histograms (or hidden if they appear in a neighbour branch).

  • subtree: the listed labels and all their sub-labels are used as facet values.
    Remark: sub-labels of a subtree facet label that appear in other non facet branches of the label hierarchy can still be found there.

In the example above, the following facet definition was given:

version: 1
databases:
  - database: neo4j
    facets:
      - name: 'Product type'
        values: [ 'Special_offer',
                  'Remaining_item' ]
        type: simple
Click to expand the matching Neo4j data of this example
create (:Textiles:Trousers {name: "trouser1"});
create (:Textiles:Trousers:Special_offer {name: "trouser2"});
create (:Textiles:Trousers {name: "trouser3"});
create (:Textiles:Trousers:Spring {name: "trouser4"});
create (:Textiles:Trousers {name: "trouser5"});
create (:Textiles:Trousers:Special_offer {name: "short1"});
create (:Textiles:Trousers {name: "short2"});
create (:Textiles:Pullover {name: "pullover1"});
create (:Textiles:Pullover {name: "pullover2"});
create (:Textiles:Pullover:Remaining_item {name: "pullover3"});
create (:Textiles:Pullover {name: "pullover4"});

create (:Textiles:Shirts:Special_offer {name: "shirt1"});
create (:Textiles:Shirts {name: "shirt2"});
create (:Textiles:Shirts:Spring {name: "shirt3"});
create (:Textiles:Shirts {name: "tshirt1"});
create (:Textiles:Shirts {name: "tshirt2"});

create (:Textiles:Dresses {name: "dress1"});
create (:Textiles:Dresses {name: "dress2"});
create (:Textiles:Dresses:Remaining_item {name: "dress3"});

create (:Textiles:Suits {name: "suit1"});
create (:Textiles:Suits:Special_offer {name: "suit2"});
create (:Textiles:Suits {name: "suit3"});
create (:Textiles:Suits {name: "suit4"});

match (n1 {name: "trouser1"}), (n2 {name: "pullover1"}) create (n1)-[:MATCHES]->(n2);
match (n1 {name: "trouser1"}), (n2 {name: "shirt1"}) create (n1)-[:MATCHES]->(n2);
match (n1 {name: "trouser2"}), (n2 {name: "pullover1"}) create (n1)-[:MATCHES]->(n2);
match (n1 {name: "trouser2"}), (n2 {name: "pullover2"}) create (n1)-[:MATCHES]->(n2);
match (n1 {name: "trouser3"}), (n2 {name: "pullover3"}) create (n1)-[:MATCHES]->(n2);
match (n1 {name: "trouser4"}), (n2 {name: "pullover4"}) create (n1)-[:MATCHES]->(n2);
match (n1 {name: "trouser4"}), (n2 {name: "shirt3"}) create (n1)-[:MATCHES]->(n2);
match (n1 {name: "trouser4"}), (n2 {name: "shirt2"}) create (n1)-[:MATCHES]->(n2);

SemSpect is reading the facet definitions from the following file (if existent):

  • <DBMS_HOME>/plugins/semspect_facets.yaml