Changeset 35056 for main


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
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/dataviz/draw-bias-normalized.xsl

    r35046 r35056  
    2424  SELECT ?draw_int (SUM(?is_winner) AS ?freqCount) (COUNT(?is_winner) AS ?maxPossibleFreqCount) (100.0 * ?freqCount/?maxPossibleFreqCount AS ?normFreqCount)
    2525  WHERE {
    26       GRAPH &lt;http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;  {
    27           ?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;.
     26      GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
     27#          ?esc_entrant_uri dc:Relation.isPartOf &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;.
    2828
    2929          ?esc_entrant_uri gsdlextracted:Country ?country.
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/dataviz/draw-bias.xsl

    r35036 r35056  
    2424#(COUNT(?is_winner) AS ?maxPossibleFreqCount) (100.0 * ?freqCount/?maxPossibleFreqCount AS ?normFreqCount)
    2525WHERE {
    26     GRAPH &lt;http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;  {
    27         ?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;.
     26    GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
     27#        ?esc_entrant_uri dc:Relation.isPartOf &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;.
    2828
    2929        ?esc_entrant_uri gsdlextracted:Country ?country.
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/dataviz/got-nul-point-after-winning.xsl

    r35036 r35056  
    2323SELECT (?country) (COUNT(?country) AS ?freqCount)       
    2424WHERE {
    25     GRAPH &lt;http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;  {
    26         ?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;.
     25    GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
     26#        ?esc_entrant_uri dc:Relation.isPartOf &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;.
    2727
    2828        ?esc_entrant_uri gsdlextracted:Country ?country.
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/dataviz/got-nul-point.xsl

    r35036 r35056  
    2323SELECT (?country) (COUNT(?country) AS ?freqCount)       
    2424WHERE {
    25     GRAPH &lt;http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;  {
    26         ?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;.
     25    GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
     26#        ?esc_entrant_uri dc:Relation.isPartOf &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;.
    2727
    2828        ?esc_entrant_uri gsdlextracted:Country ?country.
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/dataviz/list-of-losers.xsl

    r35050 r35056  
    2424SELECT (?selected_year AS ?Year) (?country AS ?Country) (?title AS ?Title) (GROUP_CONCAT(?creator; SEPARATOR="; ") AS ?Artist)
    2525WHERE {
    26     GRAPH &lt;http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;  {
     26    GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
    2727
    2828        {
     
    4141         }
    4242
    43           ?esc_entrant_uri gsdlextracted:Country ?country.
    44           ?esc_entrant_uri gsdlextracted:Place ?place.
    45           BIND(xsd:integer(?place) AS ?place_int).
    46           FILTER(?place_int = ?max_selected_place_int).
     43         ?esc_entrant_uri gsdlextracted:Country ?country.
     44         ?esc_entrant_uri gsdlextracted:Place ?place.
     45         BIND(xsd:integer(?place) AS ?place_int).
     46         FILTER(?place_int = ?max_selected_place_int).
    4747
    48           ?esc_entrant_uri gsdlextracted:Year ?selected_year.
    49           ?esc_entrant_uri gsdlextracted:Title ?title.
    50           ?esc_entrant_uri gsdlextracted:Creator ?creator.
    51 
     48         ?esc_entrant_uri gsdlextracted:Year ?selected_year.
     49         ?esc_entrant_uri gsdlextracted:Title ?title.
     50         ?esc_entrant_uri gsdlextracted:Creator ?creator.
    5251   }
    5352}
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/dataviz/list-of-winners.xsl

    r35050 r35056  
    1010 
    1111  <xsl:template name="ssv-list-of-winners">
    12 
    13 
    14 
    1512   
    1613        <div id="ssv-list-of-winners" style="display: none;">
     
    2421SELECT (?year AS ?Year) (?country AS ?Country) (?title as ?Title) (GROUP_CONCAT(?creator; SEPARATOR="; ") AS ?Artist)
    2522WHERE {
    26     GRAPH &lt;http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;  {
     23    GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
    2724        ?esc_entrant_uri gsdlextracted:Country ?country.
    2825        ?esc_entrant_uri gsdlextracted:Year ?year.
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/dataviz/made-the-final.xsl

    r35036 r35056  
    88    extension-element-prefixes="java util"
    99    exclude-result-prefixes="java util">
    10  
     10
    1111  <xsl:template name="ssv-made-the-final">
    12 
    1312       
    1413        <div id="ssv-made-the-final" style="display: none;">
     
    2221SELECT (?country) (COUNT(?country) AS ?freqCount)       
    2322WHERE {
    24     GRAPH &lt;http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;  {
     23    GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
    2524        ?esc_entrant_uri gsdlextracted:Country ?country.
    2625#        ?esc_entrant_uri gsdlextracted:Final "true"
     
    2827        ?esc_entrant_uri gsdlextracted:VoteGrandTotal ?total.
    2928        BIND(xsd:integer(?total) AS ?total_int).
    30         FILTER(?total_int >= 0).   
     29        FILTER(?total_int &gt;= 0).   
    3130   
    3231   }
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/dataviz/voting-dataflow-jury.xsl

    r35055 r35056  
    1111  <xsl:template name="ssv-voting-dataflow-jury">
    1212
    13 
    1413    <div id="ssv-voting-dataflow-jury" style="display: none;">
    1514
     
    2221
    2322SELECT  (?jury_country AS ?jury_vote_from_country) (?country AS ?to_country) (SUM(?jury_vote_int) * SUM(?jury_vote_int) AS ?country_jury_to_country_total_squared) (SUM(?jury_vote_int) AS ?jury_vote_total) WHERE {
    24   GRAPH &lt;http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;  {
    25     ?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;.
     23  GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
     24#    ?esc_entrant_uri dc:Relation.isPartOf &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;.
    2625
    2726    ?esc_entrant_uri ?gsdlextracted_jury_country_uri ?jury_vote.
  • main/trunk/model-sites-dev/eurovision-lod/collect/eurovision/transform/dataviz/voting-dataflow-tele.xsl

    r35036 r35056  
    2222
    2323SELECT  (?tele_country AS ?tele_vote_from_country) (?country AS ?to_country) (SUM(?tele_vote_int) * SUM(?tele_vote_int) AS ?country_tele_to_country_total_squared) (SUM(?tele_vote_int) AS ?tele_vote_total) WHERE {
    24   GRAPH &lt;http://localhost:4040/greenstone/data/</xsl:text><xsl:value-of select="$collName"/><xsl:text>&gt;  {
    25     ?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;.
     24  GRAPH &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;  {
     25#    ?esc_entrant_uri dc:Relation.isPartOf &lt;</xsl:text><xsl:value-of select="$graphURI"/><xsl:text>&gt;.
    2626
    2727    ?esc_entrant_uri ?gsdlextracted_tele_country_uri ?tele_vote.
  • 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.