question

Upvotes
Accepted
1 1 0 0

I want to count how many times the foaf:account property is used(SPARQL)


I want to write a SPARQL query to count how many times the foaf:account property is used and how to execute it in Java.

Can someone help me please?

In this case, i want the SPARQL query to return "2".

<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:foaf="http://xmlns.com/foaf/0.1/">   
         <foaf:Person rdf:about="https://someone">     
         <foaf:lastName>Surname</foaf:lastName>   
         <foaf:account>https://www.acc1.com</foaf:account>   
         <foaf:account>https://www.acc2.com</foaf:account> 
         <foaf:weblog>https://smth</foaf:weblog>   
        </foaf:Person>  
</rdf:RDF>
javadata-modelapacherdfsparql
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @natashastojanova6

Thank you for your participation in the forum. Is the reply below satisfactory in resolving your query?

If yes, please click the 'Accept' text next to the reply. This will guide all community members who have a similar question. Otherwise please post again offering further insight into your question.

Thanks,

AHS

Please be informed that a reply has been verified as correct in answering the question, and has been marked as such.

Thanks,


AHS


1 Answer

· Write an Answer
Upvotes
Accepted
78.8k 250 52 74

@natashastojanova6

This forum is dedicated to technical queries on Refinitiv product APIs. From the query, I think it is not Refinitiv APIs.

However, I found the same question posted on stack overflow.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.