Skip to content

iolanta:matches property

  1. More features planned:
    • rdfs:Resource
      URL of a file with a SPARQL ASK query
    • sh:Shape
      SHACL shape for a node the Facet can visualize

iolanta:matches property describes an RDF node that the given Facet can visualize. Currently, the pattern can only be an inline SPARQL ASK query. The result of the query is a boolean value. If the query returns true, then the Facet is capable of visualizing the node denoted as $this in the query.

One Facet might have multiple patterns associated with it.

Usage Example: Graph Triples visualization

See the file on GitHub.

This piece of code defines the facet and describes the shape of the data this facet is capable of visualizing using a SPARQL ASK query.

"@context": context.yaml
$id: python://iolanta.facets.textual_graph.GraphFacet
$: Graph Triples
: https://iolanta.tech/cli/textual
: python://iolanta.facets.textual_default.InverseProperties
: ASK WHERE { GRAPH $this { ?s ?p ?o } }

See the file on GitHub.

Shared context for YAML-LD descriptions of bundled Iolanta facets. Documents the meaning of the properties used in graph-triples.yamlld.

"@context":
  rdfs: "https://www.w3.org/2000/01/rdf-schema#"
  rdf: https://www.w3.org/1999/02/22-rdf-syntax-ns#
  iolanta: https://iolanta.tech/
  owl: https://www.w3.org/2002/07/owl#
  schema: https://schema.org/
  xsd: https://www.w3.org/2001/XMLSchema#
  skos: https://www.w3.org/2004/02/skos/core#
  foaf: https://xmlns.com/foaf/0.1/
  vann: https://purl.org/vocab/vann/

  "@vocab": "local:"
  "@base": "local:"

  # Here goes convenience context.
  "$base": "@base"
  "$container": "@container"
  "$direction": "@direction"
  "$embed": "@embed"
  "$explicit": "@explicit"
  "$graph": "@graph"
  "$id": "@id"
  "$import": "@import"
  "$included": "@included"
  "$index": "@index"
  "$json": "@json"
  "$language": "@language"
  "$list": "@list"
  "$nest": "@nest"
  "$none": "@none"
  "$omitDefault": "@omitDefault"
  "$propagate": "@propagate"
  "$protected": "@protected"
  "$requireAll": "@requireAll"
  "$reverse": "@reverse"
  "$set": "@set"
  "$type": "@type"
  "$value": "@value"
  "$version": "@version"
  "$vocab": "@vocab"

  # Uncommenting any of the below will lead to a complaint about "@" from PyLD.
  # "$null": "@null"
  # "$never": "@never"
  # "$once": "@once"
  # "$always": "@always"

  iolanta:hasInstanceFacet:
    "@type": "@id"

  iolanta:hasDatatypeFacet:
    "@type": "@id"

  iolanta:outputs:
    "@type": "@id"

  iolanta:hasDefaultFacet:
    "@type": "@id"

  rdf:type:
    "@type": "@id"

  $: rdfs:label
  :
    "@type": "@id"
    "@id": iolanta:outputs

  :
    "@type": "@id"
    "@id": rdfs:subClassOf

  :
    "@type": "@id"
    "@id": iolanta:is-preferred-over

  : iolanta:matches
iolanta https://json-ld.github.io/yaml-ld/spec/data/namespace-prefixes.yamlld

By default, every file loaded by Iolanta is treated as an RDF graph, and Graph Triples is configured to be able to visualize RDF Graphs. Voila!