RVL is a declarative RDF-based language for specifying visual mappings from RDFS/OWL data to graphic means. In the following we use the language to visualise example data specified using vocabulary from the Citation Ontology:
The above graphic was created by processing the RVL mappings below. A first mapping simply says map cito:cites to directed links
(e.g. connector lines with arrowheads).
@prefix : <http://purl.org/rvl/example/mapping/> . @prefix cito: <http://purl.org/spar/cito/> . @prefix rvl: <http://purl.org/rvl/> . @prefix vg: <http://purl.org/viso/graphic/> . @prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . :Cites2Linking a rvl:PropertyMapping ; rvl:sourceProperty cito:cites ; rvl:targetObjToObjRelation vg:Linking_Directed_Relation ; .
If you move the pointer over the edges, you can observe that also sub-properties of cito:cites have been used in some cases.
Let’s add another mapping to distinguish the different properties by color. We realize this with a sub-mapping attached to the first mapping:
:Cites2Linking a rvl:PropertyMapping ; rvl:sourceProperty cito:cites ; rvl:targetObjToObjRelation vg:Linking_Directed_Relation ; rvl:subMapping [ rvl:subMapping-onRole vg:linking_connector; rvl:subMapping-onTriplePart rdf:predicate; rvl:subMapping-mapping :PredicateID2Color; ]. :PredicateID2Color a rvl:PropertyMapping ; rvl:sourceProperty rdf:ID ; rvl:targetAttribute vg:color_named ; rvl:valueMapping [ rvl:sourceValueOrderedSet ( cito:confirms cito:cites cito:critiques ); rvl:targetValueList ( vg:Green vg:Yellow vg:Red ); ].
More examples will follow 🙂