Skip to content

Web UI configuration

Robert Bossy edited this page Jul 26, 2017 · 9 revisions

Table of Contents

File structure

<alvisir-ui-config>

    <alvisir-search filepath="SEARCH.xml" />

    <alternate-stylesheet filepath="STYLE.xslt" />

    <extra-css filepath="STYLE.css" />

    <display-params>
        <param name="..." value="..."/>
        ...
    </display-params>

    <resources>
        <ontology name="..." filepath="ONTO.json" />
        ...
    </resources>
</alvisir-ui-config>

alvisir-search (mandatory)

Specify the Search configuration file.

If the value is a relative path, then it will be resolved from the directory where this Web UI configuration file was found.

alternate-stylesheet

Use the specified XSLT file as the stylesheet instead of the default one.

extra-css

Use the specified CSS file as additional CSS rules.

display-params

Display parameters set display details.

logo-png-path

The logo file. This file should be a 293x120 PNG image.

background-jgp-path

Middle background file. This file should be a 8x201 JPEG image.

background-left-jgp-path

Left background file. This file should be a 417x201 JPEG image.

background-right-jgp-path

Right background file. This file should be a 1181x201 JPEG image.

cheatsheet-html-path

Cheat sheet contents. This file must be an HTML file with a single div element.

title

Page title of the search engine page.

copyright-owner

Copyright owner.

copyright-years

Copyright years.

about-url

Copyright link URL.

search-button-text

Search button text.

onto-names

Names of ontologies separated by commas.

subpaths-header

Title of the explanation sub-paths list.

synonyms-header

Title of the explanation synonyms list.

title-field

Field to extract for the response document title.

title-url-prefix

Prefix of the URL of the response document link.

title-url-field

Field to extract for the suffix of the URL of the response document link.

doc-field_N-header

Header of the response document Nth field slot.

doc-field_N

Field to extract for the response document Nth field slot.

The slots are presented as such:

  1. Authors
  2. Publication year
  3. Source (journal)
  4. Abstract or body
  5. Abstract or body

outlink_N-image

Icon for the Nth link of the response document.

outlink_N-hint

Tool tip contents for the Nth link of the response document.

outlink_N-url-prefix

URL prefix for the Nth link of the response document.

outlink_N-url-field

Field to extract for the URL suffix for the Nth link of the response document.

doc-score-header

Header for the response document relevance score.

resources

ontology

<ontology
    name="NAME"
    filepath="ONTO.json"
/>

Declare an ontology displayed as NAME whose classes are contained in ONTO.json.

If the path is relative, the it will be resolved from the directory where this configuration file was found.

The JSON file contains the class hierarchy. Each class is represented as a node with the following properties:

{
    "extid": "...",
    "intid": "...",
    "name": "...",
    "syns": [
        "...",
        "...",
    ],
    "descendantnb" : 42,
    "sublevelnb" : 13,
    "children": [
        {  },
        {  },
    ]
}
  • extid and intid are external and internal identifiers. They are usually the same.

  • name is the name of the class, its prefered label.

  • syns is an array containing all the alternate labels for the class.

  • descendantnb is the number of descendants of this class; a leaf class has a value equal to zero.

  • sublevelnb is the number of descendant levels, the maximum depth; a leaf class has a value equal to zero; the value must be one unit below the class parent's value.

  • children is an array containing the nodes representing each chlid (direct subclass) class.

If your initial ontology is expressed in OBO format, then you might use a dedicated script from the obo-utils repository:

obo2json.py --root ROOT_ID ONOT.obo >ONTO.json