rdfs

Link object to subject in RDF domain

非 Y 不嫁゛ 提交于 2019-12-25 07:33:20
问题 I have this RDF file: <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:j.0="http://relation/" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"> <rdf:Description rdf:about="soggetto"> <j.0:Nome>Vercelli</j.0:Nome> <j.0:Regione>Piemonte</j.0:Regione> </rdf:Description> <rdf:Description rdf:about="Piemonte"> <rdfs:label>Piemonte</rdfs:label> </rdf:Description> <rdf:Description rdf:about="Regione"> <rdfs:label>Regione</rdfs:label> <rdf:type rdf:resource="http://www.w3.org

Write rdf file without Alphabetical

十年热恋 提交于 2019-12-24 17:14:11
问题 Write RDF I have a model RDF and I want write it in a file. This would be the result: @prefix dc: <http://purl.org/dc/elements/1.1/> . @prefix legal: <http://www.linked-usdl.org/ns/usdl-legal#> . @prefix foaf: <http://xmlns.com/foaf/0.1/> . @prefix vann: <http://purl.org/vocab/vann/> . @prefix org: <http://www.w3.org/ns/org#> . @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . @prefix price: <http://www.linked-usdl.org/ns/usdl-price#> . @prefix usdl: <http://www.linked-usdl.org/ns/usdl#

sparql DESCRIBE query to get data about linked objects

╄→尐↘猪︶ㄣ 提交于 2019-12-24 08:47:09
问题 I have defined a rdf class for Books. Another rdf class for describing people. The Book class contains authoredBy field which links book instances to people instances. Properties of Book Book -Id -name -authoredBy Person -id -firstName -LastName -designation For retrieving book properties, i use the following sparql query DESCRIBE ?book WHERE { ?book a rdf:Book ; } I am able to retrieve all the properties belonging to Book using DESCRIBE i.e the predicate , subject and object. However when it

How rdf:Bag, rdf:Seq and rdf:Alt is different while using them?

折月煮酒 提交于 2019-12-24 05:26:05
问题 I'm reading the RDF Schema 1.1 recommendation, which includes the following (emphasis added): 5.1.2 rdf:Bag The rdf:Bag class is the class of RDF 'Bag' containers. It is a subclass of rdfs:Container. Whilst formally it is no different from an rdf:Seq or an rdf:Alt, the rdf:Bag class is used conventionally to indicate to a human reader that the container is intended to be unordered. 5.1.3 rdf:Seq The rdf:Seq class is the class of RDF 'Sequence' containers. It is a subclass of rdfs:Container.

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

When to use the subclass in RDFS?

こ雲淡風輕ζ 提交于 2019-12-23 06:51:10
问题 I want to create a RDFS schema about venue info which contains for example: only photo and address info. I find another schema about it: https://schema.org/Place. It contains more properties than I need. So, should I make my schema venue as a subclass of https://schema.org/Place? Or I just make a new class but reuse the properties in https://schema.org/Place? Do they have differences? 回答1: The semantic web / linked data lives of the re-use of existing vocabularies, so if you only need a sub

Issues with xpath that contained namespaces in Java (Dom parser)

我与影子孤独终老i 提交于 2019-12-23 05:10:35
问题 I'm trying to parse an rdfs xml file in order to find all the Classes in an rdfs file. The xpath: "/rdf:RDF/rdfs:Class" is working in my XML editor. When i insert the xpath in my Java program (i have implemented a dom parser), i get 0 Classes. The following example runs but it outputs 0 classes! I do: import java.io.IOException; import javax.xml.parsers.ParserConfigurationException; import javax.xml.xpath.XPathExpressionException; import org.xml.sax.SAXException; public class Main { public

is it correct that a class can be an instance?

烂漫一生 提交于 2019-12-23 02:16:10
问题 In this document https://www.w3.org/TR/rdf-schema/#ch_introduction it is written: rdfs:Resource is an instance of rdfs:Class. however it is also written: This is the class of everything is this a typo? can a class be an instance ? 回答1: That's actually an interesting question. I just want to add to your comment in CaptSolo's answer: but can I define my custom classes as instances of an instance? ( i highly doubt that ) It's not so much a question of whether you "can" do something or not (at

Difference between rdf:seeAlso and rdfs:seeAlso

元气小坏坏 提交于 2019-12-22 18:02:12
问题 What is the difference between rdf:seeAlso and rdfs:seeAlso ? When I can use rdf:seeAlso and when I can use rdfs:seeAlso ? Can you do any examples? 回答1: First, note that rdf and rdfs are prefixes commonly used to reference the RDF syntax and RDF schema vocabularies respectively. The rdf is typically used for http://www.w3.org/1999/02/22-rdf-syntax-ns#, so that rdf:seeAlso would expand to http://www.w3.org/1999/02/22-rdf-syntax-ns#seeAlso. However, if you follow the vocabulary reference, you

How to validate a RDF with your RDF schema

拟墨画扇 提交于 2019-12-22 08:34:13
问题 I'm using the Jena framework to manipulate RDF files, but I can't find a way to validate a RDF with your respective RDFSchema. I'm trying this method bellow: Model mod1 = new ModelMem(); Model modSchema = new ModelMem(); String baseURI = "http://iec.ch/TC57/2007/network"; String rdfPath = "file:D:\\modelo.rdf"; InputStream model = FileManager.get().open(rdfPath); String rdfPathSchema = "file:D:\\Schema.rdf"; InputStream modelSchema = FileManager.get().open(rdfPathSchema); mod1.read(model,