|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.vivoweb.harvester.translate.XSLTranslator
public class XSLTranslator
Takes XML Files and uses an XSL file to translate the data into the desired ontology
| Field Summary | |
|---|---|
protected RecordHandler |
inStore
record handler for incoming records |
protected RecordHandler |
outStore
record handler for storing records |
| Constructor Summary | |
|---|---|
XSLTranslator(ArgList argumentList)
Constructor |
|
XSLTranslator(RecordHandler inRecordHandler,
RecordHandler outRecordHandler,
java.io.InputStream translationStream,
boolean force)
Constructor |
|
XSLTranslator(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)
Main method |
void |
setTranslation(java.io.File transFile)
Set translation file from a file |
void |
setTranslation(java.io.InputStream transFileStream)
Set translation file from an inputSteam |
static void |
xmlTranslate(java.io.InputStream inStream,
java.io.OutputStream outStream,
java.io.InputStream translationStream)
using the javax xml transform factory this method uses the xsl to translate XML into the desired format designated in the xsl. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected RecordHandler inStore
protected RecordHandler outStore
| Constructor Detail |
|---|
public XSLTranslator(java.lang.String[] args)
throws java.io.IOException
args - commandline arguments
java.io.IOException - error creating task
public XSLTranslator(ArgList argumentList)
throws java.io.IOException
argumentList - java.io.IOException - error reading files
public XSLTranslator(RecordHandler inRecordHandler,
RecordHandler outRecordHandler,
java.io.InputStream translationStream,
boolean force)
throws java.io.IOException
translationStream - the file that details the translation from the original xml to the target formatinRecordHandler - the files/records that require translationoutRecordHandler - the output record for the translated filesforce - translate all input records, even if previously processed
java.io.IOException - error reading files| Method Detail |
|---|
public void setTranslation(java.io.InputStream transFileStream)
throws java.io.IOException
transFileStream - valid type of translation file is xslt
java.io.IOException - error reading from stream
public void setTranslation(java.io.File transFile)
throws java.io.IOException
transFile - valid type of translation file is xslt
java.io.IOException - error reading from file
public void execute()
throws java.io.IOException
java.io.IOException - error processing
public static void xmlTranslate(java.io.InputStream inStream,
java.io.OutputStream outStream,
java.io.InputStream translationStream)
throws java.io.IOException
inStream - the input streamoutStream - the output streamtranslationStream - the stream for the xsl
java.io.IOException - error translatingpublic static void main(java.lang.String... args)
args - commandline arguments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||