# $Id: CwmProtoGraphViz.n3,v 1.1 2002/10/22 13:00:59 graham Exp $ # # Survey of protocols and frameworks related to XML # #--------+---------+---------+---------+---------+---------+---------+---------+ # # 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 $ #--------+---------+---------+---------+---------+---------+---------+---------+ # 1 2 3 4 5 6 7 8 # # NOTES # # Extract protocol cross-reference relationships from protocol data # # Run this with: # # python cwm.py XMLProtocolSurvey.n3 -bySubject -filter=CwmProtoSelect.n3 -rdf > XMLProtocols.rdf # @prefix rdf: . @prefix rdfs: . @prefix log: . @prefix gviz: . #@prefix foaf: . #@prefix dc: . @prefix protocol: . <> <#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 protocol:uses, protocol:canUse, protocol:contains, protocol:canContain, protocol:cannotContain . # Define graph properties for relationship arcs # NOTE: opera seems to have a bug displaying multiple colours in a PNG protocol:uses gviz:label "Uses" ; gviz:fontsize "24" ; gviz:weight "2" ; gviz:color "navyblue" . protocol:canUse gviz:label "Can use" ; gviz:fontsize "20" ; gviz:weight "2" ; gviz:color "blue" . protocol:contains gviz:label "Contains" ; gviz:fontsize "24" ; gviz:weight "2" ; gviz:color "seagreen" . protocol:canContain gviz:label "Can contain" ; gviz:fontsize "20" ; gviz:weight "2" ; gviz:color "green" . protocol:cannotContain gviz:label "Cannot contain" ; gviz:fontsize "24" ; gviz:weight "2" ; gviz:color "darkorange" . this log:forAll <#x>, <#y> . # Define graph properties and labels for protocol nodes { <#x> a protocol:Protocol ; rdfs:label <#y> } log:implies { <#theGraph> gviz:hasNode <#x> . <#x> gviz:label <#y> ; gviz:shape "ellipse" ; gviz:style "filled" ; gviz:color "violet" ; gviz:fontcolor "white" ; gviz:fontsize "32" } . #--------+---------+---------+---------+---------+---------+---------+---------+ # $Log: CwmProtoGraphViz.n3,v $ # Revision 1.1 2002/10/22 13:00:59 graham # Add protocol dependency graph generator #