Yes this is implemented in ARQ2SPIN:

    public static String getTextOnly(Resource spinCommand) {
// Return sp:text if this is the only property of the command apart from the rdf:type triple
        Statement s = spinCommand.getProperty(SP.text);
        if(s != null) {
            if(SPTextUtil.hasSPINRDF(spinCommand)) {
                return null;
            }
            else {
                return s.getString();
            }
        }
        return null;
    }

and the crucial line is

if(!RDF.type.equals(o.getPredicate()) && !SP.text.equals(o.getPredicate()) && !SPIN.thisUnbound.equals(o.getPredicate())) {

which means that it only allows rdf:type or spin:thisUnbound apart from the sp:text triple. I guess I didn't want to enumerate all possible other properties that may exist, so you are running into an unexpected use case. In most use cases those SPIN RDF structures are created by editing in TBC and those would discard the extra triple anyway, so I am afraid this is not a high priority issue for us right now. If you want to submit a patch for your use case, I'd be happy to fold it into the next release. I guess we could either hard-code the properties that you want to allow or otherwise find a better implementation of hasSPINRDF (maybe looking for sp:where is enough if that always exists - I don't know off the top of my head).

Thanks,
Holger




On 4/29/2014 9:35, pu...@xml.lt wrote:
Hey,

I have some SPIN queries in my RDF, like this:

<#DescribeProducts> a       sp:Describe ;
    sp:text """PREFIX ... """^^xsd:string .

It works fine. However, if I add some more properties to the <#DescribeProducts> resource (such as rdfs:isDefinedBy), SPINFactory.asQuery() starts returning weird results like "DESCRIBE *", which is not what the original query is.

Does it mean the short query form can only have sp:text property? Is this an intentional limitation?


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
topbraid-users@googlegroups.com
To unsubscribe from this group, send email to
topbraid-users+unsubscr...@googlegroups.com
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 topbraid-users+unsubscr...@googlegroups.com <mailto:topbraid-users+unsubscr...@googlegroups.com>.
For more options, visit https://groups.google.com/d/optout.

--
-- 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
topbraid-users@googlegroups.com
To unsubscribe from this group, send email to
topbraid-users+unsubscr...@googlegroups.com
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 topbraid-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to