Looking at SPINParsingExample, I don't see where sp gets imported. It
looks like an empty model is being created with no imports, even though
the comment indicates the import is happening somehow.
// Create an empty OntModel importing SP
Model model = ModelFactory.createDefaultModel();
model.setNsPrefix("rdf", RDF.getURI());
model.setNsPrefix("ex", "http://example.org/demo#");
Jeff
-----Original Message-----
From: Holger Knublauch [mailto:[email protected]]
Sent: Friday, May 01, 2009 12:46 PM
To: [email protected]
Subject: [tbc-users] Re: [SPIN] ARQ2SPIN.createQuery error
Hi Jeff,
I can't reproduce problems there. For example, change the query of the
SPINParsingExample class to contain a = and it still appears to work.
Could it be that your Model does not contain the SP import graph and
therefore does not know that = is a built-in operator?
Otherwise, could you send me a more complete example?
Thanks
Holger
On May 1, 2009, at 10:33 AM, Schmitz, Jeffrey A wrote:
>
> Hello,
> I'm trying to create a SPIN Query by calling ARQ2SPIN.createQuery.
> The query contains a FILTER with an equals operator:
>
> FILTER (?className = "Neutral") .
>
> Somewhere along the line this gets parsed as a Function (E_Equals)
> with Symbol '='.
>
> However, in ARQ2SPIN.createExpression, the call to:
>
> Resource f = getFunction(function);
>
> is returning a null 'f' Resource. This is because 'function' doesn't
> have an IRI. Then, I think because of the null f, the call to:
>
> FunctionCall call = SPINFactory.createFunctionCall(model, f);
>
> causes a null pointer exception. Should a check be made here for the
> case when f is null? Or should the function have been given an IRI?
>
> Thanks,
> Jeff
>
> >
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"TopBraid Composer Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-composer-users?hl=en
-~----------~----~----~----~------~----~------~--~---