using topbraid composer with allegrograph...allegrograph 4.0 runs in a linux x86-64 native...

16
AllegroGraph is a trademark of Franz Inc. TopBraid Composer is a trademark of TopQuadrant Inc. 2201 Broadway, Suite 715 Oakland, CA 94615 Phone: 510-452-2000 www.franz.com Using TopBraid Composer with AllegroGraph

Upload: others

Post on 03-Jan-2021

10 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Using TopBraid Composer with AllegroGraph...AllegroGraph 4.0 runs in a Linux x86-64 native environment, which Windows and Mac users can simulate using the AllegroGraph Virtual Machine

AllegroGraph is a trademark of Franz Inc. TopBraid Composer is a trademark of TopQuadrant Inc.

2201 Broadway, Suite 715 Oakland, CA 94615

Phone: 510-452-2000 www.franz.com

Using TopBraid Composer with AllegroGraph

Page 2: Using TopBraid Composer with AllegroGraph...AllegroGraph 4.0 runs in a Linux x86-64 native environment, which Windows and Mac users can simulate using the AllegroGraph Virtual Machine

AllegroGraph is a trademark of Franz Inc. TopBraid Composer is a trademark of TopQuadrant Inc.

Using TopBraid Composer with AllegroGraph 4.1 .....................................................................3

Installing TopBraid Composer ....................................................................................................3

Installing the AllegroGraph Plugin ............................................................................................3

Testing the Installation.................................................................................................................5

Connect TBC to AllegroGraph ..............................................................................................6

SPARQL and Prolog Queries.................................................................................................11

Connecting TBC to the Virtual Server on Windows or Mac ...............................................13

TBC and VM on the Same Computer ................................................................................13

Connect TBC to the VM on a Local Network ...................................................................14

Checking for Updates...............................................................................................................15

Removing the AllegroGraph Plugin........................................................................................15

Page 3: Using TopBraid Composer with AllegroGraph...AllegroGraph 4.0 runs in a Linux x86-64 native environment, which Windows and Mac users can simulate using the AllegroGraph Virtual Machine

3

Using TopBraid Composer with AllegroGraph 4.1

Top-Braid Composer (TBC), a product of TopQuadrant, Inc., is a graphical development environment for modeling data, connecting data sources, and designing queries, rules and semantic data processing chains.

The AllegroGraph TopBraid Composer Plugin lets the TBC user connect to an AllegroGraph server; load data into an AllegroGraph triple store; and execute SPARQL queries against the triple store. If the user has the proper AllegroGraph privileges, it is also possible to issue Prolog queries and to use RDFS++ inference.

Installing TopBraid Composer

Download TopBraid Composer from the TopQuadrant web site:

http://www.topquadrant.com/products/TB_download.html

The TopBraid Composer installation instructions are here:

http://www.topquadrant.com/products/TB_install.php

You may use either the Standard Edition or the Maestro Edition.

Installing the AllegroGraph Plugin

Run TopBraid Composer.exe. You should find it in the top-level directory of the files you unzipped.

In the TopBraid interface, open the Help menu and select Install new software... This opens the Available Software dialog.

Page 4: Using TopBraid Composer with AllegroGraph...AllegroGraph 4.0 runs in a Linux x86-64 native environment, which Windows and Mac users can simulate using the AllegroGraph Virtual Machine

4

Click the Add... button in the upper right corner. This opens the Add Site dialog box.

Type "AllegroGraph Plugin" into the Name field, and paste the AllegroGraph Plugin URL into the Location field. The URL is:

http://www.franz.com/ftp/pub/agraph/eclipse/tbc/plugins/

Click the OK button to close the Add Site dialog. This returns focus to the Available Software dialog.

Page 5: Using TopBraid Composer with AllegroGraph...AllegroGraph 4.0 runs in a Linux x86-64 native environment, which Windows and Mac users can simulate using the AllegroGraph Virtual Machine

5

On the Available Software dialog, uncheck the Group items by category checkbox. Then check the box next to com.franz.agraph.feature. Click the Next button.

Confirm that you want to install the AllegroGraph plugin. Accept the license agreement. Ignore the warning about unsigned plugins. The Available Software dialog will close.

Close and restart TopBraid Composer to activate the AllegroGraph plugin.

Testing the Installation

To test the AllegroGraph plugin installation, you will need access to an AllegroGraph server (version 4.0.6 or later). You will need the URL and port number of the server, plus the name and password of an AllegroGraph user who is authorized to create and manipulate a triple store.

The test consists of taking a .owl ontology in the TopBraid environment, converting it into AllegroGraph format, pushing it to a triple store on the AllegroGraph server, and then running a SPARQL query that returns results from AllegroGraph back to TopBraid Composer.

Page 6: Using TopBraid Composer with AllegroGraph...AllegroGraph 4.0 runs in a Linux x86-64 native environment, which Windows and Mac users can simulate using the AllegroGraph Virtual Machine

6

Connect TBC to AllegroGraph

Create a new folder in the Navigator Pane to contain your AllegroGraph ontologies. Right-click the TopBraid node and follow the context menu to New > Folder. Name the folder AG4.

In the Navigator Pane, open the TopBraid/Examples node and double-click on geotravel.owl. This will open the ontology in various panes of the TopBraid interface.

Page 7: Using TopBraid Composer with AllegroGraph...AllegroGraph 4.0 runs in a Linux x86-64 native environment, which Windows and Mac users can simulate using the AllegroGraph Virtual Machine

7

The next step is to export geotravel.owl as an AllegroGraph database. In the Navigator Pane, right-click the TopBraid/AG4 node, and select Export from the context menu. In the Export dialog box, open the TopBraid Composer node and select Export/Merge/Convert RDF Graphs. Click Next.

Page 8: Using TopBraid Composer with AllegroGraph...AllegroGraph 4.0 runs in a Linux x86-64 native environment, which Windows and Mac users can simulate using the AllegroGraph Virtual Machine

8

On the next panel, select the AllegroGraph 4 Database Storage (*.ag4) format, and give the target file a name, such as geotravel. No suffix is needed on the file name. We only want to export one graph: geotravel.owl. Click Next.

Page 9: Using TopBraid Composer with AllegroGraph...AllegroGraph 4.0 runs in a Linux x86-64 native environment, which Windows and Mac users can simulate using the AllegroGraph Virtual Machine

9

On the next panel, enter your AllegroGraph URL, port number, and credentials. Enter the name of an existing AllegroGraph catalog, or leave that field blank to use the default RootCatalog. Then enter the name of the repository you want to use within that catalog, such as tbcgeo. If you use a new repository name, AllegroGraph will create a repository for you.

(Note that Catalogs cannot be created from TopBraid Composer. New catalogs are created by editing the AllegroGraph server's configuration file.)

Page 10: Using TopBraid Composer with AllegroGraph...AllegroGraph 4.0 runs in a Linux x86-64 native environment, which Windows and Mac users can simulate using the AllegroGraph Virtual Machine

10

Click Finish. TopBraid Composer will upload the data to the AllegroGraph server. This might take a while, depending on the size of your ontology file. For the geotravel example, it takes a few seconds.

When the data finishes loading, you should see a geotravel.ag4 file in your TopBraid/AG4 folder.

Close the geotravel.owl overview panel. (If you omit this step, TopBraid will complain about having two copies of the same model open at the same time when you export to AllegroGraph.)

Page 11: Using TopBraid Composer with AllegroGraph...AllegroGraph 4.0 runs in a Linux x86-64 native environment, which Windows and Mac users can simulate using the AllegroGraph Virtual Machine

11

In the Navigator Pane, double-click the geotravel.ag4 file. You'll see an AG4 Repository Connection dialog box that displays your AllegroGraph connection information and credentials. There is no need to change these settings. Click Finish.

SPARQL and Prolog Queries

Open TopBraid's SPARQL editor pane (look for the SPARQL tab). It contains a default SPARQL query that searches for rdfs:subClassOf triples. The SPARQL window has three buttons that let you run a query with or without locally-configured inferencing. Click the green "Run" button to run this query. After a few seconds you will see a table of ?subject and ?object values returned from the triple store.

Page 12: Using TopBraid Composer with AllegroGraph...AllegroGraph 4.0 runs in a Linux x86-64 native environment, which Windows and Mac users can simulate using the AllegroGraph Virtual Machine

12

The TopBraid SPARQL editor lets you use TopBraid's local inference features. To use AllegroGraph's server-side inference (and to pose Prolog queries in addition to SPARQL queries), you'll need to open the Agraph View. Select Window menu > Show view > Other... to open the Show View dialog box. In the TopBraid folder select the Agraph view. Click the OK button.

Page 13: Using TopBraid Composer with AllegroGraph...AllegroGraph 4.0 runs in a Linux x86-64 native environment, which Windows and Mac users can simulate using the AllegroGraph Virtual Machine

13

This opens a new query-editing pane in the TopBraid window. This Agraph view accepts both SPARQL and Prolog queries. It has three buttons that perform the following functions:

• Execute the query. • Toggle on/off AllegroGraph's reasoning. • Toggle SPARQL/Prolog query language.

To try a Prolog query, copy this text into the edit pane:

(select (?s ?o) (q ?s !rdfs:subClassOf ?o))

Click the button that selects the Prolog query language. Then click the Run button.

Query results from the Prolog query prove that the AllegroGraph plugin is installed and working correctly.

Connecting TBC to the Virtual Server on Windows or Mac

AllegroGraph 4.0 runs in a Linux x86-64 native environment, which Windows and Mac users can simulate using the AllegroGraph Virtual Machine. The virtual machine has AllegroGraph 4.0 pre-installed on port 10035. TopBraid Composer can be connected to the virtual machine for experiments where performance is not critical.

Both the virtual server and TopBraid can be installed on the same laptop, if desired, or TopBraid can connect to the virtual machine from another computer across a network.

TBC and VM on the Same Computer

To connect TopBraid Composer to a virtual AllegroGraph server, with both running on the same physical computer, all you need is the IP address of the virtual machine. This IP address is usually assigned when the virtual machine comes on line, and may change from session to session. To discover the current IP address, open a terminal window in the virtual machine and

Page 14: Using TopBraid Composer with AllegroGraph...AllegroGraph 4.0 runs in a Linux x86-64 native environment, which Windows and Mac users can simulate using the AllegroGraph Virtual Machine

14

type the ifconfig command. (Note: ifconfig, not ipconfig.) The server's IP address is in the second line of the response.

Use this IP address and the AllegroGraph port number (10035) when you connect TopBraid Composer to the virtual AllegroGraph server.

Connect TBC to the VM on a Local Network

The AllegroGraph Virtual Machine's network adaptor is set of Network Address Translation (NAT) by default. This setting makes it easy to connect TBC to the VM when both are on the same host computer. If you have TBC and the VM running on separate computers, you might encounter difficulty making the connection.

To connect to a virtual AllegroGraph server on a network computer, you will have to reconfigure the virtual machine's network adaptor. Open the VM menu > Settings... > Network Adaptor dialog box. The object is to turn off NAT and enable "bridging" instead.

Windows

Select "Bridged: Connect directly to the physical network." Check the option that says "Replicate the physical network connectivity state."

Page 15: Using TopBraid Composer with AllegroGraph...AllegroGraph 4.0 runs in a Linux x86-64 native environment, which Windows and Mac users can simulate using the AllegroGraph Virtual Machine

15

Mac

Select "Connect directly to the physical network (Bridged)." Select "Autodetect."

Close the dialog box and reboot the virtual machine. Use "ifconfig" to get the new IP address. This address (using port 10035) will connect across the network.

If there are further issues, see the VMware documentation.

Checking for Updates

The AllegroGraph TopBraid Composer plugin will be updated as needed. To check for an update, open the Help menu and select Check for Updates.

Removing the AllegroGraph Plugin

To remove the AllegroGraph plugin from TopBraid Composer, open the Help menu and select Install New Software.... On the resulting dialog box, click the link labeled "What is already installed?"

This opens a list of installed plugins. Click on com.franz.agraph.feature and then on the Uninstall... button.

Page 16: Using TopBraid Composer with AllegroGraph...AllegroGraph 4.0 runs in a Linux x86-64 native environment, which Windows and Mac users can simulate using the AllegroGraph Virtual Machine

16

Copyright (c) 2005 - 2010 Franz, Incorporated Last updated 20 September 2010 at 15:43