Dossier allows a certain amount of customisation when generating ontology diagrams. The display preferences for rendering classes, properties, etc. are specified as RDF (what else?) using the Dossier Ontology.
Dossier uses the graphviz dot program to convert a graph in the dot language into a nice SVG diagram. The display preferences essentially feed colour, shape, font and layout information into the dot definition, using the node, line and graph attributes.
An example set of statements (in turtle form) are:
rdfs:Resource dossier:fontName "sans-serif"^^xsd:string ; dossier:fontSize "10.0"^^xsd:double ; dossier:priority -100 . owl:DatatypeProperty dossier:color <http://www.charvolant.org/dossier/standard/colours/datatype-colour> ; dossier:isConstraint true ; dossier:priority 80 ; dossier:weight 0 . <http://www.charvolant.org/dossier/standard/colours/datatype-colour> a dossier:RGBColor ; rdfs:comment "A colour used to represent RDF datatypes and datatype properties"@en ; rdfs:label "datatype colour"@en ; dossier:blue "00"^^xsd:string ; dossier:green "C0"^^xsd:string ; dossier:red "00"^^xsd:string .
These associate the following rendering rules:
Generally, dossier properties are defined as annotations on the classes of classes and properties. For example, all classes have the same visual style, defined on owl:Class itself. Inheritance is used (eg. something that is an owl:Class will inherit from rdfs:Class, as well) with priorities used to sort out multiple inheritance.
Colours are generally defined as named resources with red, green, blue and alpha components. These components can be defined as hex (xsd:string datatype), integers from 0-255 (xsd:unsignedByte) or floats from 0.0-1.0 (xsd:double).
By default, the diagram generator uses an internal set of display preferences, located at /org/charvolant/dossier/standard.rdf To use customised display preferences, use the displayPreferences configuration option.
<build> ... <plugin> <groupId>org.charvolant</groupId> <artifactId>dossier-maven-plugin</artifactId> <configuration> ... <displayPreferences>src/main/ontology/my-display-preferences.rdf</displayPreferences> </configuration> ... </plugin> ... </build>