semantic-web

Neo4j SPARQL-plugin REST usage

时光毁灭记忆、已成空白 提交于 2019-12-10 12:16:13
问题 Im trying to run a SPARQL-query on my neo4j database by using the REST API. For getting a SPARQL-endpoint, Ive installed the Noe4j SPARQL-plugin (https://github.com/neo4j-contrib/sparql-plugin). My system now exposes these sparql-endpoints: http://localhost:7474/db/data/ext/SPARQLPlugin/graphdb/insert_quad http://localhost:7474/db/data/ext/SPARQLPlugin/graphdb/execute_sparql Im trying to use the sencond one to execute queries. The HTTP POST Request is supposed to be like "Example 2" in http:/

How to parameterize a SPARQL query in SWI Prolog?

偶尔善良 提交于 2019-12-10 11:42:10
问题 I am having difficulty making the following SPARQL query parametric. First I load the request library: ?- use_module(library(semweb/sparql_client)). % library(uri) compiled into uri 0.02 sec, 290,256 bytes % library(readutil) compiled into read_util 0.00 sec, 17,464 bytes % library(socket) compiled into socket 0.00 sec, 11,936 bytes % library(option) compiled into swi_option 0.00 sec, 14,288 bytes % library(base64) compiled into base64 0.00 sec, 17,912 bytes % library(debug) compiled into

OWL how to force all the instances of a specific class to have a specific relationship

旧巷老猫 提交于 2019-12-10 11:32:47
问题 I am building an Ontology. I have a Class called Vehicle I have an Object Property called hasType I have a Class called VehicleTypes How can I force all the instances from Vehicle class to have one and just one instance of VehicleTypes What I have tried I am working on Protege. I made the hasType as a functional property. I added an Equivalent To which is like this: hasType exactly 1 VehicleTypes Is that enough please? 回答1: Making hasType functional is the right move since every Vehicle can

MarkLogic - CORS with REST API

a 夏天 提交于 2019-12-10 10:31:08
问题 I have a MarkLogic-based web application which pulls data from two sources, a document store and a triple store both hosted on my MarkLogic server. The app uses MarkLogic's built-in REST APIs to access these data stores. The document store's REST API is running on port 8003 and the triple store's REST API is on port 8007. The application is hosted on the modules database of the document store. Now, when I make a REST API call to pull triple data, I get an exception saying the 'access-control

RESTful Web Service usage of custom link relations - 'rel'

允我心安 提交于 2019-12-09 17:30:14
问题 I'm working on a RESTful service and have been focusing on Discoverability, Link relations - 'rel' and microformats. I'm not clear about the values of 'rel' in the context of REST - am I allowed to make use of any custom value, to provide richer semantics or should I only use the default values (which are very constraining)? I am aware that microformats have indeed extended the values of 'rel', but I am not using any kind of microformat yet. Any help is appreciated. Thanks. 回答1: Link

How to recursively expand blank nodes in SPARQL construct query?

雨燕双飞 提交于 2019-12-09 14:57:36
问题 There is probably an easy to answer to this, but I can't even figure out how to formulate the Google query to find it. I'm writing SPARQL construct queries against a dataset that includes blank nodes. So if I do a query like CONSTRUCT {?x ?y ?z .} WHERE {?x ?y ?z .} Then one of my results might be: nm:John nm:owns _:Node Which is a problem if all of the _:Node nm:has nm:Hats triples don't also get into the query result somehow (because some parsers I'm using like rdflib for Python really don

Why use owl:Restriction as own:EquivalenceClass's property?

狂风中的少年 提交于 2019-12-09 13:19:23
问题 I just start to learn Semantic Web and have a question about restriction class. I dug a while but haven't found any answer yet.. Any help would be much appreciated! From text book, I see examples of define restriction class, they are all about to define a anonymous owl:Restriction class bnode and link this bnode with property owl:equivalentClass . example: example:restrictionClass owl:equivalentClass [ rdf:type owl:Restriction; owl:onProperty example:resProp; owl:someValuesFrom example

owl - protege not inferring correctly? how to define precisely a class “vegetarian”?

跟風遠走 提交于 2019-12-09 13:11:15
问题 I have been stuck for two days now trying to understand why the following scenario isn't working: screenshots here: http://dl.dropbox.com/u/4677548/screenshots.html I have a VegetarianFood class (subclass of Food) that is equivalent to "Food and (Eggs or MilkAndDerivates or VeganFood)" as you can see in the screenshot number 1 The VeganFood class, on turn, is equivalent to other classes (NutsAndSeeds, Cereals, Fruit, etc...) screenshot 2 as you can see there are two individuals (cheddar

What is the difference between RDF Schema and Ontology?

断了今生、忘了曾经 提交于 2019-12-09 04:42:48
问题 I am new to Semantic Web and confused regarding RDFs and Ontology. Can someone explain the difference between RDF Schema and Ontology ? 回答1: RDF Schema (RDFS) is a language for writing ontologies. An ontology is a model of (a relevant part of) the world, listing the types of object, the relationships that connect them, and constraints on the ways that objects and relationships can be combined. A simple example of an ontology (though not written in RDFS syntax): class: Person class: Project

Using jena for creating RDF from XMl file [duplicate]

橙三吉。 提交于 2019-12-09 01:16:27
This question already has answers here : Closed 7 years ago . Possible Duplicate: create RDF from XML I am sorry for asking this question for the second time, I am still still having problem in generating rdf from the following xml file. <xml> <person> <name>Joe</name> <website url="www.example1.com">contact1</website > <vote>20</vote> </person> <person> <name>Anna</name> <website url="www.example2.com">contact2</website> <vote>80</vote> </person> </xml> I think using jena might solve the issue , but I am not sure how to do so, since each has got three properties and I would like the out put