rdf

How do you create a Fuseki SPARQL server using the Apache Jena Java API?

回眸只為那壹抹淺笑 提交于 2020-01-15 04:10:09
问题 I am trying to create a Fuseki SPARQL server on my machine. The documentation on the Jena website describes how to create such a server from the command-line, here: http://jena.apache.org/documentation/serving_data/. I am looking for a way of creating and initializing such a server just using the Jena Java API. I have looked over the Jena API but have not made any progress in working out how to proceed. Has anyone done this before? 回答1: Yes this is possible but it is not how Fuseki was

Why does my SPARQL query duplicate results?

雨燕双飞 提交于 2020-01-14 04:40:28
问题 I am doing some searching, and learning more about SPARQL, but it is not easy like SQL. I just want to know why my query duplicates result and how to fix it. This is my SPARQL Query: PREFIX OQ:<http://www.owl-ontologies.com/Ontology1364995044.owl#> SELECT ?x ?ys ?z ?Souhaite WHERE { ?y OQ:hasnameactivite ?x. ?y OQ:AttenduActivite ?Souhaite. ?y OQ:SavoirDeActivite ?z. ?y OQ:hasnamephase ?ys. ?y OQ:Activitepour ?v. ?ro OQ:hasnamerole ?nr. ?y OQ:avoirrole ?ro. FILTER regex (?nr ,"Concepteur").

RDFLib: get all URIs under a namespace

主宰稳场 提交于 2020-01-14 04:31:09
问题 How to get the list of URIs under a Namespace in RDFlib? For example, we can do: from rdflib.namespace import FOAF But how do we find out what URIs are available in FOAF? In fact, there are several namespaces (RDF, RDFS, FOAF, ...), and I find it difficult to explore which URIs are within each of them, and which one to use. Say, if I want to express a belonging relationship, should I use RDFS.member or something else? Is there a standard for linked data or it's still ad-hoc? I'm new to RDFs

Inference on Complex Classes in Protege

末鹿安然 提交于 2020-01-13 12:09:27
问题 I want to make inferences such as the property represented by the grey-dotted line in this diagram: I have asserted a general axiom: (hasTaste some Bitter) SubClassOf: goesWellWith some (hasTaste some Sweet) where 'bitter' is of type Bitter and 'sweet' is of type Sweet. I thought owl:someValuesFrom (or Manchester's "some") meant that at least one such relation must exist. Yet this does not happen after making the bold diagram assertions and the general axiom. How can I make this work? EDIT

Inference on Complex Classes in Protege

折月煮酒 提交于 2020-01-13 12:09:16
问题 I want to make inferences such as the property represented by the grey-dotted line in this diagram: I have asserted a general axiom: (hasTaste some Bitter) SubClassOf: goesWellWith some (hasTaste some Sweet) where 'bitter' is of type Bitter and 'sweet' is of type Sweet. I thought owl:someValuesFrom (or Manchester's "some") meant that at least one such relation must exist. Yet this does not happen after making the bold diagram assertions and the general axiom. How can I make this work? EDIT

sparql complete tree from subject

别说谁变了你拦得住时间么 提交于 2020-01-13 06:00:29
问题 When I have for example a person graph e.g. John and john has a work adress home adress phone numbers relations etc. Is it possible to retrieve everything that is connected to john and to the subclasses of john without knowing what it is? So that I can retrieve for example the following John < address < house_number < mobile_number < company < address < function < office number < etc... And retrieve this via: "John" rdfs:everything ?everything ... as deep as the tree goes. Or do I need to

sparql complete tree from subject

老子叫甜甜 提交于 2020-01-13 06:00:09
问题 When I have for example a person graph e.g. John and john has a work adress home adress phone numbers relations etc. Is it possible to retrieve everything that is connected to john and to the subclasses of john without knowing what it is? So that I can retrieve for example the following John < address < house_number < mobile_number < company < address < function < office number < etc... And retrieve this via: "John" rdfs:everything ?everything ... as deep as the tree goes. Or do I need to

How to get rdf file from sparql endpoint

余生长醉 提交于 2020-01-13 04:16:00
问题 I am new in opendata and need some help. Wikipedia have their sparql endpoint in this url: http://dbpedia.org/sparql Now I need to write webservice to get some rdf file from dbpedia. What should I send to this endpoint to get rdf file ? 回答1: Send a CONSTRUCT query. A little example: CONSTRUCT { ?s ?p ?o } WHERE { ?s ?p ?o } LIMIT 10 The WHERE clause works just like that of SELECT only the values fill the CONSTRUCT block as a kind of template. It's very flexible - you can either copy

Is Ontology File created in Protege with RDF/XML Format a RDF file or the OWL file?

别等时光非礼了梦想. 提交于 2020-01-13 02:45:14
问题 I have created the ontology file in the Protege and save it in the RDF/XML format. It also contains the OWL tag. So, the ontology file created by Protege and saved as RDF/XML format are actually the RDF files or the RDF form of the OWL files or the OWL format containing the RDF also or something else ? <?xml version="1.0"?> <!DOCTYPE rdf:RDF [ <!ENTITY owl "http://www.w3.org/2002/07/owl#" > <!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" > <!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#

Jena parsing issue for freebase RDF dump (Jan 2014)

末鹿安然 提交于 2020-01-11 06:07:49
问题 I am trying to parse freebase dump file freebase-rdf-2014-01-12-00-00.gz (25 GB) using Jena. There has been many issues reported by Jena regarding bad data. Example - 150.0 not valid,true and false values not valid These issues I have resolved by adding double quotes around decimal and true/false in dump file. However issues are still being reported by Jena.(current - org.apache.jena.riot.RiotException: [line: 161083, col: 110] Illegal object: [MINUS]) Is there any way to pre process this