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

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

public class SPARQLFactory
extends java.lang.Object
implements ResourceFactory

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


Constructor Summary
SPARQLFactory(Resource r)
           
 
Method Summary
 Resource getRes()
           
 void read()
          Reads SPARQL 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

SPARQLFactory

public SPARQLFactory(Resource r)
Method Detail

getRes

public Resource getRes()

setRes

public void setRes(Resource res)

read

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

Workflow

  1. Check if resource is starter/extends
  2. Load SPARQL resource into ResultSet
  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 SPARQL elements
  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