Skip to content
This repository has been archived by the owner on Apr 9, 2020. It is now read-only.

Vasya example #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Eclipse settings
.project
**/.project
.classpath
**/.classpath
.settings
**/.settings
bin
**/bin

# Eclipse Plug-In Settings
.pmd

# Maven generated stuff
target/
*/target/
pom.xml.versionsBackup
dependency-reduced-pom.xml

# GEdit generated stuff
*.*~

# IntelliJ files
.idea/
*.iml
*.ipr
*.iws

# Mac nonsense
.DS_Store

# NetBean files
**/nb-configuration.xml
**/nbactions*.xml
*.jfr
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,8 @@ public static void main(String[] args)
queryString += "CONSTRUCT \n";
queryString += "WHERE { \n";
queryString += " ?s a ex:Artist; \n";
queryString += " foaf:firstName ?n .";
queryString += " foaf:firstName ?n;";
queryString += " foaf:homepage ?p .";
queryString += "}";

GraphQuery query = conn.prepareGraphQuery(queryString);
Expand Down
48 changes: 32 additions & 16 deletions src/main/resources/example-data-artists.ttl
Original file line number Diff line number Diff line change
@@ -1,32 +1,48 @@
@prefix ex: <http://example.org/> .
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
ex:Picasso a ex:Artist ;
foaf:firstName "Pablo" ;
foaf:firstName "Pablo";
foaf:surname "Picasso";
ex:creatorOf ex:guernica ;
ex:homeAddress _:node1 .
foaf:birthday "25-10";
foaf:age "91";
ex:creatorOf ex:guernica;
ex:homeAddress _:node1.

_:node1 ex:street "31 Art Gallery" ;
ex:city "Madrid" ;
ex:country "Spain" .
_:node1 ex:street "31 Art Gallery";
ex:city "Madrid";
ex:country "Spain".

ex:guernica a ex:Painting ;
ex:guernica a ex:Painting;
rdfs:label "Guernica";
ex:technique "oil on canvas".

ex:VanGogh a ex:Artist ;
foaf:firstName "Vincent" ;
ex:VanGogh a ex:Artist;
foaf:firstName "Vincent";
foaf:surname "van Gogh";
ex:creatorOf ex:starryNight, ex:sunflowers, ex:potatoEaters .
foaf:birthday "30-03";
foaf:age "37";
ex:creatorOf ex:starryNight, ex:sunflowers, ex:potatoEaters.

ex:starryNight a ex:Painting ;
ex:starryNight a ex:Painting;
ex:technique "oil on canvas";
rdfs:label "Starry Night" .
rdfs:label "Starry Night".

ex:sunflowers a ex:Painting ;
ex:sunflowers a ex:Painting;
ex:technique "oil on canvas";
rdfs:label "Sunflowers" .
rdfs:label "Sunflowers".

ex:potatoEaters a ex:Painting ;
ex:potatoEaters a ex:Painting;
ex:technique "oil on canvas";
rdfs:label "The Potato Eaters" .
rdfs:label "The Potato Eaters".

ex:Vasya a ex:Artist;
foaf:firstName "Vasya";
foaf:surname "Lozkin";
foaf:birthday "18-08";
foaf:age "42";
ex:creatorOf ex:Rossia;
foaf:homepage "http://vasya-lozhkin.ru/".

ex:Rossia a ex:Painting;
rdfs:label "Velikaya i prekrasnaya Rossiya";
ex:technique "oil on canvas".