Overview

This is the result of investigating how to customize “Snorql for Japan Search,” which is used by Japan Search. I plan to update this article as needed. Please note that it may contain errors.

Menu

Changing the Page Title

_poweredByLabel:"CulturalJapan","JapanSearch",

Changing the Query Endpoint

_endpoint:"https://ld.cultural.jp/sparql/",/"https://jpsearch.go.jp/rdf/sparql/",

_poweredByLink:"https://cultural.jp/","https://jpsearch.go.jp/",

<foote/r<U<<y<<f>asa!o!aoe-u->ohh-r-hStrrrPeee<aeArffapfR>==p=Q""hl"L.hrih/tect"tfat>p=tpSs"isn:ho:o/tn/r/t./qlpjldsp<<.:s//c/eaau/a>ljrtpcfushore.raaglro<.c.ajhjp.pig/dsoa=p.p"ajiprp/oq/swlrpe"dar>freb/qdaslbsp-yiae"crxqphSllrP"aeA>ifRbn=Qa/"Ls"#i"ec>nJdSapPpoAaiRnnQtLS<e/eaanr>dcpho<i/nat><./a>for

Changing the Version

var_sldb_version="v0.0.1";/"v2.20.1";

Top Page Description

i]n"/,t%/rs""o0%%_%sst00m%%pSlnioSs=rPqAahlRndQefL<foa.rihnJrtaerpfoa=_n\t"mShpetlatrpcsh:/[/www.ka%nsz1a%ki<.acohmr/"ewfo=r\k"sh/tltdp/sj:p/s/ewawrwc.hk/asnnzoarkqil._clodmb/-waobrokustl"d>/ejxptseenasricohn/<s/nao>rqolf_l%dsb1-%abtooutm\a"k>eSPARQL</qau>erybuildingeaSsPiAeRrQLandsh%osw2%resultsmuc"h,understandable.Use%s2%forapplicationquery."

Intro Description

int]r[/,o"/:[[[[""""[S"n,or"qTRleDsFfto"r]Ja<paa<nharSehefra<=era\fc"=hhh\rt"ethfpt=st<\:pa"/sh/:htj/rtp/epsjfsep=:as\/re"/cahjhrtp.ctsghpeo.sa.g:rjocp./hjw.apwgp/woia../pkjsiapp/n/aizarnapqtkilri/-o.sedcpxuoapcmrlt/qaiwlioo-nnre//kx\\sp""/l>>laSdiP/nAj/Rp\Qs"Le>arc<h//as>noSrP<qA/lRa_Q>lLdb"-,ab"oSuet"e\,"<<>/"aSaSn>ehoerreq<fla=fh"rhretftJ=pa"\sp,":ah/n"t/QtjSuppeessar:ecy/ah/rewc使xwhaw.<m.gpkala.>enjszpa/akaripe.icpirmn"o/t,wrioo"drd<ekuadsc/thbliredelnfj/=wp\\s""e>hoaItrrntctprhrsi/o:gpd/hru/ticw-mtwheiwar.nnkd\a"tns>oziJadaJkepaiap.onacfno)SmeS/taewhraoecrrhckthseR/xDSltFPdA/aMRjroQpedLsaee.lEanrSPdcerpheio/misaennlrtos<<ro//qaal<>>_alf(dhoibrrn-eaftJb=hao\epu"athgn\tee"tns>peeAsr)b:ao/lfu/otwdrweSwstn.chokreraiqnpRlztDaiFfkooinmr.ocodJofeamlp/t.awh"noi]rs,Skesea/nrldcdph/o<ji/pnast>e.a"hr]ac,sh/bparsiimcere/x\p"l>aJnaaptainonSeoafrcthhiRsDFSnMoordqellePxrtiemnesri<o/na.>"]forthegeneraldescription."],

Adding Namespaces

v}a;rD""2jwdRplc_s:nn"da:'lmh"e"t:shtptp"at:hcp/tes/tP:wpr/w:e/wfj./ipwnxs3dee.lsao.rrg=cgh.{.2jg0po0/.2dj/cp0n/7dt/leo/rwtmle/#rp'mr,so/p"e,rty#",

Changing the Initial Query

/d/d}e/e?`fdfs,aeaufu?lalvtutl_?qtqou_ueqeruryeyr:tyo:`sb"eeSlEesLceEttCTdoinDsIttSieTnxIctNtCaTrewahWewHrhEeeRnE{l{o\and\etd?swistchhoeumta:ucsreeratqourercyhname:;\n\trdftse:xltaabreela?label\n\tOPTIONAL{?sschema:image?image}\n}\nLIMIT100",

Changing Query Examples

By specifying "ns": ["edm"], you can add prefixes to the search query. However, prefix information needs to be added to example_ns in the same file.

S`}``}`n{S??,}/{S?,}o"]"Ecl",*""EcjG",rm"",qLhanmqLhpRn`qlEuEobsluEosOs,laxeCe"aeC:U"dbarTrl:brTasPeemydeyo:flp"fb[l"??uB."l:si""ttrY[e:eW:fe::yycxHl:dppe?]a[1Eacm[eeItm"Rbo""ny/pEen](;fp/lltcoele{aoi?iu?s=lnnstasto["b(uo,e"?rfl'cchen.os')."parsef?icxoeusntd)efWiHnjEepRdsE:is{nouerxcaemIpnlfeo_ns,ifnecessary","eCxoaumnptlei_tnesmsbytype.Asimpleexampleofaggregation.jps:sourceInfoensurestheresulting?choareitems(notagents,locations,etc)"],

Changing Settings for Simultaneously Describing Sub-resources Along with the Requested URI

By default, the fragment identifiers accessinfo and sourceinfo are added, but here is an example of setting it to add only accessinfo.

_endpoint:"https://ld.cultural.jp/sparql/",/"https://jpsearch.go.jp/rdf/sparql/",

0

The URI pattern to which this setting is added is specified as follows. Here is an example where the default https://ld.cultural.jp has been removed.

_endpoint:"https://ld.cultural.jp/sparql/",/"https://jpsearch.go.jp/rdf/sparql/",

1

With this setting, fragment identifiers will no longer be added as shown below.

By modifying datauri_pat, you can change the base data URI pattern. For example, by configuring it as follows, labels and other information will be additionally fetched for resources whose URI contains xxx.yyy.zzz.

_endpoint:"https://ld.cultural.jp/sparql/",/"https://jpsearch.go.jp/rdf/sparql/",

2

Thumbnail Image Display

The property used for thumbnail images is specified below. If you want to use something other than schema:image, change this.

_endpoint:"https://ld.cultural.jp/sparql/",/"https://jpsearch.go.jp/rdf/sparql/",

3

The DOM manipulation section is as follows.

_endpoint:"https://ld.cultural.jp/sparql/",/"https://jpsearch.go.jp/rdf/sparql/",

4

Default Maximum Display Count When There Are Many Values for the Same Property in Describe Results (Folding)

_endpoint:"https://ld.cultural.jp/sparql/",/"https://jpsearch.go.jp/rdf/sparql/",

5

For image URLs and similar, clicking the link directly accesses that link.

This is configured as follows.

_endpoint:"https://ld.cultural.jp/sparql/",/"https://jpsearch.go.jp/rdf/sparql/",

6

License URI Badge

_endpoint:"https://ld.cultural.jp/sparql/",/"https://jpsearch.go.jp/rdf/sparql/",

7

_endpoint:"https://ld.cultural.jp/sparql/",/"https://jpsearch.go.jp/rdf/sparql/",

8

Prefix:Namespace URI Mapping for QName Display Beyond _namespace Settings

By default, http://purl.org/net/ns/policy# is not shown as a QName, but by configuring the following, you can add prefixes for QName display.

_endpoint:"https://ld.cultural.jp/sparql/",/"https://jpsearch.go.jp/rdf/sparql/",

9

EasySPARQL Query Content

For example, the “Where” query is configured as follows.

_poweredByLink:"https://cultural.jp/","https://jpsearch.go.jp/",

0

Setting Property Display Order for Describe Items

_poweredByLink:"https://cultural.jp/","https://jpsearch.go.jp/",

1

Hiding EasySPARQL

_poweredByLink:"https://cultural.jp/","https://jpsearch.go.jp/",

2