Warning:
This wiki has been archived and is now read-only.
An XML Schema for SQL-based RDB2RDF Mapping
From RDB2RDF
XML Schema for SQL-based Mapping
<?xml version="1.0" encoding="ISO-8859-1" ?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="DBKeyType"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="Primary"/> <xs:enumeration value="Unique"/> <xs:enumeration value="Reference"/> </xs:restriction> </xs:simpleType> </xs:element>
<xs:element name="RDFTermType"> <xs:simpleType> <xs:restriction base="xs:string"> <xs:enumeration value="IRI"/> <xs:enumeration value="bNode"/> <xs:enumeration value="Literal"/> </xs:restriction> </xs:simpleType> </xs:element>
<xs:element name="ClassMap"> <xs:complexType> <xs:attribute name="ClassName" type="xs:string"/> <xs:attribute name="GraphName" type="xs:string"/>
<xs:element name="SQLDefString" type="xs:string" use="required"/>
<xs:element name="InstURIPropertyMap" minOccurs="1" maxOccurs="1"> <xs:complexType> <xs:attribute name="DBColumnName" type="xs:string" use="required"/> <xs:attribute name="InverseExpr" type="xs:string"/> </xs:complexType> </xs:element>
<xs:element name="RDFTypeURIPropertyMap" minOccurs="0"> <xs:complexType> <xs:attribute name="RDFTypeURIPropertyName" type="xs:string" use="required"/> <xs:attribute name="DBColumnName" type="xs:string" use="required"/> <xs:attribute name="InverseExpr" type="xs:string"/> </xs:complexType> </xs:element>
<xs:element name="GraphURIPropertyMap" minOccurs="0"> <xs:complexType> <xs:attribute name="GraphURIPropertyName" type="xs:string" use="required"/> <xs:attribute name="DBColumnName" type="xs:string" use="required"/> <xs:attribute name="InverseExpr" type="xs:string"/> <xs:element name="PropertyInGraph" minOccurs="0"> <xs:complexType> <xs:attribute name="PropertyName" type="xs:string" use="required"/> </xs:complexType> </xs:element> </xs:complexType> </xs:element>
<xs:element name="PropertyMap" minOccurs="0"> <xs:complexType> <xs:attribute name="PropertyName" type="xs:string" use="required"/> <xs:attribute name="DBColumnName" type="xs:string" use="required"/> <xs:attribute name="RDFTerm" type="RDFTermType"/> <xs:attribute name="InverseExpr" type="xs:string"/> </xs:complexType> </xs:element>
<xs:element name="KeyMap"> <xs:complexType> <xs:attribute name="KeyName" type="xs:string" use="required"/> <xs:attribute name="KeyType" type="DBKeyType" use="required"/> <xs:attribute name="RefKeyName" type="xs:string"/> <xs:element name="KeyDef" minOccurs="1"> <xs:complexType> <xs:element name="PropertyName" minOccurs="1"> <xs:complexType> <xs:attribute name="name" type="xs:string" use="required"/> </xs:complexType> </xs:complexType> </xs:element> </xs:complexType> </xs:element>
</xs:complexType> </xs:element>
</xs:schema>