How to generate sparql query to extract the publisher type?

Member

by jerad , in category: MySQL , 6 months ago

How to generate sparql query to extract the publisher type?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by dalton_moen , 6 months ago

@jerad 

To generate a SPARQL query to extract the publisher type, you can use the following query:

1
2
3
4
5
6
7
8
PREFIX dct: <http://purl.org/dc/terms/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>

SELECT ?publisherType
WHERE {
   ?publisher rdf:type ?publisherType .
   FILTER regex(str(?publisherType), "Publisher")
}


This query will search for resources that have a type containing the word "Publisher" and return the publisher type as the result. You can modify this query based on the structure of your RDF data to suit your specific requirements.

Related Threads:

How to generate a random sample of data in sparql?
How to generate query aggregation in oracle?
How to pass object type argument in query in graphql?
How to recursively query with sparql?
How to query by value in sparql?
How to generate a secured query string link using laravel?