org.vivoweb.harvester.translate
Class SPARQLTranslator

java.lang.Object
  extended by org.vivoweb.harvester.translate.SPARQLTranslator

public class SPARQLTranslator
extends java.lang.Object

Takes XML Files and uses an XSL file to translate the data into the desired ontology

Author:
Stephen V. Williams swilliams@ctrip.ufl.edu

Field Summary
protected  JenaConnect inputJC
          in stream is the stream containing the file (xml) that we are going to translate
protected  JenaConnect outputJC
          out stream is the stream that the controller will be handling and were we will dump the translation
protected  RecordHandler outputRC
           
protected  java.io.File sparqlFile
           
 
Constructor Summary
SPARQLTranslator(ArgList argumentList)
          Constructor
SPARQLTranslator(java.lang.String[] args)
          Constructor
 
Method Summary
 void execute()
          checks again for the necessary file and makes sure that they exist
static void main(java.lang.String... args)
          Currently the main method accepts two methods of execution, file translation and record handler translation The main method actually passes its arg string to another method so that Translator can use this same method of execution
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

inputJC

protected JenaConnect inputJC
in stream is the stream containing the file (xml) that we are going to translate


outputJC

protected JenaConnect outputJC
out stream is the stream that the controller will be handling and were we will dump the translation


sparqlFile

protected java.io.File sparqlFile

outputRC

protected RecordHandler outputRC
Constructor Detail

SPARQLTranslator

public SPARQLTranslator(java.lang.String[] args)
                 throws java.io.IOException
Constructor

Parameters:
args - commandline arguments
Throws:
java.io.IOException - error creating task

SPARQLTranslator

public SPARQLTranslator(ArgList argumentList)
                 throws java.io.IOException
Constructor

Parameters:
argumentList -
  • translationFile the file that details the translation from the original xml to the target format
  • inRecordHandler the files/records that require translation
  • outRecordHandler the output record for the translated files
Throws:
java.io.IOException - error reading files
Method Detail

execute

public void execute()
             throws java.io.IOException
checks again for the necessary file and makes sure that they exist

Throws:
java.io.IOException - error accessing file stream

main

public static void main(java.lang.String... args)
Currently the main method accepts two methods of execution, file translation and record handler translation The main method actually passes its arg string to another method so that Translator can use this same method of execution

Parameters:
args - commandline arguments