NIH | National Cancer Institute | NCI Wiki  

Introduction

LexWiki Publisher helps to transform and later publish entities in user terminology/Ontology to a target platform. Currently LexWiki Publisher provides a default output which is suitable for Semantic MediaWiki enabled with LexWiki extension. This utility is conceptualized to make it easier for users to publish their content to Wiki faster and with ease. Once the entities are published to Wiki they can benefit from other Semantic MediaWiki features. Each wiki page renders one term or entity in user's terminology. LexWiki Publisher is one of the array of tools that work and are based on the LexEVS model and framework implementation.

What is LexWiki?

LexWiki Publisher publishes pages that are published to a LexWiki. LexWiki is a Semantic MediaWiki extension and it is based on the LexEVS model. LexWiki is a set of PHP program libraries, Semantic MediaWiki templates, forms, properties and enabled wiki services. LexWiki was conceived, designed and developed at Mayo Clinic to help publish ontology/terminology terms as wiki pages. From now on in this document the word "LexWiki" will refer to a Semantic MediaWiki which has the LexWiki extension enabled and configured according to user's specification. LexWiki utilizes relationship properties among wiki pages to simulate relationship among terminology terms and concepts.

LexWiki is available as a package from the Vocabulary Knowledge Center LexWiki page, Installation and Downloads section. The user can download LexWiki and configure it according to the supplied instructions. Please note that LexWiki framework also employs features from other Semantic MediaWiki extensions to provide additional functions. These third party extensions may or may not be upgraded along with newer versions of Semantic MediaWiki. When it comes to publishing content using LexWiki Publisher, it is assumed that LexWiki framework's basic extensions (latest available) are installed.

What is LexWiki Publisher?

LexWiki Publisher 2.0 is a Java library which allows users to publish their ontology/terminology from a LexEVS 6.0 (or later) repository to a format which could be published to a LexWiki. LexWiki Publisher can be used as a stand-alone Java Library or can be augmented into a user's application. It is assumed that the source ontology is first loaded into a LexEVS 6.0 repository successfully without any issues. Once the contents are in LexEVS 6.0 repository then the user can either run LexWiki Publisher from command line or integrate it in an application and run it using its application interfaces.

Why do we need LexWiki Publisher?

LexWiki Publisher is a faster and easier way to get your contents transformed and published to LexWiki. Without LexWiki Publisher the user has to write customized transformation routines to make terms published as pages. Customized transformation may be tedious to write and fragile to maintain and it may not work as a universal transformation tool for any ontology other than the ontology for which it was written.

Another option is to 'manually' create pages for each concept and association in the terminology. This may work if the terminology is small (few nodes), but will not be a practical solution for medium and large sized ontologies.

LexWiki Publisher is created by Mayo Clinic, which conceptualized, developed, and has been a core part of contnuing development of both LexEVS and the LexWiki model and frameworks. Mayo Clinic is going to keep LexWiki Publisher updated with latest LexEVS releases and LexWiki installers (whenever possible) so there is no confusion and data loss when contents are transformed from LexEVS for a LexWiki platform.

Architecture

flow diagram for LexWiki Publisher

At a high level, LexWiki Publisher is divided into three parts:

  • The first part is to communicate with LexEVS repository and make sure we resolve and retrieve all the requested terms and their relationship graphs correctly.
  • The second part is the core part of LexWiki Publisher which transforms a term's content into text which makes sense in LexWiki world. LexWiki text is a set of LexWiki template calls along with Semantic Forms and Wiki properties. The LexWiki templates are extensions to the Semantic MediaWiki templates features and map (usually one-to-one) to LexEVS model components. LexWiki properties are configurable according to what properties a user's ontology has. These properties are another layer on top of Semantic MediaWiki properties and help relate one concept term page to another in the LexWiki world.
  • The third part is the delivery of the transformed text to LexWiki which can be done in two ways:
    • One way is to collect all text generated from transformation routine and load them as pages (one by one) using a PHP script. This PHP script is customized to load these specific text files (containing transformed text) to LexWiki by extending Wiki's maintenance load routine.
    • The other way of loading pages is to use a third party tool like MediaWiki Bot to connect LexWiki Publisher directly to the Wiki and post each page one by one. This delivery solution is relatively slower and may take a reasonable amount of time to load a bigger ontology. In this solution we have to spend extra time and efforts to manage a third party tool. The third party tool may not work well with latest version of Semantic MediaWiki, even though it had been tested and works well with older versions of Semantic MediaWiki.

Publishing Your Content

LexWiki Publisher provides the first way of delivering pages to LexWiki: Converting pages into text files (one file for each concept) and a routine to load them to LexWiki. This routine is a PHP script (discussed above) and may require users to have access and execute permissions to the Wiki's maintenance directory.

To accomplish a successful transfer of your terminology from LexEVS to LexWiki:

  • Follow the instructions to install LexWiki Publisher.
  • Follow the instructions to create an XML configuration file, an instance of LexWiki Publisher schema, for LexWiki Publisher to work correctly and transform content in a desired way. The schema is defined here.
  • Launch the LexWiki Publisher program by invoking the script*"runpublisher.bat"* provided in the download. You can also write your own batch file with "edu.mayo.lexwiki.publish.LexWikiPublisher" as the main executing Java class and pass a configuration XML file as the first command line argument.
    At the end of a successful run you should have a set of files in the target directory (as specified in configuration file).
  • Open a command prompt to the maintenance directory of your LexWiki installation.
  • Run the publish PHP using the directory location of the files created as the only argument:
    php publish.php /home/myhomedir/tobepublishedpages