Hey,

I have a situation where SPIN expression arguments come in directly from 
user input (faceted search). For example, sp:arg2 as numeric literal for 
sp:ge or as plain literal for sp:regex.

The problem is, that if the user submits the SPIN RDF with empty input 
values, sp:arg2 property is missing on expression, and building a query I 
either get a com.hp.hpl.jena.query.QueryParseException or this:

java.lang.ArrayIndexOutOfBoundsException: 2
    
org.topbraid.spin.model.impl.FunctionCallImpl.getArgumentProperties(FunctionCallImpl.java:65)
    
org.topbraid.spin.model.impl.FunctionCallImpl.getArguments(FunctionCallImpl.java:49)
    
org.topbraid.spin.model.impl.FunctionCallImpl.print(FunctionCallImpl.java:172)
    
org.topbraid.spin.util.SPINExpressions.printExpressionString(SPINExpressions.java:204)
    
org.topbraid.spin.model.impl.AbstractSPINResourceImpl.printNestedExpressionString(AbstractSPINResourceImpl.java:146)
    org.topbraid.spin.model.impl.FilterImpl.print(FilterImpl.java:46)
    
org.topbraid.spin.model.impl.ElementListImpl.print(ElementListImpl.java:139)
    
org.topbraid.spin.model.impl.AbstractSPINResourceImpl.printNestedElementList(AbstractSPINResourceImpl.java:132)
    org.topbraid.spin.model.impl.QueryImpl.printWhere(QueryImpl.java:221)
    org.topbraid.spin.model.impl.SelectImpl.printSPINRDF(SelectImpl.java:99)
    org.topbraid.spin.model.impl.QueryImpl.print(QueryImpl.java:117)
    org.topbraid.spin.model.impl.SubQueryImpl.print(SubQueryImpl.java:44)
    
org.topbraid.spin.model.impl.ElementListImpl.print(ElementListImpl.java:139)
    org.topbraid.spin.model.impl.UnionImpl.print(UnionImpl.java:33)
    
org.topbraid.spin.model.impl.ElementListImpl.print(ElementListImpl.java:139)
    
org.topbraid.spin.model.impl.AbstractSPINResourceImpl.printNestedElementList(AbstractSPINResourceImpl.java:132)
    org.topbraid.spin.model.impl.QueryImpl.printWhere(QueryImpl.java:221)
    
org.topbraid.spin.model.impl.ConstructImpl.printSPINRDF(ConstructImpl.java:55)
    org.topbraid.spin.model.impl.QueryImpl.print(QueryImpl.java:117)
    
org.topbraid.spin.arq.ARQFactory.createCommandString(ARQFactory.java:125)
    org.topbraid.spin.arq.ARQFactory.createQuery(ARQFactory.java:219)


What would be the shortest way to check if expression has all arguments it 
needs? If it doesn't, I can ignore it. Does it always have to have sp:arg2?

Thanks.

Martynas
graphityhq.com

-- 
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), TopBraid Composer, TopBraid Live, TopBraid Insight, 
SPARQLMotion, SPARQL Web Pages and SPIN.
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-users?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to