Ignore:
Timestamp:
2021-04-11T17:56:13+12:00 (3 years ago)
Author:
davidb
Message:

SPARQL queries cut across to using public-facing web prefix rather than localhost

Location:
main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/about.xsl

    r35047 r35056  
    180180          );
    181181      </gsf:script>
    182      
     182
     183      <xsl:variable name="graphURI">https://so-we-must-think.space<xsl:value-of select="$siteURL"/><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collName"/></xsl:variable>   
    183184      <div id="sgvizler2-country-count"
    184185           data-sgvizler-endpoint="//sowemustthink.space/greenstone3-lod3/greenstone/query"
     
    192193         SELECT (?country) (COUNT(?country) AS ?freqCount)       
    193194         WHERE {
    194            GRAPH &lt;http://localhost:4040/greenstone/data/<xsl:value-of select="$collName"/>&gt;  {
     195           GRAPH &lt;<xsl:value-of select="$graphURI"/>&gt;  {
    195196                       ?s gsdlextracted:Country ?country
    196197           }
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/sgvizler.xsl

    r35054 r35056  
    99    exclude-result-prefixes="java util">
    1010
    11 
    1211    <!-- use the 'main' layout -->
    1312    <xsl:import href="layouts/main.xsl"/>
    1413
    15     <xsl:import href="dataviz/made-the-final.xsl"/>
    16     <xsl:import href="dataviz/list-of-winners.xsl"/>
    17     <xsl:import href="dataviz/list-of-losers.xsl"/>
    18     <xsl:import href="dataviz/got-nul-point.xsl"/>
    19     <xsl:import href="dataviz/got-nul-point-after-winning.xsl"/>
    20     <xsl:import href="dataviz/voting-dataflow-jury.xsl"/>
    21     <xsl:import href="dataviz/voting-dataflow-tele.xsl"/>
    22     <xsl:import href="dataviz/draw-bias.xsl"/>
    23     <xsl:import href="dataviz/draw-bias-normalized.xsl"/>
     14
     15    <xsl:variable name="graphURI">https://so-we-must-think.space<xsl:value-of select="$siteURL"/><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collName"/></xsl:variable>
     16   
     17    <xsl:include href="dataviz/made-the-final.xsl"/>
     18    <xsl:include href="dataviz/list-of-winners.xsl"/>
     19    <xsl:include href="dataviz/list-of-losers.xsl"/>
     20    <xsl:include href="dataviz/got-nul-point.xsl"/>
     21    <xsl:include href="dataviz/got-nul-point-after-winning.xsl"/>
     22    <xsl:include href="dataviz/voting-dataflow-jury.xsl"/>
     23    <xsl:include href="dataviz/voting-dataflow-tele.xsl"/>
     24    <xsl:include href="dataviz/draw-bias.xsl"/>
     25    <xsl:include href="dataviz/draw-bias-normalized.xsl"/>
    2426   
    2527    <xsl:variable name="groupPath"><xsl:value-of select="/page/pageRequest/paramList/param[@name='group']/@value"/></xsl:variable>
     
    116118
    117119      <script type="text/javascript" src="ext/jena/sgvizler2/sgvizler2.js"><xsl:text> </xsl:text></script>
    118      
    119120      <div class="page moreindent">
    120121        <form class="sgvizler-form" id="sample-sparql-query-form"
     
    216217SELECT (?country) (COUNT(?country) AS ?freqCount)       
    217218WHERE {
    218     GRAPH &lt;http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;  {
     219    GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
    219220        ?s gsdlextracted:Country ?country.
    220221   }
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/pages/sparql.xsl

    r35047 r35056  
    121121      </div>
    122122
     123      <xsl:variable name="graphURI">https://so-we-must-think.space<xsl:value-of select="$siteURL"/><xsl:value-of select="$library_name"/>/collection/<xsl:value-of select="$collName"/></xsl:variable>
     124     
    123125      <div class="moreindent">
    124126        <form id="sample-sparql-query-form" action="/greenstone3-lod3/greenstone/query" target="_blank"
     
    131133
    132134SELECT ?subject ?predicate ?object WHERE {
    133   GRAPH &lt;http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;  {
     135  GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
    134136    ?subject ?predicate ?object.
    135137  }
     
    194196
    195197SELECT ?subject ?predicate ?object WHERE {
    196   GRAPH &lt;http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;  {
     198  GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
    197199    ?subject ?predicate ?object.
    198200    ?subject gsdlextracted:Year "2000".   
     
    209211
    210212SELECT ?subject ?predicate ?object WHERE {
    211   GRAPH &lt;http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;  {
     213  GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
    212214    ?subject ?predicate ?object.
    213215    ?subject gsdlextracted:Year "2000".   
     
    230232 
    231233SELECT ?subject ?predicate ?object WHERE {
    232   GRAPH &lt;http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;  {
     234  GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
    233235    ?subject ?predicate ?object
    234236
     
    257259
    258260SELECT ?esc_entrant_uri ?country ?year WHERE {
    259   GRAPH &lt;http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;  {
    260     ?esc_entrant_uri dc:Relation.isPartOf &lt;http://127.0.0.1:8383/greenstone3/library/collection/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;.
     261  GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
     262    ?esc_entrant_uri dc:Relation.isPartOf &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;.
    261263
    262264    ?esc_entrant_uri gsdlextracted:Year ?year.
     
    277279
    278280SELECT ?country ?year ?total WHERE {
    279   GRAPH &lt;http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;  {
    280     ?esc_entrant_uri dc:Relation.isPartOf &lt;http://127.0.0.1:8383/greenstone3/library/collection/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;.
     281  GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
     282    ?esc_entrant_uri dc:Relation.isPartOf &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;.
    281283
    282284    ?esc_entrant_uri gsdlextracted:SingVotesTotal ?total.
     
    301303
    302304SELECT ?country ?year ?jury_country ?jury_vote WHERE {
    303   GRAPH &lt;http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;  {
    304     ?esc_entrant_uri dc:Relation.isPartOf &lt;http://127.0.0.1:8383/greenstone3/library/collection/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;.
     305  GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
     306    ?esc_entrant_uri dc:Relation.isPartOf &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;.
    305307
    306308    ?esc_entrant_uri ?gsdlextracted_jury_country_uri ?jury_vote.
     
    328330PREFIX dc: &lt;http://purl.org/dc/elements/1.1/&gt;
    329331
    330 
    331332SELECT ?year ?country ?total_max WHERE {
    332   GRAPH &lt;http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;  {
     333  GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
    333334
    334335    {
     
    365366
    366367SELECT ?country (STR(COUNT(?country)) as ?number_of_vote_wins) WHERE {
    367   GRAPH &lt;http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;  {
    368 
    369 
     368  GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
    370369    {
    371       SELECT ?year (STR(MAX(?total_int)) as ?total_max) WHERE {
    372 
    373      
     370      SELECT ?year (STR(MAX(?total_int)) as ?total_max) WHERE {     
    374371        ?esc_entrant_uri gsdlextracted:VoteGrandTotal ?total.
    375372        BIND(xsd:integer(?total) AS ?total_int).
     
    412409     ?currency ?gdpPppPerCapita ?giniCoefficient WHERE {
    413410
    414 #  SERVICE &lt;https://dbpedia.demo.openlinksw.com/sparql&gt; {
    415411  SERVICE &lt;https://dbpedia.org/sparql&gt; {
    416412
Note: See TracChangeset for help on using the changeset viewer.