Information on how to use Mulgara within Topaz

Mulgara with Topaz

First, you need to add a few things to your classpath:

  • ~/.m2/repository/axis/axis/1.2.1/axis-1.2.1.jar
  • ~/.m2/repository/axis/axis-jaxrpc/1.3/axis-jaxrpc-1.3.jar
  • ~/.m2/repository/axis/axis-wsdl4j/1.5.1/axis-wsdl4j-1.5.1.jar
  • ~/.m2/repository/axis/axis-saaj/1.2.1/axis-saaj-1.2.1.jar
  • ~/.m2/repository/commons-logging/commons-logging/1.0.4/commons-logging-1.0.4.jar
  • ~/.m2/repository/commons-discovery/commons-discovery/0.2/commons-discovery-0.2.jar
  • ~/.m2/repository/org/jrdf/jrdf/0.3.4/jrdf-0.3.4.jar
  • ~/.m2/repository/org/topazproject/mulgara-client/0.5-SNAPSHOT/mulgara-client-0.5-SNAPSHOT.jar
  • ~/.m2/repository/org/topazproject/auth-helper/0.5-SNAPSHOT/auth-helper-0.5-SNAPSHOT.jar

Then instantiate the itql helper:

  import org.topazproject.mulgara.itql.*;
  uri = "http://localhost:9090/fedora/services/ItqlBeanService";
  itql = new ItqlHelper(new URI(uri));

Creating aliases:

  Map aliases = ItqlHelper.getDefaultAliases();
  aliases.put("foaf", "http://xmlns.com/foaf/0.1/");

Issuing a query:

  itql.doQuery("...;", aliases /* or null for default set */);

How to get a list of models

select $model from <local:///topazproject#> 
  where $model <rdf:type> <tucana:Model>;