Class XmlDataLoaderTask


  • public class XmlDataLoaderTask
    extends org.apache.tools.ant.Task
    Uses an IntegrationWriter to load data from XML format
    Author:
    Richard Smith, Andrew Varley, Matthew Wakeling
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String file  
      protected org.apache.tools.ant.types.FileSet fileSet  
      protected boolean ignoreDuplicates  
      protected java.lang.String integrationWriter  
      protected java.lang.String sourceName  
      protected java.lang.String xmlRes  
      • Fields inherited from class org.apache.tools.ant.Task

        description, location, target, taskName, taskType, wrapper
      • Fields inherited from class org.apache.tools.ant.ProjectComponent

        project
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addFileSet​(org.apache.tools.ant.types.FileSet fileSet)
      Set the data fileset
      void execute()
      void setFile​(java.lang.String file)
      Set a file name to load from
      void setIgnoreDuplicates​(boolean ignoreDuplicates)
      Set the value of ignoreDuplicates for the IntegrationWriter
      void setIntegrationWriter​(java.lang.String integrationWriter)
      Set the IntegrationWriter.
      void setSourceName​(java.lang.String sourceName)
      Set the source name, as used by primary key priority config.
      void setSourceType​(java.lang.String sourceType)
      Set the source type, as used by primary key priority config.
      void setXmlResource​(java.lang.String xmlRes)
      Set XML resource name (to load data from classloader).
      • Methods inherited from class org.apache.tools.ant.Task

        getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
      • Methods inherited from class org.apache.tools.ant.ProjectComponent

        getProject, setProject
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • integrationWriter

        protected java.lang.String integrationWriter
      • fileSet

        protected org.apache.tools.ant.types.FileSet fileSet
      • sourceName

        protected java.lang.String sourceName
      • ignoreDuplicates

        protected boolean ignoreDuplicates
      • file

        protected java.lang.String file
      • xmlRes

        protected java.lang.String xmlRes
    • Constructor Detail

      • XmlDataLoaderTask

        public XmlDataLoaderTask()
    • Method Detail

      • setIntegrationWriter

        public void setIntegrationWriter​(java.lang.String integrationWriter)
        Set the IntegrationWriter.
        Parameters:
        integrationWriter - the name of the IntegrationWriter
      • addFileSet

        public void addFileSet​(org.apache.tools.ant.types.FileSet fileSet)
        Set the data fileset
        Parameters:
        fileSet - the fileset
      • setFile

        public void setFile​(java.lang.String file)
        Set a file name to load from
        Parameters:
        file - name of file to load
      • setXmlResource

        public void setXmlResource​(java.lang.String xmlRes)
        Set XML resource name (to load data from classloader).
        Parameters:
        xmlRes - classloader resource name
      • setSourceName

        public void setSourceName​(java.lang.String sourceName)
        Set the source name, as used by primary key priority config.
        Parameters:
        sourceName - the name of the data source
      • setSourceType

        public void setSourceType​(java.lang.String sourceType)
        Set the source type, as used by primary key priority config.
        Parameters:
        sourceType - the type of the data source
      • setIgnoreDuplicates

        public void setIgnoreDuplicates​(boolean ignoreDuplicates)
        Set the value of ignoreDuplicates for the IntegrationWriter
        Parameters:
        ignoreDuplicates - the value of ignoreDuplicates
      • execute

        public void execute()
        Overrides:
        execute in class org.apache.tools.ant.Task
        Throws:
        org.apache.tools.ant.BuildException - if build fails