Specify Endpoint default graph

88 views
Skip to first unread message

Santiago Gonzalez Toral

unread,
Dec 8, 2014, 5:49:46 PM12/8/14
to linked-data...@googlegroups.com
Hi,

Is there a way to specify the default graph IRI for the endpoint i'm using on Elda ? Give me an example please.

Regards
Santiago González

chris dollin

unread,
Dec 9, 2014, 5:49:45 AM12/9/14
to linked-data-api-discuss
On 8 December 2014 at 22:49, Santiago Gonzalez Toral
<hernan...@gmail.com> wrote:
>
> Is there a way to specify the default graph IRI for the endpoint i'm using
> on Elda ? Give me an example please.

I'm not sure I understand what you're asking.

Elda will query the default graph of the dataset unless you tell
it otherwise.

You can tell it otherwise by attaching the URI of the non-default
graph to the endpoint or the whole API using elda:graphTemplate.

If you attach it to the whole API then endpoints will query that
graph unless they have an overriding elda:graphTemplate.

And you can use _graph=encodedURI in the URL to override
anything in the configuration.

Unless the SPARQL endpoint tells you what the URI for its
default graph is, you can't explicitly specify the default graph
in an Elda config/query.

Can you say more about what you want to do?

Chris




--
Chris "allusive" Dollin

Santiago Gonzalez Toral

unread,
Dec 9, 2014, 9:39:38 AM12/9/14
to linked-data...@googlegroups.com
Hi,

That's exactly what i want to do. I'm trying to apply elda:graphTemplate to specify the graph URI for my Virtuoso endpoint but it seems that i'm not using it correctly. 
Here's a piece of my config file:

dspace:dspace-repository a api:API 
; rdfs:label "Repositorio Dspace - Universidad de Cuenca"@es
; api:sparqlEndpoint <http://190.15.141.102:8890/sparql>
; api:defaultViewer api:labelledDescribeViewer
; api:viewer [a api:Viewer; api:name "empty"; api:properties ""]
; api:variable [api:name "_velocityRoot"; api:value "http://localhost:8080/standalone/lda-assets/vm/"]
; api:variable [api:name "_resourceRoot"; api:value "/standalone/lda-assets/"]
; api:endpoint
dspace:thesis, dspace:issue, dspace:document, dspace:performance, dspace:book, dspace:article, dspace:community, dspace:person, dspace:about, dspace:communityreg, dspace:thesisreg, dspace:documentreg, dspace:bookreg, dspace:issuereg, dspace:performancereg, dspace:articlereg
#hello:publishers, hello:games, dspace:thesisreg, dspace:about
; api:formatter
[a elda:VelocityFormatter
; api:name "vhtml"
; elda:className "com.epimorphics.lda.renderers.VelocityRendererFactory"
; api:mimeType "text/html"
; elda:velocityTemplate "page-shell.vm"
]
; api:formatter
[ a api:XsltFormatter 
; api:name "html" 
; api:mimeType "text/html; charset=utf-8" 
; api:stylesheet "lda-assets/xslt/result-osm-trimmed.xsl"
# ; elda:shortnameMode elda:roundTrip
]
    ; api:formatter
        [a elda:FeedFormatter
        ; api:name "atom"
        ; elda:className "com.epimorphics.lda.renderers.FeedRendererFactory"
        ; api:mimeType "application/atom+xml"
        ; elda:feedTitle "an example Elda feed"
        ]
    ; elda:enableCounting true
    ; elda:cacheExpiryTime "1m"
    ;elda:graphTemplate "http://dspace.ucuenca.edu.ec/resource/"
.

chris dollin

unread,
Dec 9, 2014, 9:54:28 AM12/9/14
to linked-data-api-discuss
On 9 December 2014 at 14:39, Santiago Gonzalez Toral
<hernan...@gmail.com> wrote:
>
> That's exactly what i want to do. I'm trying to apply elda:graphTemplate to
> specify the graph URI for my Virtuoso endpoint but it seems that i'm not
> using it correctly.

Exactly what have you tried and exactly what happened?

[What happens without the elda:graphTemplate, ie is your
Virtuoso connected up at all? Are any errors reported,
in the logs or in the browser window? Can you see the
select query in the browser window and does it have the
GRAPH clause in it? What version of Elda are you running?
What version of Virtuoso and does that version support
GRAPH? Etc &co.]

Santiago Gonzalez Toral

unread,
Dec 9, 2014, 10:04:43 AM12/9/14
to linked-data...@googlegroups.com
Elda instance works fine. Without elda:graphTemplate, Elda shows records of all other graphs i loaded on Virtuoso. The Selection window does not show the GRAPH clause when applying elda:graphTemplate. I'm using Elda v1.2.33 and Virtuoso v07.10.3207.

chris dollin

unread,
Dec 9, 2014, 10:50:50 AM12/9/14
to linked-data-api-discuss
On 9 December 2014 at 15:04, Santiago Gonzalez Toral
<hernan...@gmail.com> wrote:
> Elda instance works fine. Without elda:graphTemplate, Elda shows records of
> all other graphs i loaded on Virtuoso. The Selection window does not show
> the GRAPH clause when applying elda:graphTemplate. I'm using Elda v1.2.33
> and Virtuoso v07.10.3207.

What happens if you add &_graph=fake:uri at the end of the query?
[There should then be a GRAPH clause in the selection query.
Is there?]

I double-checked by adding an elda:graphTemplate to
a local current Elda; it generated the appropriate GRAPH
clause.

Santiago Gonzalez Toral

unread,
Dec 9, 2014, 10:57:42 AM12/9/14
to linked-data...@googlegroups.com
I don't understand where to put the  &_graph=fake:uri clause.

Could you give me an example of how you use the elda:graphTemplate on a config file?. Did you use the exact same version of Elda that i'm using for the tests?

chris dollin

unread,
Dec 9, 2014, 11:22:39 AM12/9/14
to linked-data-api-discuss
Ah, having looked harder at your versions:

GRAPH handling came in in Elda 1.2.34

You need to be at least one version on.

Santiago Gonzalez Toral

unread,
Dec 9, 2014, 4:51:44 PM12/9/14
to linked-data...@googlegroups.com
I updated Elda's version to 1.3.1 and now works.

Thanks
Reply all
Reply to author
Forward
0 new messages