[Mulgara-general] Help
Paul Gearon
gearon at ieee.org
Mon Jul 28 15:47:54 PDT 2008
OK, it was pointed out to me that each of the content handlers is
checked to see if it can handle any given file. I was under the
impression that you wouldn't see a message in the normal case.
A question I had when I wrote last time was about the server name you
were using. Have you set the server to use a name of "server2"? The
default is "server1", though it can be changed easily.
Paul
On Mon, Jul 28, 2008 at 5:38 PM, Paul Gearon <gearon at ieee.org> wrote:
> Hi Bill,
>
> The data you've provided to the load command is a file path without
> any other info. So the system uses the filename extension to try to
> work out what kind of data you've given it. In this case, your ".u8"
> extension was determined to be "mailbox" data.
>
> Try renaming the file (or creating a link to it) that uses .rdf as the
> extension.
>
> Regards,
> Paul
>
> On Mon, Jul 28, 2008 at 5:14 PM, Bill OConnor <wtoconnor at gmail.com> wrote:
>> hello,
>>
>> I have been trying to get my head wrapped around mulgara and thought that I
>> would try a small experiment.
>>
>> I downloaded dmoz constent.rdf.u8 and structure.rdf.u8 and wrote a groovy
>> script to load them into a model.
>>
>> I then query the model but I never seem to get any results, probably because
>> I do not understand something
>> about how mulgara works. Here is the code:
>>
>> import java.sql.*;
>>
>> // Mulgara packages
>> import org.mulgara.itql.
>> ItqlInterpreterBean;
>> import org.mulgara.query.Answer;
>>
>> ItqlInterpreterBean i = new ItqlInterpreterBean();
>>
>> String query = "create <rmi://localhost/server2#content>;";
>> String answerString = i.executeQueryToString(query);
>>
>> println answerString;
>>
>>
>> File f = new File("/home/wto/Projects/content.rdf.u8");
>> URI u = new URI("rmi://localhost/server2#content");
>> long r = i.load(f, u);
>> query = """select \$s \$p \$o from <rmi://localhost/server2#content> where
>> \$s \$p \$o;""";
>> Answer answer = i.executeQuery(query);
>>
>> answer.beforeFirst();
>>
>> while(answer.next()){
>> println answer.getObject(0);
>> }
>>
>> The results are:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <answer xmlns="http://mulgara.org/tql#"><query><message>Successfully created
>> graph rmi://localhost/server3#content</message></query></answer>
>> INFO [main] (MulgaraXAResourceContext.java:84) - Creating MulgaraXAResource
>> INFO [main] (DataInputTx.java:97) - Sending local resource :
>> file:/home/wto/Projects/content.rdf.u8
>> INFO [main] (MulgaraInternalTransaction.java:780) - Creating Transaction:
>> 1801334, state=null, inuse=0, using=0
>> INFO [main] (MulgaraInternalTransaction.java:780) - Finished Creating
>> Transaction: 1801334, state=CONSTRUCTEDUNREF, inuse=0, using=0
>> INFO [main] (MulgaraInternalTransaction.java:780) - Executing Operation:
>> 1801334, state=CONSTRUCTEDUNREF, inuse=0, using=0
>> INFO [main] (MulgaraInternalTransaction.java:780) - Initiating transaction:
>> 1801334, state=CONSTRUCTEDUNREF, inuse=0, using=0
>> INFO [main] (MulgaraInternalTransactionFactory.java:277) - Beginning
>> Transaction
>> INFO [main] (MBoxContentHandler.java:131) - Unable to parse streaming
>> content in mbox content handler.
>>
>> Any help would be appreciated.
>>
>> -bill
>> _______________________________________________
>> Mulgara-general mailing list
>> Mulgara-general at mulgara.org
>> http://mulgara.org/mailman/listinfo/mulgara-general
>>
>>
>
More information about the Mulgara-general
mailing list