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

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

public class XMLFactory
extends java.lang.Object
implements ResourceFactory

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


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

XMLFactory

public XMLFactory(Resource r)
Method Detail

getRes

public Resource getRes()

setRes

public void setRes(Resource res)

read

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

Workflow

  1. Check if resource is starter/extends
  2. Load XML resource into URL and Document
  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 XPath queries
  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