JervenBolleman / void-generator

Calculate statistics for use in a Service Description or Void file
MIT License
6 stars 4 forks source link

Generated Void Description display 0 triples on populated graph in GraphDB #26

Open aibba19 opened 2 days ago

aibba19 commented 2 days ago

Hello,

I found this repository while searching for methods to extract metadata from my graph stored in GraphDB (currently on my local PC), and it seems very helpful for my use case.

I attempted to run the following bash commands as described in the repository:

java -jar /content/void-generator-0.6-uber.jar -r http://myIP:7200/repositories/Barcelona2 \
   -p http://myIP:7200/repositories/Barcelona2 \
   --void-file void-barcelona2.ttl \
   --iri-of-void 'http://myIP:7200/repositories/Barcelona2/' \
   -g http://myIP:7200/repositories/Barcelona2 

This resulted in the following output file:

@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix void: <http://rdfs.org/ns/void#> .
@prefix : <http://www.w3.org/ns/sparql-service-description#> .
@prefix void_ext: <http://ldf.fi/void-ext#> .
@prefix formats: <http://www.w3.org/ns/formats/> .
@prefix pav: <http://purl.org/pav/> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix dcterms: <http://purl.org/dc/terms/> .

<http://myIP:7200/repositories/Barcelona2> a :Service, :NamedGraph;
  :defaultDataset <http://myIP:7200/repositories/Barcelona2#sparql-default-dataset>;
  :endpoint <http://myIP:7200/repositories/Barcelona2>;
  :resultFormat formats:SPARQL_Results_CSV, formats:SPARQL_Results_JSON, formats:N-Triples,
    formats:RDF_XML, formats:SPARQL_Results_TSV, formats:Turtle, formats:SPARQL_Results_XML;
  :supportedLanguage :SPARQL11Query;
  :feature :UnionDefaultGraph, :BasicFederatedQuery;
  :availableGraphs _:cb2e5e19164a411cb17ed8dde9d32bf911;
  :name <http://myIP:7200/repositories/Barcelona2>;
  :graph <http://myIP:7200/repositories/Barcelona2/void#_graph_Barcelona2!e1011618> .

<http://myIP:7200/repositories/Barcelona2#sparql-default-dataset> a :Dataset;
  :defaultGraph <http://myIP:7200/repositories/Barcelona2/void#sparql-default-graph>;
  :namedGraph <http://myIP:7200/repositories/Barcelona2> .

<http://myIP:7200/repositories/Barcelona2/void#sparql-default-graph> a :Graph;
  void:distinctObjects "15706"^^xsd:long;
  void_ext:distinctLiterals "9559"^^xsd:long;
  void_ext:distinctIRIReferenceObjects "6147"^^xsd:long;
  void:distinctSubjects "6132"^^xsd:long;
  void_ext:distinctIRIReferenceSubjects "6132"^^xsd:long .

_:cb2e5e19164a411cb17ed8dde9d32bf911 :namedGraph <http://myIP:7200/repositories/Barcelona2> .

<http://myIP:7200/repositories/Barcelona2/void#_graph_Barcelona2!e1011618>
  a :Graph;
 ** void:triples "0"^^xsd:long ** .

Since the repository is populated with many triples, I expected to see a different output instead of void:triples "0".

What am I doing wrong here? Any help or advice would be greatly appreciated.

galgonek commented 2 days ago

Hello,

How many triplets do you have in graph http://myIP:7200/repositories/Barcelona2? What result will the following SPARQL query return?

SELECT (COUNT(*) AS ?COUNT) WHERE {
  GRAPH <http://myIP:7200/repositories/Barcelona2> {
    ?S ?P ?O
  }
}