Skip to content

Commit

Permalink
add 06-01
Browse files Browse the repository at this point in the history
  • Loading branch information
Xiaoqi Zhao committed Oct 9, 2024
1 parent 7664e75 commit c96d711
Show file tree
Hide file tree
Showing 11 changed files with 109 additions and 8 deletions.
24 changes: 16 additions & 8 deletions LearningSPARQL.mm
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<map version="freeplane 1.11.5">
<!--To view this file, download free mind mapping software Freeplane from https://www.freeplane.org -->
<node TEXT="SPARQL" LOCALIZED_STYLE_REF="AutomaticLayout.level.root" FOLDED="false" ID="ID_1090958577" CREATED="1409300609620" MODIFIED="1702253670607"><hook NAME="MapStyle" background="#f5f5dc" zoom="0.715">
<node TEXT="SPARQL" LOCALIZED_STYLE_REF="AutomaticLayout.level.root" FOLDED="false" ID="ID_1090958577" CREATED="1409300609620" MODIFIED="1702253670607"><hook NAME="MapStyle" background="#f5f5dc" zoom="0.929">
<properties show_icon_for_attributes="true" edgeColorConfiguration="#808080ff,#ff0000ff,#0000ffff,#00ff00ff,#ff00ffff,#00ffffff,#7c0000ff,#00007cff,#007c00ff,#7c007cff,#007c7cff,#7c7c00ff" show_note_icons="true" associatedTemplateLocation="template:/light_sepia_template.mm" fit_to_viewport="false"/>

<map_styles>
Expand Down Expand Up @@ -1631,22 +1631,30 @@ Graph Engine (GE) is a distributed in-memory data processing engine, underpinned
<node TEXT="05.03 Extension Functions" ID="ID_1505584738" CREATED="1702256879386" MODIFIED="1702256885676"/>
</node>
<node TEXT="06. Updating Data with SPARQL" POSITION="bottom_or_right" ID="ID_1240009482" CREATED="1702253805659" MODIFIED="1702253816494">
<node TEXT="06.01 Getting Started with Fuseki" ID="ID_969211686" CREATED="1702256892204" MODIFIED="1702256904478">
<node TEXT="Get Apache Fuseki Server" FOLDED="true" ID="ID_1381880616" CREATED="1728301630545" MODIFIED="1728301642988">
<node TEXT="06.01 Getting Started with Fuseki" FOLDED="true" ID="ID_969211686" CREATED="1702256892204" MODIFIED="1702256904478">
<node TEXT="Get Apache Fuseki Server" ID="ID_1381880616" CREATED="1728301630545" MODIFIED="1728301642988">
<node TEXT="Download &quot;apache-jena-fuseki-5.1.0.zip" ID="ID_434563538" CREATED="1728301651433" MODIFIED="1728301669802" LINK="https://jena.apache.org/download/index.cgi"/>
<node TEXT="Need Java version &gt; 16" ID="ID_1878335234" CREATED="1728301674180" MODIFIED="1728301687341"/>
</node>
<node TEXT="Get OpenJDK" FOLDED="true" ID="ID_1815766778" CREATED="1728301689075" MODIFIED="1728301702354">
<node TEXT="Get OpenJDK" ID="ID_1815766778" CREATED="1728301689075" MODIFIED="1728301702354">
<node TEXT="Download from openjdk.org" ID="ID_1330511738" CREATED="1728301702356" MODIFIED="1728301718655" LINK="https://openjdk.org/install/"/>
<node TEXT="Install OpenJDK on Windows via MSI (Now: OpenJDK 21.0.4 LTS)" ID="ID_949090394" CREATED="1728301719362" MODIFIED="1728301812004" LINK="https://learn.microsoft.com/en-us/java/openjdk/install"/>
</node>
<node TEXT="Plan with fuseki-server" FOLDED="true" ID="ID_532223434" CREATED="1728453759639" MODIFIED="1728453768039">
<node TEXT="Play with fuseki-server" ID="ID_532223434" CREATED="1728453759639" MODIFIED="1728456113878">
<node TEXT="CLI: fuseki-server --update --loc=dataDir /myDataset" ID="ID_591907188" CREATED="1728453780096" MODIFIED="1728453798209"/>
</node>
</node>
<node TEXT="06.02 Adding Data to a Dataset" ID="ID_439979794" CREATED="1702256904946" MODIFIED="1702256915173"/>
<node TEXT="06.03 Deleting Data" ID="ID_1821076435" CREATED="1702256915371" MODIFIED="1702256925989"/>
<node TEXT="06.04 Changing Existing Data" ID="ID_778767554" CREATED="1702256926203" MODIFIED="1702256935629"/>
<node TEXT="06.02 Adding Data to a Dataset" ID="ID_439979794" CREATED="1702256904946" MODIFIED="1702256915173">
<node TEXT="1) INSERT DATA { triple patter }" ID="ID_19533365" CREATED="1728462109210" MODIFIED="1728463452684"/>
<node TEXT="2) INSERT { triple pattern } WHERE {}" ID="ID_1706597098" CREATED="1728462119379" MODIFIED="1728463327547"/>
</node>
<node TEXT="06.03 Deleting Data" ID="ID_1821076435" CREATED="1702256915371" MODIFIED="1702256925989">
<node TEXT="1) DELETE DATA { triple patter }" ID="ID_287549994" CREATED="1728463399194" MODIFIED="1728463455387"/>
<node TEXT="2) DELETE { triple pattern } WHERE {}" ID="ID_666798877" CREATED="1728463415752" MODIFIED="1728463432099"/>
</node>
<node TEXT="06.04 Changing Existing Data" ID="ID_778767554" CREATED="1702256926203" MODIFIED="1702256935629">
<node TEXT="DELETE { triple pattern }&#xa;INSERT {triple pattern }&#xa;WHERE {triple pattern }" ID="ID_1666184806" CREATED="1728463514488" MODIFIED="1728463549332"/>
</node>
<node TEXT="06.05 Named Graphs" FOLDED="true" ID="ID_1144160241" CREATED="1702256935874" MODIFIED="1715621415282">
<arrowlink DESTINATION="ID_320976328"/>
<node TEXT="06.05.1 Dropping Graphs" ID="ID_462413524" CREATED="1702256943725" MODIFIED="1702256951413"/>
Expand Down
Binary file modified LearningSPARQL.pptx
Binary file not shown.
19 changes: 19 additions & 0 deletions ch06/06-01/ex012.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# filename: ex012.ttl

@prefix ab: <http://learningsparql.com/ns/addressbook#> .
@prefix d: <http://learningsparql.com/ns/data#> .

d:i0432 ab:firstName "Richard" .
d:i0432 ab:lastName "Mutt" .
d:i0432 ab:homeTel "(229) 276-5135" .
d:i0432 ab:email "[email protected]" .

d:i9771 ab:firstName "Cindy" .
d:i9771 ab:lastName "Marshall" .
d:i9771 ab:homeTel "(245) 646-5488" .
d:i9771 ab:email "[email protected]" .

d:i8301 ab:firstName "Craig" .
d:i8301 ab:lastName "Ellis" .
d:i8301 ab:email "[email protected]" .
d:i8301 ab:email "[email protected]" .
15 changes: 15 additions & 0 deletions ch06/06-01/ex311-1.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# filename: ex311-1.rq
# from Fuseki sample

PREFIX owl: <http://www.w3.org/2002/07/owl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ab: <http://learningsparql.com/ns/addressbook#>
PREFIX d: <http://learningsparql.com/ns/data#>

SELECT *
FROM <ex012.ttl>
WHERE {
?sub ?pred ?obj .
} LIMIT 100
6 changes: 6 additions & 0 deletions ch06/06-01/ex311.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# filename: ex311.rq

SELECT *
WHERE {
?s ?p ?o .
}
10 changes: 10 additions & 0 deletions ch06/06-01/ex312.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# filename: ex312.ru

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ab: <http://learningsparql.com/ns/addressbook#>
PREFIX d: <http://learningsparql.com/ns/data#>

INSERT DATA {
d:i8301 ab:homeTel "(718) 440-9281" .
ab:Person a rdfs:Class .
}
11 changes: 11 additions & 0 deletions ch06/06-01/ex313.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# filename: ex313.ru

PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX ab: <http://learningsparql.com/ns/addressbook#>
PREFIX d: <http://learningsparql.com/ns/data#>

INSERT {
d:i8301 ab:homeTel "(718) 440-9281" .
ab:Person a rdfs:Class .
}
WHERE {}
11 changes: 11 additions & 0 deletions ch06/06-01/ex314.rq
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# filename: ex314.rq

PREFIX ab: <http://learningsparql.com/ns/addressbook#>

CONSTRUCT {
?person a ab:Person .
}
WHERE {
?person ab:firstName ?firstName ;
ab:lastName ?lastName .
}
11 changes: 11 additions & 0 deletions ch06/06-01/ex316.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# filename: ex316.ru

PREFIX ab: <http://learningsparql.com/ns/addressbook#>

INSERT {
?person a ab:Person .
}
WHERE {
?person ab:firstName ?firstName ;
ab:lastName ?lastName .
}
3 changes: 3 additions & 0 deletions ch06/06-01/ex546.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# filename: ex546.rq

LOAD <http://worldcat.org/oclc/41238513.ttl>
7 changes: 7 additions & 0 deletions ch06/fuseki-post.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<form action="http://localhost:3030/testDataset/update" method="post">
<fieldset>
<legend>Fuseki SPARQL Update</legend>
<textarea name="update" rows="30" cols="100">Put your SPARQL update query here...</textarea><br>
<input type="submit" value="Submit">
</fieldset>
</form>

0 comments on commit c96d711

Please sign in to comment.