From SMW+ Semantic Enterprise Wiki

Jump to: navigation, search

This article offers information the process of downloading and installing the Data Import Extension. It also offers details on the code structure and its compatibility with older versions.

User manual information
Applies to release(s):
Note: use the tree-view on the right hand side to navigate in the user manuals.
Related video tutorials
Usage hints
no hints for this.
Create a new usage hint by entering the name of the hint in the field below.

Note: Name must start with "Help:" and it must be formulated as a question, e.g. "Help:How to define a property". Don't include the question mark!
Help out!
You feel that the documentation needs a cleanup or misses information, then help us to improve the quality of the articles.

Report a quality issue


Contents

Requirements

  • Apache HTTP Server
  • MySQL higher than 4.0.14 (Recommended MySQL 5.x)
  • PHP 5.2.x (PHP 5.3.x is not supported yet)
  • MediaWiki 1.15.x (see installation guide)
  • Semantic MediaWiki 1.5 (Please make reference to the installation instructions)
  • Halo extension 1.5.0 or higher
  • Semantic Gardening extension 1.4 or higher
  • Script Manager 1.0 or higher

Downloading

The Data Import extension allows you to integrate data from various sources i.e. RESTful web services, CSV files and SPARQL endpoints, into your Wiki.

You may download the Data Import extension code at SourceForge


You may also download the code directly via SVN from the Ontoprise source code repository, at svn+ssh://halodev.ontoprise.com/svn/HaloSMWExtension/trunk/extensions/DataImport/.

You may also use the following command line for download:

svn checkout svn+ssh://halodev.ontoprise.com/svn/HaloSMWExtension/trunk/extensions/DataImport/

Installing

The requirements of the Data Import Extension are the Halo Extension v.1.5, the Semantic Gardening Extension 1.3.1 and their dependencies.


Note: You will also need to have WikisSysop rights so as to enable of the Data Import Extension.
  1. Go to LocalSettings.php
  2. Add the following line of code, after the Halo and the Semantic Gardening extensions were initialized:
    include_once('extensions/DataImport/includes/DI_Initialize.php'); enableDataImportExtension(); 
  3. Activate the following two PHP extensions in your php.ini:
     extension=php_imap.dll
     extension=php_mime_magic.dll
  4. Run the "Initialize or update tables" script on the special page "Special:SMWAdmin".

There you go! You may now use the Data Import Extension.


Note: If you already used a prior version of the Web Service extension, then you have to replace the dots in the path-attributes of your existing Wiki Web Service Definition by slashes, so that the paths are conform to the XPath syntax.

Installing the Inter Wiki Article Importer

  1. Add the following two lines to your LocalSettings.php:
    include_once('extensions/DataImport/IAI/includes/IAI_GlobalFunctions.php');
    enableIAI();
  2. Go to extensions/DataImport/specials/TermImport/TL/ConnectLocal.cfg and add the following lines:
    <Module>
    	    <id>Interwiki Article Import</id>
    	    <class>DALInterwikiArticleImport</class>
    	    <file>DAL/SMW_DALInterwikiArticleImport</file>
    	    <desc>Imports articles from an external Mediawiki.</desc>
    </Module>


Code structure

/includes

  • DI_Initialize.php - Initialiser for the data import extension which is called from LocalSettings.php

/languages

  • Files that provide labels for the German and the English languages

/scripts

  • /Language
    • language scripts
  • /TermImport
    • termImport.js - Methods for the special page Import vocabulary.
  • /WebServices
    • def-webservice.js - Methods for the special page Define WebService
    • semantic-toolbar-container.js - Extends the semantic toolbar with a link to the special page Use web service.
    • use-webservice.js - Methods for the special page Use web service
    • webservices-rep.js - Methods for the special page WebServiceRepository

/skins

  • TermImport
    • Stylesheets and icons for the term import component
  • webservices
    • Stylesheets and icons for the web service component


/specials

  • /TermImport
    • /DAL
      • SMW_DALReadCSV.php - Implementation of the Data Access Layer interface that can read simple CSV files.
      • SMW_DALReadTIXML.php - Implementation of the Data Access Layer interface that can read the TIXML format from an article in the wiki.
    • TL
      • SMW_TLConnectLocal.php - Implementation of the Transport Layer interface that can connect DAL modules that reside in local folders of the wiki.
      • ConnectLocalDAL.cfg - Defines which DAL moduls are available to the connect local TL.
      • TransportLayer.cfg - Configuration file for the transport layer.
    • SMW_CL.php - Implementation of the Control Layer. It manages the policies and the modules of the other three layers. Furthermore it generates and evaluates the UI.
    • SMW_IDAL.php - Interface of the Data Access Layer
    • SMW_ITL.php - Interface of the Transport Layer
    • SMW_IWIL.php - Interface of the Wiki Import Layer
    • SMW_TermImportBot.php - Represents the gardening bot that imports the terms from the vocabulary.
    • SMW_TermImportSpecial.php - Represents the special page Import vocabulary
    • SMW_WIL.php - Implementation of the Wiki Import Layer. It can connect to the Transport Layer modules that are specified in the configuration file TL/TransportLayer.cfg.
    • SMW_XMLParser.php - Provides some convenience functions on top of the PHP XML parser.
  • /WebServices
    • /resultprinters
      • Contains all result printers for web service results.
    • storage
      • SMW_WSStorageSQL.php - Creates and accesses the MySQL database tables of the web service component.
    • SMW_DefineWebServiceAjaxAccess.php - Provides methods for ajax-calls used by the special page Define WebService
    • SMW_DefineWebServiceSpecial.php - Represents the special page Define WebService
    • SMW_IWebServiceClient.php - Interface for the Soap- and the RestWebServiceClient
    • SMW_RESTClient.php - Client for RESTful web services
    • SMW_SOAPClient.php - Client for Soap web services
    • SMW_UseWebServiceAjaxAccess.php - Provides methods for ajax-calls used by the special page Use WebService
    • SMW_UseWebServiceSpecial.php - Represents the special page Use WebService
    • SMW_WebService.php - Provides a represantation of a wiki web service definition and allows to call the corresponding web service.
    • SMW_WebServiceCache.php - Provides some static methods for cache management
    • SMW_WebServiceManager.php - Main entry file for the web service component.
    • SMW_WebServicePage.php - Enhances pages in the namespace WebService with additional information, like all articles that use the web service.
    • SMW_WebServiceRepositoryAjaxAccess.php - Provides methods for ajax-calls used by the special page WebServiceRepository
    • SMW_WebServiceRepositorySpecial.php - Represents the special page WebServiceRepository
    • SMW_WebServiceResultPrinter.php - Abstract class for result printers for the web service component
    • SMW_WebServiceSettings.php - Contains the settings that configure the web service component.
    • SMW_WebServiceUsage.php - Responsible for the #ws parser function
    • SMW_WSCacheBot.php - Represents the gardening bot that is responsible for deleting outdated cache entries.
    • SMW_WSStorage - Singleton that provides access to the actual database object that stores all data concerning the web web service component.
    • SMW_WSUpdateBot.php - Represents the gardening bot that is responsible for updating outdated cache entries.
    • SMW_XPathProcessor.php - Responsible for processing XPath statements

Compatibility with older versions

The Data Extension is included in the Halo Extension versions up to the 1.4.2 version as a web service component. The Web Service component used a proprietary dot-syntax in the WWSD for the path-attribute of parameters and the resulting parts. The WWSDs that were created with older Web Service component versions will eventually no longer work since we replaced that dot-syntax with XPath statements. The only way to make them work is to start every pathstatement with a |/| and to replace every dot with a |/|. Template:Comments

add a comment


Copyright © 2010 ontoprise GmbH.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the article "GNU Free Documentation License".

This page was last modified on 26 July 2010, at 16:44.This page has been accessed 1,484 times.
toolstools
tools
SemanticTreeview close tree