# $Id: CwmProtoGraphViz.n3,v 1.1 2002/10/22 13:00:59 graham Exp $ # # RDF graph visualization rules # #--------+---------+---------+---------+---------+---------+---------+---------+ # # Copyright (c) 2002, G. KLYNE # All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions # are met: # 1. Redistributions of source code must retain the above copyright # notice, this list of conditions and the following disclaimer. # 2. Redistributions in binary form must reproduce the above copyright # notice, this list of conditions and the following disclaimer in the # documentation and/or other materials provided with the distribution. # 3. The name of the author may not be used to endorse or promote products # derived from this software without specific prior written permission. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES # OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. # IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, # INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, # DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY # THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT # (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF # THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. # #--------+---------+---------+---------+---------+---------+---------+---------+ # $Source: /file/cvsweb/ninebynine.org/docs/IETF/XML/CwmProtoGraphViz.n3,v $ # $Author: graham $ # $Date: 2002/10/22 13:00:59 $ # $Id: CwmProtoGraphViz.n3,v 1.1 2002/10/22 13:00:59 graham Exp $ #--------+---------+---------+---------+---------+---------+---------+---------+ # # Run this with: # # python cwm.py input.n3 -bySubject -filter=VizRules.n3 -rdf > output.rdf # @prefix rdf: . @prefix rdfs: . @prefix log: . @prefix gviz: . @prefix foaf: . @prefix user: . @prefix homenet: . <> <#rcsId> "$Id: CwmProtoGraphViz.n3,v 1.1 2002/10/22 13:00:59 graham Exp $" . # Stole this trick from DanC #--------+---------+---------+---------+---------+---------+---------+---------+ # define overall graph properties <> gviz:digraph <#theGraph> . <#theGraph> gviz:rankdir "TB" ; # LR = left-right, TB = top-bottom gviz:size "10.5,18" ; gviz:ratio "compress" ; gviz:ranksep "2" ; gviz:nodesep "0.25" ; gviz:hasEdgeProperty foaf:name, user:usesHost, user:accessType, user:usedByName , log:implies, log:about . # Define graph properties for relationship arcs # NOTE: opera seems to have a bug displaying multiple colours in a PNG foaf:name gviz:label "name" ; gviz:fontsize "24" ; gviz:weight "2" ; gviz:color "navyblue" . user:usesHost gviz:label "uses host" ; gviz:fontsize "24" ; gviz:weight "2" ; gviz:color "blue" . user:accessType gviz:label "access type" ; gviz:fontsize "24" ; gviz:weight "2" ; gviz:color "seagreen" . user:usedByName gviz:label "used by" ; gviz:fontsize "24" ; gviz:weight "2" ; gviz:color "darkorange" . log:implies gviz:label "" ; gviz:fontsize "30" ; gviz:weight "2" ; gviz:color "green" . log:about gviz:label "" ; gviz:fontsize "30" ; gviz:weight "2" ; gviz:color "green" . # Define graph properties and labels for protocol nodes { ?x1 a foaf:Person ; foaf:name ?y1 } log:implies { <#theGraph> gviz:hasNode ?x1 . ?x1 gviz:label ?y1 ; gviz:shape "ellipse" ; gviz:style "filled" ; gviz:color "pink" ; gviz:fontcolor "white" ; gviz:fontsize "32" } . { ?x2 a user:HostSystem ; rdfs:label ?y2 } log:implies { <#theGraph> gviz:hasNode ?x2 . ?x2 gviz:label ?y2 ; gviz:shape "ellipse" ; gviz:style "filled" ; gviz:color "violet" ; gviz:fontcolor "white" ; gviz:fontsize "32" } . { ?x3 a user:AccessPolicy ; rdfs:label ?y3 } log:implies { <#theGraph> gviz:hasNode ?x3 . ?x3 gviz:label ?y3 ; gviz:shape "ellipse" ; gviz:style "filled" ; gviz:color "orange" ; gviz:fontcolor "white" ; gviz:fontsize "32" } . { ?x4 a log:Rule ; rdfs:label ?y4 } log:implies { <#theGraph> gviz:hasNode ?x4 . ?x4 gviz:label ?y4 ; gviz:shape "ellipse" ; gviz:color "white" ; gviz:fontcolor "green" ; gviz:fontsize "32" } . { ?x5 a log:Formula ; rdfs:label ?y5 } log:implies { <#theGraph> gviz:hasNode ?x5 . ?x5 gviz:label ?y5 ; gviz:shape "ellipse" ; gviz:style "dotted" ; gviz:color "white" ; gviz:fontcolor "green" ; gviz:fontsize "32" } . #--------+---------+---------+---------+---------+---------+---------+---------+ # $Log: CwmProtoGraphViz.n3,v $ # Revision 1.1 2002/10/22 13:00:59 graham # Add protocol dependency graph generator #