org.kuali.common.impex.data.impl
Class MpxLocationSupplier

java.lang.Object
  extended by AbstractSupplier
      extended by org.kuali.common.impex.data.impl.MpxLocationSupplier

public class MpxLocationSupplier
extends AbstractSupplier

This class provides an implementation of the SqlSupplier interface using an Mpx resource as the data source

Author:
andrewlubbers

Field Summary
static String DEFAULT_MPX_EXTENSION
           
protected  MpxHeaderData headerData
           
protected  BufferedReader reader
           
protected  Table table
           
static String UTF8
           
 
Constructor Summary
MpxLocationSupplier()
           
 
Method Summary
 void close()
           
 void fillInMetaData()
           
 String getEncoding()
           
 String getExtension()
           
protected  MpxHeaderData getHeader(BufferedReader reader)
          Parses the next line in the given reader and returns a MpxHeaderData built from header information This method assumes the given reader is at the beginning of an mpx file
 String getLocation()
           
 SqlProducer getProducer()
           
protected  String getResourceLocation()
           
 Schema getSchema()
           
 List<String> getSql()
           
protected  Table getTable()
           
 void open()
           
 void setEncoding(String encoding)
           
 void setExtension(String extension)
           
 void setLocation(String location)
           
 void setProducer(SqlProducer producer)
           
 void setSchema(Schema schema)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_MPX_EXTENSION

public static final String DEFAULT_MPX_EXTENSION
See Also:
Constant Field Values

UTF8

public static final String UTF8
See Also:
Constant Field Values

reader

protected BufferedReader reader

table

protected Table table

headerData

protected MpxHeaderData headerData
Constructor Detail

MpxLocationSupplier

public MpxLocationSupplier()
Method Detail

open

public void open()
          throws IOException
Throws:
IOException

getResourceLocation

protected String getResourceLocation()

getSql

public List<String> getSql()
                    throws IOException
Throws:
IOException

close

public void close()

getTable

protected Table getTable()

fillInMetaData

public void fillInMetaData()

getHeader

protected MpxHeaderData getHeader(BufferedReader reader)
                           throws IOException
Parses the next line in the given reader and returns a MpxHeaderData built from header information This method assumes the given reader is at the beginning of an mpx file

Parameters:
reader - the mpx file reader
Returns:
the next parsed header data
Throws:
IllegalArgumentException - when the next non-blank line from the reader is not a header line IOException if a read error is thrown from the reader
IOException

getEncoding

public String getEncoding()

setEncoding

public void setEncoding(String encoding)

getLocation

public String getLocation()

setLocation

public void setLocation(String location)

getProducer

public SqlProducer getProducer()

setProducer

public void setProducer(SqlProducer producer)

getExtension

public String getExtension()

setExtension

public void setExtension(String extension)

getSchema

public Schema getSchema()

setSchema

public void setSchema(Schema schema)


Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.