1

Is there a way to search for SKOS concepts by prefLabel (Visual graph)? Also, have prefLabels displayed in results?

Paul R
  • 208,748
  • 37
  • 389
  • 560
dido_b
  • 13
  • 3

1 Answers1

0

In all version before GraphDB 8.3, the only way to change the returned results is to edit the SPARQL query packaged as a resource file in a JAR file.

  1. Make a copy of the distribution
  2. Locate the JAR file in the distribution lib/workbench/WEB-INF/lib/graphdb-framework-graph-explore-.jar
  3. Find the resource file ./graph-explore-queries/describeResource.sparql
  4. Modify the query and replace rdfs:label with another predicate:

    PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
    PREFIX sesame: <http://www.openrdf.org/schema/sesame#>
    PREFIX rank: <http://www.ontotext.com/owlim/RDFRank#>
    
    SELECT ?type ?label ?rank ?langPriority {{from}} {
        {
            BIND ({{nodeiri}} as ?iri)
           {
               ?iri sesame:directType ?type.
           }
           UNION {
                ?iri rdfs:label ?label.
                BIND(LANG(?label) AS ?langLabel)
                BIND( {{langMatches}} AS ?langPriority)
            }
            UNION {
                ?iri rank:hasRDFRank ?rank
            }
        }
    } 
    ORDER BY ?type ?langPriority
    
    1. Repackage the JAR file and test the results.
vassil_momtchev
  • 1,173
  • 5
  • 11