Unable to get all properties for class DBpedia

I am using Sparql to get the entire property for a specific class using this code.

PREFIX db: <http://dbpedia.org/resource/>
PREFIX prop: <http://dbpedia.org/property/>
PREFIX onto: <http://dbpedia.org/ontology/>
select ?property ?value 
where { db:Thin-film-transistor_liquid-crystal_display ?property ?value . }

      

However, the result is missing some properties:

is dbpprop:display of   dbpedia:IPhone_4S
                        dbpedia:IPhone_5S
is dbpprop:industry of  dbpedia:InnoLux_Corporation
is dbpprop:paneltype of dbpedia:Dell_monitors
is dbpprop:products of  dbpedia:Zalman

      

How can I get these properties?

+3


source to share


1 answer


There is one important bit in the properties you mentioned, "OF". This means that the element you are looking for is an "object" and not a "subject" and you are looking for "objects". Therefore, if you change your object and object in the request, you will find them:

PREFIX db: <http://dbpedia.org/resource/>
PREFIX prop: <http://dbpedia.org/property/>
PREFIX onto: <http://dbpedia.org/ontology/>
select ?property ?value 
where { 
    ?value ?property db:Thin-film-transistor_liquid-crystal_display. 
}

      



So, if you want to pull everything out, one way is to combine:

PREFIX db: <http://dbpedia.org/resource/>
PREFIX prop: <http://dbpedia.org/property/>
PREFIX onto: <http://dbpedia.org/ontology/>
select ?property ?value 
where { 
{
   db:Thin-film-transistor_liquid-crystal_display ?property ?value. 
}
union{
    ?value ?property db:Thin-film-transistor_liquid-crystal_display. 
}
}

      

+5


source







All Articles