Download dependencies
import xml.etree.cElementTree as ET
from lxml import etree
from itertools import chain
import pandas as pd
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | |
@prefix lingvoj: <http://www.lingvoj.org/ontology#> . | |
:hasCompetency | |
a owl:ObjectProperty ; | |
rdfs:label "basic competency in a language"@en ; | |
rdfs:range :Lingvo ; | |
rdfs:domain foaf:Person . | |
lingvoj:basicUnderstanding rdfs:subPropertyOf :hasCompetency . |
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | |
@prefix : <http://www.europeana.eu/schemas/edm/> . | |
@prefix dc: <http://purl.org/dc/elements/1.1/> . | |
@prefix abc: <http://metadata.net/harmony/abc#> . | |
@prefix DOLCE-Lite: <http://www.loa-cnr.it/ontologies/DOLCE-Lite.owl#> . | |
@prefix wgs84_pos: <http://www.w3.org/2003/01/geo/wgs84_pos#> . | |
@prefix foaf: <http://xmlns.com/foaf/0.1/> . | |
@prefix ore: <http://www.openarchives.org/ore/terms/> . | |
@prefix dcmitype: <http://purl.org/dc/dcmitype/> . | |
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . |
@Grab('com.hp.hpl.jena:jena:2.6.4') | |
@Grab('com.hp.hpl.jena:arq:2.8.8') | |
import groovy.sparql.Sparql | |
// Can also take a Jena model as an argument | |
def sparql = new Sparql("http://dbpedia.org/sparql") | |
def query = """ | |
SELECT ?abstract |
{ | |
"metadata": { | |
"name": "" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ | |
{ |
@prefix : <#> . | |
@prefix fuseki: <http://jena.apache.org/fuseki#> . | |
@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#> . | |
@prefix ja: <http://jena.hpl.hp.com/2005/11/Assembler#> . | |
[] rdf:type fuseki:Server ; | |
fuseki:services ( | |
<#fedoraService> |
10.1002 | Wiley Blackwell (John Wiley & Sons) | 111 River Street Hoboken, NJ 07030 USA | |
---|---|---|---|
10.1155 | Hindawi Publishing Corporation | Nasr City Free Zone Cairo, 11816 Egypt | |
10.1142 | World Scientific | No 5 Toh Tuck Link 596224 Singapore | |
10.1111 | Wiley Blackwell (Blackwell Publishing) | 111 River Street Hoboken, NJ 07030 USA | |
10.3109 | Informa UK (Informa Healthcare) | ||
10.1007 | Springer-Verlag | Van Godewijckstraat 30 Dordrecht, GX 3311 The Netherlands | |
10.1016 | Elsevier | 360 Park Ave South New York, NY 10010 USA | |
10.3402 | Co-Action Publishing | Haggebyholmsvagen 5 Balsta, 74694 Sweden | |
10.1017 | Cambridge University Press | The Edinburgh Bldg Shaftesbury Rd Cambridge, CB2 2RU UK | |
10.1080 | Informa UK (Taylor & Francis) | 4 Park Square Milton Park, Abingdon, OXON OX14 4RN UK |
If you are using vagrant, you probably-statistically are using git. Make sure you have its binary folder on your path, because that path contains 'ssh.exe'.
Now, modify C:\vagrant\vagrant\embedded\lib\ruby\gems\1.9.1\gems\vagrant-1.0.3\lib\vagrant\ssh.rb
to comment out the faulty Windows check and add a real SSH check:
# if Util::Platform.windows?
# raise Errors::SSHUnavailableWindows, :host => ssh_info[:host],
# :port => ssh_info[:port],
# :username => ssh_info[:username],
# :key_path => ssh_info[:private_key_path]
Handlebars.registerHelper ('truncate', function (str, len) { | |
if (str.length > len) { | |
var new_str = str.substr (0, len+1); | |
while (new_str.length) { | |
var ch = new_str.substr ( -1 ); | |
new_str = new_str.substr ( 0, -1 ); | |
if (ch == ' ') { | |
break; |
""" | |
Sample code to traverse RDF list with RDFLIB. | |
author: Manuel Salvadores (msalvadores@gmail.com) | |
rdf containers are a pain in general, quite annoying to handle them. | |
To get all the authors for a given article like in your case you could do | |
something like the code I am posting below. |