rdf

Using XmlReader get Unauthorized WebException

 ̄綄美尐妖づ 提交于 2019-12-24 00:14:58
问题 When trying to consume an RDF feed from craigslist, I'm running into a (401) Unauthorized WebException. I'm able to read the two commented out URLs directly below it with no issues. If I'm able to directly navigate to the craigslist URL using Internet Explorer with no problem, why does it fail when trying to load the data using an XmlReader? http://portland.craigslist.org/search/sss?query=mac&srchType=A&format=rss static void Main(string[] args) { XmlReader reader = XmlReader.Create("http:/

Fuseki owl reasoner not working with TDB

半世苍凉 提交于 2019-12-23 23:24:31
问题 This is my configuration file # Licensed under the terms of http://www.apache.org/licenses/LICENSE-2.0 ## Fuseki Server configuration file. @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 ja: <http://jena.hpl.hp.com/2005/11/Assembler#> . @prefix tdb: <http://jena.hpl.hp.com/2008/tdb#> . [] rdf:type fuseki:Server ; fuseki:services ( <#service1> ) . #

Define mutiple domains/ranges in a same propery in OWL

孤街醉人 提交于 2019-12-23 20:54:07
问题 What's the correct way to set domains/ranges of data/object properties in OWL? If I have two classes A , B and a data property hasName : <Declaration><Class IRI="#A"/></Declaration> <Declaration><Class IRI="#B"/></Declaration> <Declaration><DataProperty IRI="#hasName"/></Declaration> <FunctionalDataProperty> <DataProperty IRI="#hasName"/> </FunctionalDataProperty> <DataPropertyRange> <DataProperty IRI="#hasName"/> <Datatype abbreviatedIRI="xsd:string"/> </DataPropertyRange> I want to set

Jena Rule for Validation af a Ontology

人走茶凉 提交于 2019-12-23 20:07:05
问题 I want to validate an ontology and throw an error if anything is incorrect. The most validation I have to do looks like this: I have a class like this: <owl:Class rdf:about="&schema;ExampleClass"> <rdfs:subClassOf rdf:resource="&schema;SuperClass"/> <rdfs:subClassOf> <owl:Restriction> <owl:onProperty rdf:resource="&schema;myProperty"/> <owl:onClass rdf:resource="&schema;OtherClass"/> <owl:qualifiedCardinality rdf:datatype="&xsd;nonNegativeInteger">1</owl:qualifiedCardinality> </owl

Using owl:Class prefix with rdflib and xml serialization

穿精又带淫゛_ 提交于 2019-12-23 18:15:43
问题 I would like to use the owl: prefix in the XML serialization of my RDF ontology (using rdflib version 4.1.1); unfortunately I'm still getting the serialization as rdf:Description tags. I have looked at the answer about binding the namespace to the graph at RDFLib: Namespace prefixes in XML serialization but this seems to only work when serializing using the ns format rather than xml format. Let's be more concrete. I'm attempting to get the following ontology (as taken from Introducing RDFS

DBpedia SPARQL search similar to DBpedia lookup facility

被刻印的时光 ゝ 提交于 2019-12-23 17:23:50
问题 DBpedia offers a look up facility like http://lookup.dbpedia.org/api/search.asmx/KeywordSearch?QueryString=panda that returns a result set. Can the same result set be obtained by using SPARQL to query DBpedia 来源: https://stackoverflow.com/questions/15667133/dbpedia-sparql-search-similar-to-dbpedia-lookup-facility

RDF reading/parsing errors

回眸只為那壹抹淺笑 提交于 2019-12-23 16:43:45
问题 I have some RDF files which I want to import into a tripplestore(AllegroGraph), but at the first file I get a SAX parser error, stating there is an unrecognized character. After removing the line in question, everything is great. Then I have tried using the W3C RDF validator and Jena on the RDF with the error-line, but all I got was some warnings regarding undefined languages(absolutely nothing about the error-line). Could you please suggest a method(java if possible) to finding errors in RDF

Filtering based on a URI in SParQL [duplicate]

放肆的年华 提交于 2019-12-23 16:07:10
问题 This question already has an answer here : Exclude results from DBpedia SPARQL query based on URI prefix (1 answer) Closed 3 years ago . You can run the query below at the Linked MDB SPARQL Explorer. The values of ?imdbID (the last variable) contains IRIs from one of three possible domains (freebase.com, rottentomatoes.com or imdb.com). I would like to know how to apply a filter such that only the rows from the imdb.com domain are retained. PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>

How to import RDF file to Apache Solr

此生再无相见时 提交于 2019-12-23 12:46:02
问题 I'm new to Apache Solr. I want to import a rdf file into solr for indexing.I have googled it but I didn't find anything useful. please give me some pointers. 回答1: Solr accepts JSON documents. You can transform your RDF document into a JSON-LD document. JSON-LD is a RDF serialization format and it is part of RDF 1.1. You can safely go back and forth between JSON-LD and other RDF serializations and not loose any data. 回答2: Take a look at HttpDataSource example of DataImportHandler. It talks

How to validate datetime object in SPARQL? (Virtuoso 22007 Error DT006)

荒凉一梦 提交于 2019-12-23 12:36:28
问题 I get the following error. Virtuoso 22007 Error DT006: Cannot convert -0359 to datetime : Incorrect month field length SPARQL query: define sql:big-data-const 0 #output-format:text/html define sql:signal-void-variables 1 select ?item bif:year(xsd:dateTime( str(?dob))) as ?m{ ?item <h://f.cm/ns/common/topic/notable_types> <h://f.cm/ns/people/person> . ?item <h://f.cm/ns/people/person/date_of_birth> ?dob } limit 675 If I change the limit to 674 , it works. What I suspected was that some