Newest version:
http://www.cs.rpi.edu/~puninj/RGML/draft-rgml.html
Previous version:
http://www.cs.rpi.edu/~puninj/RGML/draft-rgml-20010410.html
Editors:
John Punin <puninj@cs.rpi.edu>
Mukkai Krishnamoorthy <moorthy@cs.rpi.edu>
A. RDF/XML Serialization of the RGML RDF Schema
B. References
Several examples in this specification show how easy it is to describe different kind of graphs using the RGML vocabulary. Our main interest is to describe webgraphs[WWWPAL]. A webgraph describes the structure of a web site where the nodes are web pages and the edges are hyperlinks. We use the Dublin Core [DC] vocabulary to add information to nodes (web pages) such as dc:title (title of the web page), dc:format (mime of the web page), and dc:date (date of creation of the web page). Using RGML we can also define web collections (a collection of web pages that represent one document) as subgraphs of a webgraph. Site-maps can also be seen as graph instances; hence RGML is a good candidate for describing site-maps.
<rdfs:Class rdf:ID="Integer" rdfs:label="Integer" rdfs:comment="Literals that are Integers"> <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> </rdfs:Class>The Integer class is a subclass of the RDF Literal Class. It represents all literals that are integer number such as: 20, -3, 0 .
<rdfs:Class rdf:ID="Boolean" rdfs:label="Boolean" rdfs:comment="Boolean Values: true and false"> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> </rdfs:Class> <rgml:Boolean rdf:ID="true"/> <rgml:Boolean rdf:ID="false"/>The Boolean class defines two values: true and false. Two instances of the Boolean class are defined in the RGML RDF Schema, one with ID of true and other with ID of false.
<rdfs:Class rdf:ID="String" rdfs:label="String" rdfs:comment="Literals that are Strings"> <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> </rdfs:Class>The String Class is a subclass of the RDF Literal Class. It represents all literals that are strings.
<rdfs:Class rdf:ID="Graph" rdfs:label="Graph" rdfs:comment="A Graph Description"> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> </rdfs:Class>The Graph class is an RDF class that defines a general graph. This is the Graph class that is the domain of the RDF properties: label and directed. The nodes and edges RDF properties help to relate instances of the Graph class with instances of Node and Edge classes. Other kind of graphs such as Webgraphs, RDF graphs, Network graphs can be subclasses of this Graph Class.
<rdfs:Class rdf:ID="Node" rdfs:label="Node" rdfs:comment="A Node Description"> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> </rdfs:Class>The Node class is an RDF class that defines a general node. The label and weight RDF properties have Node class as domain. All nodes of a graph are instances of these class. Webnodes (web pages) of a Webgraph can be subclasses of the Node class.
<rdfs:Class rdf:ID="Edge" rdfs:label="Edge" rdfs:comment="An Edge Description"> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> </rdfs:Class>The Edge class is an RDF Class that defines a general edge. The label and weight RDF properties are related to the Edge class. The source and target RDF properties of the edge class allow it to relate two node instances or, in case of a hypergraph, many node instances. (The instances of edges that have a list of nodes are called hyperedges. A hyperedge is defined as a subset of a set of nodes. Graphs that contain hyperedges are called hypergraphs. ) Webedges (hyperlinks) of a Webgraph can be subclasses of the Edge class.
<rdf:Property ID="label" rdfs:label="label" rdfs:comment="Unique String identifier of the graph elements"> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Graph"/> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Node"/> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Edge"/> <rdfs:range rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#String"/> </rdf:Property>The label property is a global property for all instances of the RGML classes. It gives an unique string identifier to the instances of the graphs, nodes and edges.
<rdf:Property ID="directed" rdfs:label="directed" rdfs:comment="Boolean value to indicate whether the Graph is directed or not"> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Graph"/> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Edge"/> <rdfs:range rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Boolean"/> </rdf:Property>The directed property has a Boolean range and a Graph domain. The values that can be assigned to this property are either true or false. This indicates whether the graph is directed or not. Mixed graphs allow directed and undirected edges in the same graph. The directed property also belong to a specific edge instance to indicate whether that edge is directed or not. This edge property will allow one to describe mixed graphs.
<rdf:Property ID="nodes" rdfs:label="Nodes" rdfs:comment="List of the nodes belong to the graph"> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Graph"/> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Edge"/> <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/> </rdf:Property>The nodes property is an RDF Bag list of the node instances that belongs to the graph. This gives an idea of inclusion so we can determine what nodes are members of the graph. The nodes property can belong to the Edge class. The instances of edges that have a list of nodes are called hyperedges. A hyperedge is defined as a subset of a set of nodes. Graphs that contain hyperedges are called hypergraphs. If the hypergraph is directed, the nodes property of the hyperedges is an RDF Seq. The RDF Seq gives an order to the list of nodes in the hyperedge.
<rdf:Property ID="edges" rdfs:label="Edges" rdfs:comment="List of the edges belong to the graph"> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Graph"/> <rdfs:range rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag"/> </rdf:Property>The edges property is an RDF Bag list of the edge instances that belongs to the graph. This gives an idea of inclusion so we can determine what edges are members of the graph.
<rdf:Property ID="graphs" rdfs:label="Graphs" rdfs:comment="List of subgraphs belong to the graph"> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Graph"/> <rdfs:range rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag"/> </rdf:Property>The graphs property is an RDF Bag list of the subgraph instances of the graph parent. By using this property, we can relate subgraphs with the graph that they are originated from.
<rdf:Property ID="weight" rdfs:label="weight" rdfs:comment="Value (usually numerical) to show the node or edge weight"> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Node"/> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Edge"/> <rdfs:range rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#String"/> </rdf:Property>The weight property belongs to Node and Edge instances. The weight is usually a numerical value assigned to a node or edge in a weighted graph.
<rdf:Property ID="source" rdfs:label="source" rdfs:comment="The rdf:ID the source node of the edge"> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Edge"/> <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/> </rdf:Property>The source property is used to indicate the source node instance of a edge instance.
<rdf:Property ID="target" rdfs:label="node" rdfs:comment="The rdf:ID of the target node of the edge"> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Edge"/> <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/> </rdf:Property>The target property is used to indicate the target node instance of a edge instance.
|
<?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/puninj/2001/05/rgml-schema#" xmlns:rgml="http://purl.org/puninj/2001/05/rgml-schema#" > <Graph rdf:ID="g1" rgml:directed="http://purl.org/puninj/2001/05/rgml-schema#true"> <nodes> <rdf:Bag> <rdf:li resource="#n1"/> <rdf:li resource="#n2"/> <rdf:li resource="#n3"/> </rdf:Bag> </nodes> <edges> <rdf:Bag> <rdf:li resource="#e1"/> <rdf:li resource="#e2"/> </rdf:Bag> </edges> </Graph> <Node rdf:ID="n1"/> <Node rdf:ID="n2"/> <Node rdf:ID="n3"/> <Edge rdf:ID="e1"> <source rdf:resource="#n1"/> <target rdf:resource="#n2"/> </Edge> <Edge rdf:ID="e2"> <source rdf:resource="#n1"/> <target rdf:resource="#n3"/> </Edge> </rdf:RDF>
|
<?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/puninj/2001/05/rgml-schema#" xmlns:rgml="http://purl.org/puninj/2001/05/rgml-schema#" xmlns:dc="http://purl.org/dc/elements/1.1/"> <Graph rdf:ID="g1" rgml:directed="http://purl.org/puninj/2001/05/rgml-schema#true"> <nodes> <rdf:Bag> <rdf:li resource="#n1"/> <rdf:li resource="#n2"/> <rdf:li resource="#n3"/> </rdf:Bag> </nodes> <edges> <rdf:Bag> <rdf:li resource="#e1"/> <rdf:li resource="#e2"/> </rdf:Bag> </edges> </Graph> <Node rdf:ID="n1" rgml:label="http://www.cs.rpi.edu/" rgml:weight="3678"> <dc:title>Rensselaer Computer Science Department</dc:title> <dc:date>2001-03-01</dc:date> <dc:format>text/html</dc:format> </Node> <Node rdf:ID="n2" rgml:label="http://www.cs.rpi.edu/people/" rgml:weight="10611"> <dc:title>People at Rensselaer Computer Science Department</dc:title> <dc:date>2001-02-26</dc:date> <dc:format>text/html</dc:format> </Node> <Node rdf:ID="n3" rgml:label="http://www.cs.rpi.edu/courses/" rgml:weight="6968"> <dc:title>Courses at Rensselaer Computer Science Department</dc:title> <dc:date>2001-01-25</dc:date> <dc:format>text/html</dc:format> </Node> <Edge rdf:ID="e1" rgml:label="Courses"> <source rdf:resource="#n1"/> <target rdf:resource="#n2"/> </Edge> <Edge rdf:ID="e2" rgml:label="People"> <source rdf:resource="#n1"/> <target rdf:resource="#n3"/> </Edge> </rdf:RDF>
|
<?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/puninj/2001/05/rgml-schema#" xmlns:rgml="http://purl.org/puninj/2001/05/rgml-schema#"> <Graph rdf:ID="g1" rgml:directed="http://purl.org/puninj/2001/05/rgml-schema#true"> <nodes> <rdf:Bag> <rdf:li resource="#n1"/> <rdf:li resource="#n2"/> </rdf:Bag> </nodes> <edges> <rdf:Bag> <rdf:li resource="#e1"/> </rdf:Bag> </edges> </Graph> <Node rdf:ID="n1" rgml:label="http://www.w3.org/Home/Lassila"/> <Node rdf:ID="n2" rgml:label="Ora Lassila"/> <Edge rdf:ID="e1" rgml:label="Creator"> <source rdf:resource="#n1"/> <target rdf:resource="#n2"/> </Edge> </rdf:RDF>
|
<?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/puninj/2001/05/rgml-schema#" xmlns:rgml="http://purl.org/puninj/2001/05/rgml-schema#"> <Graph rdf:ID="g1" rgml:directed="http://purl.org/puninj/2001/05/rgml-schema#true"> <graphs> <rdf:Bag> <rdf:li resource="#g2"/> <rdf:li resource="#g3"/> </rdf:Bag> </graphs> </Graph> <Graph rdf:ID="g2" rgml:directed="http://purl.org/puninj/2001/05/rgml-schema#true"> <nodes> <rdf:Bag> <rdf:li resource="#n1"/> <rdf:li resource="#n2"/> </rdf:Bag> </nodes> <edges> <rdf:Bag> <rdf:li resource="#e1"/> </rdf:Bag> </edges> </Graph> <Graph rdf:ID="g3" rgml:directed="http://purl.org/puninj/2001/05/rgml-schema#true"> <nodes> <rdf:Bag> <rdf:li resource="#n3"/> <rdf:li resource="#n4"/> </rdf:Bag> </nodes> <edges> <rdf:Bag> <rdf:li resource="#e2"/> </rdf:Bag> </edges> </Graph> <Node rdf:ID="n1"/> <Node rdf:ID="n2"/> <Node rdf:ID="n3"/> <Node rdf:ID="n4"/> <Edge rdf:ID="e1"> <source rdf:resource="#n1"/> <target rdf:resource="#n2"/> </Edge> <Edge rdf:ID="e2"> <source rdf:resource="#n3"/> <target rdf:resource="#n4"/> </Edge> </rdf:RDF>
|
<?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://purl.org/puninj/2001/05/rgml-schema#" xmlns:rgml="http://purl.org/puninj/2001/05/rgml-schema#" > <Graph rdf:ID="g1" rgml:directed="http://purl.org/puninj/2001/05/rgml-schema#true"> <nodes> <rdf:Bag> <rdf:li resource="#n1"/> <rdf:li resource="#n2"/> <rdf:li resource="#n3"/> </rdf:Bag> </nodes> <edges> <rdf:Bag> <rdf:li resource="#e1"/> <rdf:li resource="#e2"/> </rdf:Bag> </edges> </Graph> <Node rdf:ID="n1"/> <Node rdf:ID="n2"/> <Node rdf:ID="n3"/> <Edge rdf:ID="e1"> <source rdf:resource="#n1"/> <target rdf:resource="#n2"/> </Edge> <Edge rdf:ID="e2" rgml:directed="http://purl.org/puninj/2001/05/rgml-schema#false"> <source rdf:resource="#n2"/> <target rdf:resource="#n3"/> </Edge> </rdf:RDF>
<?xml version="1.0" ?> <!-- RDF Schema declaration for RDF Graph Modeling Language (RGML) 1.0 <http://purl.org/puninj/2001/05/rgml-schema#> John Punin (puninj@cs.rpi.edu) 05-26-2001 --> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:rgml="http://purl.org/puninj/2001/05/rgml-schema#"> <!-- Class Declarations --> <!-- Datatypes Class declaration --> <rdfs:Class rdf:ID="String" rdfs:label="String" rdfs:comment="Literals that are Strings"> <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> </rdfs:Class> <rdfs:Class rdf:ID="Integer" rdfs:label="Integer" rdfs:comment="Literals that are Integers"> <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> </rdfs:Class> <rdfs:Class rdf:ID="Boolean" rdfs:label="Boolean" rdfs:comment="Boolean Values: true and false"> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> </rdfs:Class> <rgml:Boolean rdf:ID="true"/> <rgml:Boolean rdf:ID="false"/> <!-- Graph Class declaration --> <rdfs:Class rdf:ID="Graph" rdfs:label="Graph" rdfs:comment="A Graph Description"> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> </rdfs:Class> <!-- Node Class declaration --> <rdfs:Class rdf:ID="Node" rdfs:label="Node" rdfs:comment="A Node Description"> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> </rdfs:Class> <!-- Edge Class declaration --> <rdfs:Class rdf:ID="Edge" rdfs:label="Edge" rdfs:comment="An Edge Description"> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> </rdfs:Class> <!-- Property declarations --> <!-- Global Properties --> <rdf:Property ID="label" rdfs:label="label" rdfs:comment="Text representation of the graph elements"> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Graph"/> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Node"/> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Edge"/> <rdfs:range rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#String"/> </rdf:Property> <!-- Graph Properties --> <rdf:Property ID="directed" rdfs:label="directed" rdfs:comment="Boolean value to indicate whether the Graph is directed or not"> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Graph"/> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Edge"/> <rdfs:range rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Boolean"/> </rdf:Property> <rdf:Property ID="nodes" rdfs:label="Nodes" rdfs:comment="List of the nodes belong to the graph"> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Graph"/> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Edge"/> <rdfs:range rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Resource"/> </rdf:Property> <rdf:Property ID="edges" rdfs:label="Edges" rdfs:comment="List of the edges belong to the graph"> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Graph"/> <rdfs:range rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag"/> </rdf:Property> <rdf:Property ID="graphs" rdfs:label="Subgraphs" rdfs:comment="List of subgraphs belong to the graph"> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Graph"/> <rdfs:range rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Bag"/> </rdf:Property> <!-- Node Properties --> <rdf:Property ID="weight" rdfs:label="weight" rdfs:comment="Value (usually numerical) to show the node or edge weight"> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Node"/> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Edge"/> <rdfs:range rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#String"/> </rdf:Property> <!-- Edge Properties --> <rdf:Property ID="source" rdfs:label="source" rdfs:comment="The rdf:ID the source node of the edge"> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Edge"/> <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/> </rdf:Property> <rdf:Property ID="target" rdfs:label="node" rdfs:comment="The rdf:ID of the target node of the edge"> <rdfs:isDefinedBy rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#"/> <rdfs:domain rdf:resource="http://purl.org/puninj/2001/05/rgml-schema#Edge"/> <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/> </rdf:Property> </rdf:RDF>
[RDF] O. Lassila and R. Swick. W3C, Resource Description Framework (RDF) Model and Syntax Specification http://www.w3.org/TR/REC-rdf-syntax, 1999
[RDFS] D. Brickley and R.V. Guha. W3C, Resource Description Framework (RDF) Schema Specification 1.0. http://www.w3.org/TR/rdf-schema/, 2000
[SVG] J. Ferraiolo. W3C, Scalable Vector Graphics (SVG) 1.0 Specification, http://www.w3.org/TR/SVG/, 2000
[WWWPAL] J. Punin, M. Krishnamoorthy. WWWPal System - A System for Analysis and Synthesis of Web Pages. In Proceedings of the WebNet 98 Conference, Orlando, November, 1998.
[XML] T. Bray, J. Paoli and C. M. Sperberg-McQueen, Extensible Markup Language (XML 1.0) - http://www.w3.org/TR/REC-xml, 2000
[XMLNS] T. Bray, D. Hollander and A. Layman. Namespaces in XML, http://www.w3.org/TR/REC-xml-names, 1999