TOOL

graphml2rdf

graphml2rdf is a small conversion tool that turns graph diagrams drawn in the yEd graph editor into RDF and OWL. It is published on GitHub by the user cui-ke, associated with the Knowledge Engineering group at the University of Geneva. Its purpose is to let a modeler design an ontology or entity-relationship schema visually as a yEd diagram and then mechanically derive a semantic-web graph from it, avoiding hand-editing of RDF syntax.

Input is a yEd-authored format:graphml file that uses nodes and edges from yEd's Entity-Relationship palette — specifically "Entity" and "Entity with Attributes" shapes plus labelled edges. The project ships two independent converters. An XSLT stylesheet (graphml2rdf.xsl, run through the Saxon HE processor with java -jar saxon9he.jar -xsl:graphml2rdf.xsl ...) emits format:rdf-xml. A Python 3.7+ script produces an OWL ontology serialized as format:turtle. The two paths overlap in intent but differ in output serialization and in how much of the diagram they interpret.

The mapping is direct and rule-driven. Each "Entity with Attributes" node labelled C becomes an OWL class C. An edge labelled subClassOf from C to D emits :C rdfs:subClassOf :D. A plain edge labelled P from C to D becomes a universal restriction (owl:Restriction with owl:onProperty :P and owl:allValuesFrom :D), while an edge labelled P min 1 produces the existential form with owl:someValuesFrom. The second line of an attribute box is captured as an rdfs:comment. A deliberate URI scheme distinguishes instances, which get "local" URIs derived from the source filename, from classes, which get "global" URIs independent of the file — so the same class name appearing across several diagrams resolves to one URI and separate exports can be loaded into a shared triple store without instance-name collisions.

The resulting RDF/OWL can be consumed by standard semantic-web tooling; for further RDF manipulation or reasoning it pairs naturally with libraries such as RDFLib (Python) or Jena/RIOT. graphml2rdf is narrow by design: it targets only yEd's ER conventions rather than arbitrary GraphML, literal datatypes are not yet supported, and the project is a lightweight research utility with a modest commit history rather than a general-purpose graph exchanger. For the opposite direction — rendering RDF as GraphML — separate tools like rdf2graphml exist.

Input Formats

Output Formats

Frequently Asked Questions

What graph file formats does graphml2rdf support?

See the list on this page — it shows every format graphml2rdf can read, write and display.

How do I import a graph into graphml2rdf?

Convert your file to a format graphml2rdf can read, then open it in graphml2rdf. Use GraphInOut to get a graphml2rdf-compatible file in seconds.

How do I convert a file so graphml2rdf can open it?

Use the convert links above — upload or paste your graph, pick a format graphml2rdf accepts and download the result, right in your browser.