Commit 28f8db9b authored by Jakub Jalowiec's avatar Jakub Jalowiec
Browse files

Uploading files

parents
catalog-v001.xml
settings.json
\ No newline at end of file
# fuseki-config
Konfiguracja Apache Jena Fuseki na potrzeby Data Steward School.
# Materiały
# Jak używać:
1. `wget https://dlcdn.apache.org/jena/binaries/apache-jena-fuseki-4.2.0.tar.gz`
2. `tar zxvf apache-jena-fuseki-4.2.0.tar.gz`
3. `cd apache-jena-fuseki-4.2.0`
4. raz odpal `./fuseki-server.bat` i zamknij po chwili (powinien się pojawić folder `run/configuration`)
5. `./fuseki-server.bat --config=run/configuration/fuseki-config/config.ttl`
6. odpal `http://localhost:3030` w przeglądarce i przejdź do `dataset` > `query`
7. zapytanie
```
PREFIX my_ontology: <http://ontology.example.net#>
SELECT * WHERE {
?sub my_ontology:livesIn ?a .
}
LIMIT 10
```
9. powinny być 4 wyniki (tylu zamieszkuje household_1)
@prefix : <http://base/#> .
@prefix fuseki: <http://jena.apache.org/fuseki#> .
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> .
<http://jena.apache.org/2016/tdb#GraphTDB>
rdfs:subClassOf ja:Model .
ja:ModelRDFS rdfs:subClassOf ja:Model .
ja:RDFDatasetSink rdfs:subClassOf ja:RDFDataset .
tdb:DatasetTDB rdfs:subClassOf ja:RDFDataset .
<http://jena.apache.org/2016/tdb#GraphTDB2>
rdfs:subClassOf ja:Model .
<http://jena.apache.org/text#TextDataset>
rdfs:subClassOf ja:RDFDataset .
ja:RDFDatasetZero rdfs:subClassOf ja:RDFDataset .
:service_tdb_all rdf:type fuseki:Service ;
fuseki:dataset :tdb_dataset_readwrite ;
fuseki:name "przyklad_1" ;
fuseki:serviceQuery "query" , "" , "sparql" ;
fuseki:serviceReadGraphStore "get" ;
fuseki:serviceReadWriteGraphStore
"data" ;
fuseki:serviceUpdate "" , "update" ;
fuseki:serviceUpload "upload" .
ja:ViewGraph rdfs:subClassOf ja:Model .
ja:GraphRDFS rdfs:subClassOf ja:Model .
<http://jena.apache.org/2016/tdb#DatasetTDB>
rdfs:subClassOf ja:RDFDataset .
tdb:GraphTDB rdfs:subClassOf ja:Model .
ja:DatasetTxnMem rdfs:subClassOf ja:RDFDataset .
<http://jena.apache.org/2016/tdb#DatasetTDB2>
rdfs:subClassOf ja:RDFDataset .
ja:RDFDatasetOne rdfs:subClassOf ja:RDFDataset .
ja:MemoryDataset rdfs:subClassOf ja:RDFDataset .
:tdb_dataset_readwrite a ja:RDFDataset ;
ja:defaultGraph <#rulesInferenceModel> .
<#input> a ja:MemoryModel ;
ja:content [ja:externalContent <data.nt> ] .
<#rulesInferenceModel> a ja:InfModel ;
ja:baseModel <#input> ;
ja:reasoner [
ja:rulesFrom <rules.txt> ;
ja:reasonerURL <http://jena.hpl.hp.com/2003/GenericRuleReasoner>
]
.
ja:DatasetRDFS rdfs:subClassOf ja:RDFDataset .
<http://example.net/person_1_0> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.net/person_1_0> <http://purl.org/vocab/relationship/livesWith> <http://example.net/person_1> .
<http://example.net/person_1_0> <http://purl.org/vocab/relationship/parentOf> <http://example.net/person_1> .
<http://example.net/person_1_0> <http://xmlns.com/foaf/0.1/age> "35"^^<http://www.w3.org/2001/XMLSchema#int> .
<http://example.net/person_1_0> <http://xmlns.com/foaf/0.1/gender> "female@en" .
<http://example.net/person_1_1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.net/person_1_1> <http://purl.org/vocab/relationship/livesWith> <http://example.net/person_1> .
<http://example.net/person_1_1> <http://purl.org/vocab/relationship/siblingOf> <http://example.net/person_1> .
<http://example.net/person_1_1> <http://xmlns.com/foaf/0.1/age> "13"^^<http://www.w3.org/2001/XMLSchema#int> .
<http://example.net/person_1_1> <http://xmlns.com/foaf/0.1/gender> "male@en" .
<http://example.net/person_1_2> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://example.net/person_1_2> <http://purl.org/vocab/relationship/livesWith> <http://example.net/person_1> .
<http://example.net/person_1_2> <http://purl.org/vocab/relationship/siblingOf> <http://example.net/person_1> .
<http://example.net/person_1_2> <http://xmlns.com/foaf/0.1/age> "15"^^<http://www.w3.org/2001/XMLSchema#int> .
<http://example.net/person_1_2> <http://xmlns.com/foaf/0.1/gender> "male@en" .
<http://example.net/household_1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://ontology.example.net#ResidentalBlock> .
<http://example.net/household_1> <http://ontology.example.net#livingArea> "70"^^<http://www.w3.org/2001/XMLSchema#int> .
<http://example.net/person_1> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://ontology.example.net#Patient> .
<http://example.net/person_1> <http://xmlns.com/foaf/0.1/age> "17"^^<http://www.w3.org/2001/XMLSchema#int> .
<http://example.net/person_1> <http://xmlns.com/foaf/0.1/gender> "female@en" .
<http://example.net/person_1> <http://ontology.example.net#livesIn> <http://example.net/household_1> .
\ No newline at end of file
@include <RDFS> .
@include <OWLmicro> .
@prefix rel: <http://purl.org/vocab/relationship/> .
@prefix ex <http://example.net/> .
@prefix foaf <http://xmlns.com/foaf/0.1/> .
@prefix owl <http://www.w3.org/2002/07/owl#> .
[siblingOf-closure: (?person1 rel:siblingOf ?person2), (?aunt rel:auntOf ?person1) -> (?aunt rel:auntOf ?person2)]
[childOf-reverse: (?child rel:childOf ?parent) -> (?parent rel:parentOf ?child)]
[parentOf-reverse: (?parent rel:parentOf ?child) -> (?parent rel:parentOf ?child)]
./fuseki-server.bat --config=run/configuration/fuseki-config/config.ttl
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment