pt.ua.bioinformatics.coeus.data.connect
Class SQLFactory

java.lang.Object
  extended by pt.ua.bioinformatics.coeus.data.connect.SQLFactory
All Implemented Interfaces:
ResourceFactory

public class SQLFactory
extends java.lang.Object
implements ResourceFactory

Data factory for transforming SQL data into RDF items using generic Triplify.


Constructor Summary
SQLFactory(Resource r)
           
 
Method Summary
 Resource getRes()
           
 void read()
          Reads SQL data according to Resource information.
 boolean save()
          Updates the resource coeus:built property once the resource finished building.
 void setRes(Resource res)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLFactory

public SQLFactory(Resource r)
Method Detail

getRes

public Resource getRes()

setRes

public void setRes(Resource res)

read

public void read()
Reads SQL data according to Resource information.

Workflow

  1. Check if resource is starter/extends
  2. Load SQL resource from database to ResultSets
  3. Start Triplify with factory Resource
  4. Get data for Item key into Triplify
  5. Load data for each InheritedResource property into Triplify hashmap based on SQL columns
  6. Itemize single item

Specified by:
read in interface ResourceFactory

save

public boolean save()
Updates the resource coeus:built property once the resource finished building.

Specified by:
save in interface ResourceFactory
Returns:
success of the operation