I have the query --
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX dbo: <http://dbpedia.org/ontology/>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
#select count(DISTINCT ?instance) # The number of suitable instances
#select DISTINCT ?instance ?type # Full Ground-truth dataset
select DISTINCT ?instance ?domain ?range ?subClassOf # Full Algorithm input dataset (sampling might be required)
where {
?instance rdf:type ?type;
rdfs:domain ?domain;
rdfs:range ?range;
rdfs:subClassOf* ?subClassOf.
}
ORDER BY ?instance
-- which returns all the triples which have type
, domain
, and range
properties. The resultset is like --
<http://dbpedia.org/ontology/torqueOutput> <http://www.w3.org/2000/01/rdf-schema#domain> <http://dbpedia.org/ontology/AutomobileEngine> .
<http://dbpedia.org/ontology/torqueOutput> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#FunctionalProperty> .
<http://dbpedia.org/ontology/torqueOutput> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
<http://dbpedia.org/ontology/torqueOutput> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
<http://dbpedia.org/ontology/torqueOutput> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#double> .
<http://dbpedia.org/ontology/torqueOutput> <http://www.w3.org/ns/prov#wasDerivedFrom> <http://mappings.dbpedia.org/index.php/OntologyProperty:torqueOutput> .
<http://dbpedia.org/ontology/torqueOutput> <http://www.w3.org/2000/01/rdf-schema#label> "torque output (Nm)"@en .
<http://dbpedia.org/ontology/displacement> <http://www.w3.org/2000/01/rdf-schema#domain> <http://dbpedia.org/ontology/AutomobileEngine> .
<http://dbpedia.org/ontology/displacement> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#FunctionalProperty> .
<http://dbpedia.org/ontology/displacement> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
<http://dbpedia.org/ontology/displacement> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#DatatypeProperty> .
<http://dbpedia.org/ontology/displacement> <http://www.w3.org/2000/01/rdf-schema#range> <http://www.w3.org/2001/XMLSchema#double> .
<http://dbpedia.org/ontology/displacement> <http://www.w3.org/ns/prov#wasDerivedFrom> <http://mappings.dbpedia.org/index.php/OntologyProperty:displacement> .
<http://dbpedia.org/ontology/displacement> <http://www.w3.org/2000/01/rdf-schema#label> "cilindrada (μ³)"@es .
<http://dbpedia.org/ontology/displacement> <http://www.w3.org/2000/01/rdf-schema#label> "displacement (μ³)"@en .
As you see, all the subjects are <http://dbpedia.org/ontology/......
but I would like to have the <http://dbpedia.org/resource/....
as my subjects. Is there any way to have them? My desired triples would look like this:
<http://dbpedia.org/resource/Otto_Georg_Thierack> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person> .
<http://dbpedia.org/resource/Otto_Georg_Thierack> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/Person> .
<http://dbpedia.org/resource/Otto_Georg_Thierack> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/Agent> .
<http://dbpedia.org/resource/Otto_Georg_Thierack> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person> .
<http://dbpedia.org/resource/Otto_Georg_Thierack> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> .
<http://dbpedia.org/resource/Erich_Wasicky> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> .
<http://dbpedia.org/resource/Erich_Wasicky> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/Person> .
<http://dbpedia.org/resource/Erich_Wasicky> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/Agent> .
<http://dbpedia.org/resource/Erich_Wasicky> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://schema.org/Person> .