<?xml version="1.0"?>
<d2r:Map xmlns:d2r="http://www.wiwiss.fu-berlin.de/suhl/bizer/D2RMap/0.1#" d2r:versionInfo="$Id: iswcMap.d2r,xml, v 0.1 2003/01/15 19:44:09 Chris Exp $">
	<d2r:ProcessorMessage d2r:outputFormat="RDF/XML"/>
	<d2r:DBConnection d2r:odbcDSN="IswcDB"/>
	<d2r:Namespace d2r:prefix="iswc" d2r:namespace="http://annotation.semanticweb.org/iswc/iswc.daml#"/>
	<d2r:Namespace d2r:prefix="owl" d2r:namespace="http://www.w3.org/2002/07/owl#"/>
	<d2r:Namespace d2r:prefix="rdf" d2r:namespace="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
	<!-- Conferences -->
	<d2r:ClassMap d2r:type="iswc:Conference" d2r:sql="SELECT * FROM Conferences" d2r:groupBy="Conferences.ConfID" d2r:uriPattern="http://conferences.org/comp/confno@@Conferences.ConfID@@">
		<d2r:ObjectPropertyBridge d2r:property="owl:sameIndividualAs" d2r:column="Conferences.URI"/>
		<d2r:DatatypePropertyBridge d2r:property="iswc:eventTitle" d2r:column="Conferences.Name" xml:lang="en"/>
		<d2r:DatatypePropertyBridge d2r:property="iswc:location" d2r:column="Conferences.Location" xml:lang="en"/>
		<d2r:DatatypePropertyBridge d2r:property="iswc:date" d2r:column="Conferences.Date"/>
		<d2r:ObjectPropertyBridge d2r:property="rdf:seeAlso" d2r:value="http://annotation.semanticweb.org/iswc/iswc.daml"/>
	</d2r:ClassMap>
	<!-- Topics (Topics are bNodes) -->
	<d2r:ClassMap d2r:type="iswc:Topic" d2r:sql="SELECT Topics.TopicID, Topics.TopicName FROM Topics;" d2r:groupBy="Topics.TopicID">
		<d2r:DatatypePropertyBridge d2r:property="iswc:name" d2r:column="Topics.TopicName" xml:lang="en"/>
	</d2r:ClassMap>
	<!-- Papers -->
	<d2r:ClassMap d2r:type="iswc:InProceedings" d2r:sql="SELECT Papers.PaperID, Papers.Title, Papers.Abstract, Papers.URI, Papers.Year, Papers.Conference, Rel_Person_Paper.PersonID, Rel_Paper_Topic.TopicID FROM  (Papers INNER JOIN Rel_Person_Paper ON Papers.PaperID = Rel_Person_Paper.PaperID) INNER JOIN Rel_Paper_Topic ON Papers.PaperID = Rel_Paper_Topic.PaperID" 
	       d2r:groupBy="Papers.PaperID" d2r:uriColumn="Papers.URI">
		<d2r:DatatypePropertyBridge d2r:property="iswc:title" d2r:pattern="Titel: @@Papers.Title@@" xml:lang="en"/>
		<d2r:DatatypePropertyBridge d2r:property="iswc:abstract" d2r:column="Papers.Abstract" xml:lang="en"/>
		<d2r:DatatypePropertyBridge d2r:property="iswc:year" d2r:column="Papers.Year"/>
		<d2r:ObjectPropertyBridge d2r:property="iswc:conference" d2r:referredClass="iswc:Conference" d2r:referredGroupBy="Papers.Conference"/>
		<d2r:ObjectPropertyBridge d2r:property="iswc:author" d2r:referredClass="PersonsGroupMap" d2r:referredGroupBy="Rel_Person_Paper.PersonID" />
		<d2r:ObjectPropertyBridge d2r:property="iswc:topic" d2r:referredClass="iswc:Topic" d2r:referredGroupBy="Rel_Paper_Topic.TopicID" />
		<d2r:ObjectPropertyBridge d2r:property="rdf:seeAlso" d2r:value="http://annotation.semanticweb.org/iswc/iswc.daml"/>
	</d2r:ClassMap>
	<!-- Employee, Researcher, Full_Professor, PhDStudent -->
	<d2r:ClassMap d2r:id="PersonsGroupMap" d2r:sql="SELECT Persons.PerID, Rel_Person_Topic.TopicID, Rel_Person_Paper.PaperID, Persons.FirstName, Persons.LastName, Persons.Address, Persons.Email, Persons.Homepage, Persons.Phone, Persons.URI, Persons.Photo, Persons.Type FROM (Persons INNER JOIN Rel_Person_Topic ON Persons.PerID = Rel_Person_Topic.PersonID) INNER JOIN Rel_Person_Paper ON Persons.PerID = Rel_Person_Paper.PersonID;" 
	       d2r:groupBy="Persons.PerID " d2r:uriColumn="Persons.URI">
		<d2r:ObjectPropertyBridge d2r:property="rdf:type" d2r:column="Persons.Type" d2r:translate="PersonType2Class"/>
		<d2r:DatatypePropertyBridge d2r:property="iswc:first_Name" d2r:column="Persons.FirstName"/>
		<d2r:DatatypePropertyBridge d2r:property="iswc:last_Name" d2r:column="Persons.LastName"/>
		<d2r:DatatypePropertyBridge d2r:property="iswc:address" d2r:column="Persons.Address"/>
		<d2r:ObjectPropertyBridge d2r:property="iswc:email" d2r:column="Persons.Email"/>
		<d2r:ObjectPropertyBridge d2r:property="iswc:homepage" d2r:column="Persons.Homepage"/>
		<d2r:DatatypePropertyBridge d2r:property="iswc:phone" d2r:column="Persons.Phone"/>
		<d2r:ObjectPropertyBridge d2r:property="iswc:photo" d2r:column="Persons.Photo"/>
		<d2r:ObjectPropertyBridge d2r:property="iswc:research_topics" d2r:referredClass="iswc:Topic" d2r:referredGroupBy="Rel_Person_Topic.TopicID" />
		<d2r:ObjectPropertyBridge d2r:property="iswc:autor_of" d2r:referredClass="iswc:InProceedings" d2r:referredGroupBy="Rel_Person_Paper.PaperID" />
	</d2r:ClassMap>
	<!-- Translation Table: Persons.Type to iswc:Class -->
	<d2r:TranslationTable d2r:id="PersonType2Class">
		<d2r:Translation d2r:key="Professor" d2r:value="iswc:Full_Professor"/>
		<d2r:Translation d2r:key="Angestellter" d2r:value="iswc:Employee"/>
		<d2r:Translation d2r:key="Wimi" d2r:value="iswc:Researcher"/>
		<d2r:Translation d2r:key="Wimi2" d2r:value="iswc:PhdStudent"/>
	</d2r:TranslationTable>
	<!-- D2R GroupMap: Organization, University, Institut, Department -->
	<d2r:ClassMap d2r:id="OrganizationsGroupMap" d2r:sql="SELECT Organizations.*, Rel_Person_Organization.PersonID FROM Organizations INNER JOIN Rel_Person_Organization ON Organizations.OrgID = Rel_Person_Organization.OrganizationID;" 
	       d2r:groupBy="Organizations.OrgID" d2r:uriColumn="Organizations.URI">
		<d2r:ObjectPropertyBridge d2r:property="rdf:type" d2r:pattern="iswc:@@Organizations.Type@@"/>
		<d2r:DatatypePropertyBridge d2r:property="iswc:name" d2r:column="Organizations.Name"/>
		<d2r:DatatypePropertyBridge d2r:property="iswc:address" d2r:column="Organizations.Address"/>
		<d2r:DatatypePropertyBridge d2r:property="iswc:location" d2r:column="Organizations.Location"/>
		<d2r:DatatypePropertyBridge d2r:property="iswc:country" d2r:column="Organizations.Country"/>
		<d2r:ObjectPropertyBridge d2r:property="iswc:homepage" d2r:column="Organizations.Homepage"/>
		<d2r:ObjectPropertyBridge d2r:property="iswc:has_affiliate" d2r:referredClass="PersonsGroupMap" d2r:referredGroupBy="Rel_Person_Organization.PersonID" />
	</d2r:ClassMap>
</d2r:Map>

