org.vivoweb.harvester.translate
Class GlozeTranslator

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

public class GlozeTranslator
extends java.lang.Object

Gloze Tranlator This class translates XML into its own natural RDF ontology using the gloze library. Translation into the VIVO ontology is completed using the RDF Translator. TODO Stephen: Identify additional parameters required for translation TODO Stephen: Identify methods to invoke in the gloze library

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

Field Summary
protected  java.io.File incomingSchema
          The incoming schema to help gloze translate the xml file
protected  java.io.File incomingXMLFile
          the file to be translated FIXME Stephen: remove this and use the incoming stream
protected  RecordHandler inStore
          record handler for incoming records
protected  RecordHandler outStore
          record handler for storing records
protected  java.net.URI uriBase
          the uri base for relative nodes in the xml file
 
Constructor Summary
GlozeTranslator()
          Default Constructor
GlozeTranslator(ArgList argumentList)
           
GlozeTranslator(java.lang.String... args)
          Constructor
 
Method Summary
 void execute()
           
protected static ArgParser getParser()
          Get the ArgParser for this task
static void main(java.lang.String... args)
          Main Method
 void setIncomingSchema(java.io.File schema)
          Setter for schema
 void setIncomingXMLFile(java.io.File xmlFile)
          Setter for xmlFile
 void setURIBase(java.lang.String base)
          Setter for uriBase
 void translateFile()
          The main translation method for the gloze translation class setups up the necessary conditions for using the gloze library then executes its translation class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

incomingXMLFile

protected java.io.File incomingXMLFile
the file to be translated FIXME Stephen: remove this and use the incoming stream


incomingSchema

protected java.io.File incomingSchema
The incoming schema to help gloze translate the xml file


uriBase

protected java.net.URI uriBase
the uri base for relative nodes in the xml file


inStore

protected RecordHandler inStore
record handler for incoming records


outStore

protected RecordHandler outStore
record handler for storing records

Constructor Detail

GlozeTranslator

public GlozeTranslator()
Default Constructor


GlozeTranslator

public GlozeTranslator(java.lang.String... args)
                throws java.io.IOException
Constructor

Parameters:
args - commandline arguments
Throws:
java.io.IOException - error parsing options

GlozeTranslator

public GlozeTranslator(ArgList argumentList)
                throws java.io.IOException
Parameters:
argumentList -
  • inRecordHandler the incoming record handler when record handlers are due
  • schema the incoming schema for gloze translation
  • outRecordHandler the out record handler
  • uriBase required for gloze translation the unset URIBASE used is http://vivoweb.org/glozeTranslation/noURI/
Throws:
java.io.IOException - error connecting to record handlers
Method Detail

setIncomingXMLFile

public void setIncomingXMLFile(java.io.File xmlFile)
Setter for xmlFile

Parameters:
xmlFile - the file to translate

setIncomingSchema

public void setIncomingSchema(java.io.File schema)
Setter for schema

Parameters:
schema - the schema that gloze can use, but doesn't need to translate the xml

setURIBase

public void setURIBase(java.lang.String base)
Setter for uriBase

Parameters:
base - the base uri to apply to all relative entities

translateFile

public void translateFile()
The main translation method for the gloze translation class setups up the necessary conditions for using the gloze library then executes its translation class


execute

public void execute()

getParser

protected static ArgParser getParser()
Get the ArgParser for this task

Returns:
the ArgParser

main

public static void main(java.lang.String... args)
Main Method

Parameters:
args - list of arguments required to execute glozetranslate