de.fuberlin.wiwiss.d2rq.map
Class Mapping

java.lang.Object
  extended by de.fuberlin.wiwiss.d2rq.map.Mapping

public class Mapping
extends Object

A D2RQ mapping. Consists of ClassMaps, PropertyBridges, and several other classes. TODO: Add getters to everything TODO: Move TripleRelation/NodeMaker building and ConnectedDB to a separate class (MappingRunner?)

Author:
Richard Cyganiak (richard@cyganiak.de)

Constructor Summary
Mapping()
           
Mapping(String mappingURI)
           
 
Method Summary
 void addClassMap(ClassMap classMap)
           
 void addDatabase(Database database)
           
 void addDownloadMap(DownloadMap downloadMap)
           
 void addTranslationTable(TranslationTable table)
           
 void buildVocabularyModel()
          Loads labels, comments and additional properties for referenced classes and properties and infers types Must be called after all classes and property bridges are loaded
 ClassMap classMap(Resource name)
           
 Collection<Resource> classMapResources()
           
 void close()
           
 Collection<TripleRelation> compiledPropertyBridges()
           
 Configuration configuration()
           
 void connect()
          Connects all databases.
 Database database(Resource name)
           
 Collection<Database> databases()
           
 DownloadMap downloadMap(Resource name)
           
 Collection<Resource> downloadMapResources()
           
 PrefixMapping getPrefixMapping()
           
 Model getVocabularyModel()
           
 Resource resource()
           
 void setConfiguration(Configuration configuration)
           
 TranslationTable translationTable(Resource name)
           
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Mapping

public Mapping()

Mapping

public Mapping(String mappingURI)
Method Detail

resource

public Resource resource()

getVocabularyModel

public Model getVocabularyModel()

validate

public void validate()
              throws D2RQException
Throws:
D2RQException

connect

public void connect()
Connects all databases. This is done automatically if needed. The method can be used to test the connections earlier.

Throws:
D2RQException - on connection failure

close

public void close()

addDatabase

public void addDatabase(Database database)

databases

public Collection<Database> databases()

database

public Database database(Resource name)

configuration

public Configuration configuration()

setConfiguration

public void setConfiguration(Configuration configuration)

addClassMap

public void addClassMap(ClassMap classMap)

classMapResources

public Collection<Resource> classMapResources()

classMap

public ClassMap classMap(Resource name)

addTranslationTable

public void addTranslationTable(TranslationTable table)

translationTable

public TranslationTable translationTable(Resource name)

addDownloadMap

public void addDownloadMap(DownloadMap downloadMap)

downloadMapResources

public Collection<Resource> downloadMapResources()

downloadMap

public DownloadMap downloadMap(Resource name)

compiledPropertyBridges

public Collection<TripleRelation> compiledPropertyBridges()
Returns:
A collection of TripleRelations corresponding to each of the property bridges

getPrefixMapping

public PrefixMapping getPrefixMapping()

buildVocabularyModel

public void buildVocabularyModel()
Loads labels, comments and additional properties for referenced classes and properties and infers types Must be called after all classes and property bridges are loaded