Roadmap
This is a test.
;; -*- mode: dotspacemacs -*- | |
(defun dotspacemacs/layers () | |
(setq-default | |
dotspacemacs-configuration-layers `( | |
spacemacs | |
my-web-dev | |
(colors :variables | |
colors-enable-rainbow-identifiers t | |
colors-enable-nyan-cat-progress-bar t) |
prefix geof: <http://www.opengis.net/def/function/geosparql/> | |
prefix geo: <http://www.opengis.net/ont/geosparql#> | |
//get locations within 2km of Complexible HQ | |
select ?name where { | |
?loc rdfs:label ?name . | |
?loc geo:hasGeometry ?feature . | |
?hq geo:hasGeometry ?hqGeo ; rdfs:label "Complexible Headquarters" . | |
?feature geof:nearby (?hqGeo 2 <http://www.qudt.org/qudt/owl/1.0.0/unit/Instances.html#Kilometer>). |
This is a test.
:m1 a :Movie; :title "The Matrix"; :year "1999-03-31". | |
:m2 a :Movie; :title "The Matrix Reloaded"; :year "2003-05-07". | |
:m3 a :Movie; :title "The Matrix Revolutions"; :year "2003-10-27". | |
:neo a :Actor; :name "Keanu Reeves". | |
:morpheus a :Actor; :name "Larry F". | |
:trinity a :Actor; :name "CAM". | |
:neo :hasRole [:as "Neo"; :in :m1]. | |
:neo :hasRole [:as "Neo"; :in :m2]. |
I hereby claim:
To claim this, I am signing this object:
# graph for shortest path with reasoning | |
@prefix rule: <tag:stardog:api:rule:> . | |
@prefix : <urn:test:> . | |
@prefix g: <tag:stardog:api:property:graph:> . | |
# the graph | |
:one :to :two . | |
:one :to :four . | |
:two :to :four . | |
:two :to :five . |
-> % java -cp dist/lib/stardog-cli.jar com.clarkparsia.stardog.cli.console.StardogConsole | |
INFO: Stardog Server running on local:stardog | |
> help | |
Stardog 0.7.4 command line client | |
Type 'help <cmd>' or '<cmd> -h/--help' to print the usage information for a specific command | |
Available commands: | |
add | |
connect |
String sparql = "CONSTRUCT { ?a <urn:test:new> ?b } WHERE { ?a <urn:test:p> ?b }"; | |
List<Map<String,String>> results = snarlTemplate.construct(sparql, new GraphMapper<Map<String,String>>() { | |
@Override | |
public Map<String, String> mapRow(Statement next) { | |
Map<String,String> map = new HashMap<String,String>(); | |
map.put(next.getSubject().stringValue(), next.getObject().stringValue()); | |
return map; | |
} | |
}); |
String sparql = "SELECT ?a ?b WHERE { ?a <urn:test:b> ?b } LIMIT 5"; | |
List<Map<String,String>> results = snarlTemplate.query(sparql, new RowMapper<Map<String,String>>() { | |
@Override | |
public Map<String,String> mapRow(BindingSet bindingSet) { | |
Map<String,String> map = new HashMap<String,String>(); | |
map.put("a", bindingSet.getValue("a").stringValue()); | |
map.put("b", bindingSet.getValue("b").stringValue()); | |
return map; | |
} |
<bean name="dataSource" class="com.clarkparsia.stardog.ext.spring.DataSourceFactoryBean"> | |
<property name="to" value="testdb"/> | |
<property name="createIfNotPresent" value="true"/> | |
</bean> | |
<bean name="template" class="com.clarkparsia.stardog.ext.spring.SnarlTemplate"> | |
<property name="dataSource" ref="dataSource"/> | |
</bean> | |
<bean name="importer" class="com.clarkparsia.stardog.ext.spring.DataImporter"> |