com.agimatec.utility.fileimport.groovy
Class XmlImportProcessor

java.lang.Object
  extended by com.agimatec.utility.fileimport.ImporterProcessor
      extended by com.agimatec.utility.fileimport.groovy.XmlImportProcessor

public class XmlImportProcessor
extends ImporterProcessor

Description: Process a xml document with the groovy XmlSlurper.
User: roman.stumm
Date: 22.11.2007
Time: 11:56:33
Copyright: Agimatec GmbH


Field Summary
protected  Object current
          actually the current GPathResult, but could be any object *
protected  XmlSlurperSpec spec
           
protected  groovy.util.XmlSlurper xmlSlurper
           
 
Fields inherited from class com.agimatec.utility.fileimport.ImporterProcessor
cancelled, errorCount, importer, lastError, rowCount
 
Constructor Summary
XmlImportProcessor(XmlSlurperSpec spec, Importer importer)
           
 
Method Summary
 Object getCurrent()
           
 XmlSlurperSpec getSpec()
           
 groovy.util.XmlSlurper getXmlSlurper()
           
protected  void importEach()
           
 void importFrom(Closeable aReader)
          API - this method starts the import process.
 void release()
           
 
Methods inherited from class com.agimatec.utility.fileimport.ImporterProcessor
getErrorCount, getErrorWriter, getImporter, getLastError, getRowCount, handleException, handleRowException, isCancelled, log, logFinished, setCancelled, setErrorWriter, setLastError
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

spec

protected final XmlSlurperSpec spec

xmlSlurper

protected groovy.util.XmlSlurper xmlSlurper

current

protected Object current
actually the current GPathResult, but could be any object *

Constructor Detail

XmlImportProcessor

public XmlImportProcessor(XmlSlurperSpec spec,
                          Importer importer)
Method Detail

getSpec

public XmlSlurperSpec getSpec()
Specified by:
getSpec in class ImporterProcessor

importFrom

public void importFrom(Closeable aReader)
                throws ImporterException
API - this method starts the import process. It imports the data read from the given reader. The reader is closed afterwards.

Overrides:
importFrom in class ImporterProcessor
Parameters:
aReader - - reader to read the import data from.
Throws:
Exception
ImporterException

importEach

protected void importEach()
                   throws ImporterException
Throws:
ImporterException

release

public void release()
Overrides:
release in class ImporterProcessor

getCurrent

public Object getCurrent()

getXmlSlurper

public groovy.util.XmlSlurper getXmlSlurper()


Copyright © 2008-2011. All Rights Reserved.