org.eaglei.datatools.etl.server
Class RdfMaker

java.lang.Object
  extended by org.eaglei.datatools.etl.server.RdfMaker

public class RdfMaker
extends java.lang.Object


Field Summary
static java.util.Map<java.lang.String,java.util.List<com.hp.hpl.jena.rdf.model.Resource>> stringToResourceMap
           
 
Constructor Summary
RdfMaker(org.eaglei.datatools.model.AnnotationFormModel anntModel, org.eaglei.model.jena.JenaEIInstanceFactory instanceFactory)
           
 
Method Summary
 java.util.Map<java.lang.String,ExcelAbstractions.ExcelTab> ExcelToCSV(java.io.InputStream excelInputStream)
          converts Excel into CSV TableModel
 java.util.Map<java.lang.String,com.hp.hpl.jena.rdf.model.Model> generateRDFGraph(java.util.Map<java.lang.String,ExcelAbstractions.ExcelTab> tableModelMap, java.util.Map<java.lang.String,java.io.InputStream> mapStreamMap)
          Generates RDGGraph by tableModel and mapStream and pushes into Repo
 int getCount()
           
 java.io.InputStream getInputStreamOfExcelFile(java.lang.String excelFolder, java.lang.String excelFile)
           
static RDFtoRepoService getRdftorepo()
           
 org.eaglei.security.Session getSession()
           
 boolean rdfToRepoByExcelStream(java.lang.String excelFolder, java.lang.String mapFolder)
          Get all files from the specified directory and call generateRDFGraph(which inturn generates the RDF and pushes into Repo)
 void setSession(org.eaglei.security.Session session)
           
 void updateInstanceIfAdditionalDatafound(java.lang.String instanceID, com.hp.hpl.jena.rdf.model.Model modelFromExcel, java.lang.String subjectExpression)
          converts Excel into CSV TableModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

stringToResourceMap

public static java.util.Map<java.lang.String,java.util.List<com.hp.hpl.jena.rdf.model.Resource>> stringToResourceMap
Constructor Detail

RdfMaker

public RdfMaker(org.eaglei.datatools.model.AnnotationFormModel anntModel,
                org.eaglei.model.jena.JenaEIInstanceFactory instanceFactory)
         throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

getCount

public int getCount()

getSession

public org.eaglei.security.Session getSession()

setSession

public final void setSession(org.eaglei.security.Session session)

rdfToRepoByExcelStream

public boolean rdfToRepoByExcelStream(java.lang.String excelFolder,
                                      java.lang.String mapFolder)
                               throws java.lang.Exception
Get all files from the specified directory and call generateRDFGraph(which inturn generates the RDF and pushes into Repo)

Throws:
java.lang.Exception

getInputStreamOfExcelFile

public java.io.InputStream getInputStreamOfExcelFile(java.lang.String excelFolder,
                                                     java.lang.String excelFile)
                                              throws java.io.FileNotFoundException
Throws:
java.io.FileNotFoundException

ExcelToCSV

public java.util.Map<java.lang.String,ExcelAbstractions.ExcelTab> ExcelToCSV(java.io.InputStream excelInputStream)
                                                                      throws org.apache.commons.configuration.ConfigurationException,
                                                                             java.io.IOException,
                                                                             java.text.ParseException
converts Excel into CSV TableModel

Parameters:
excelInputStream -
Returns:
Throws:
org.apache.commons.configuration.ConfigurationException
java.io.IOException
java.text.ParseException
java.lang.Exception

generateRDFGraph

public java.util.Map<java.lang.String,com.hp.hpl.jena.rdf.model.Model> generateRDFGraph(java.util.Map<java.lang.String,ExcelAbstractions.ExcelTab> tableModelMap,
                                                                                        java.util.Map<java.lang.String,java.io.InputStream> mapStreamMap)
                                                                                 throws java.io.IOException
Generates RDGGraph by tableModel and mapStream and pushes into Repo

Throws:
java.io.IOException
java.lang.Exception
java.lang.Exception

updateInstanceIfAdditionalDatafound

public void updateInstanceIfAdditionalDatafound(java.lang.String instanceID,
                                                com.hp.hpl.jena.rdf.model.Model modelFromExcel,
                                                java.lang.String subjectExpression)
                                         throws java.lang.Exception
converts Excel into CSV TableModel

Parameters:
excelInputStream -
Throws:
org.apache.commons.configuration.ConfigurationException
java.io.IOException
java.text.ParseException
java.lang.Exception

getRdftorepo

public static RDFtoRepoService getRdftorepo()
Returns:


Copyright © 2009-2011 Eagle-I. All Rights Reserved.