org.gcube.contentmanagement.codelistmanager.managers
Class CodeListImport

java.lang.Object
  extended by org.gcube.common.dbinterface.persistence.ObjectStateControl
      extended by org.gcube.contentmanagement.codelistmanager.managers.CodeListImport

public class CodeListImport
extends org.gcube.common.dbinterface.persistence.ObjectStateControl


Nested Class Summary
static class CodeListImport.Status
           
 
Constructor Summary
CodeListImport()
           
 
Method Summary
static CodeListImport get(String id)
           
 String getAgencyId()
           
static Iterator<CodeListImport> getAll()
           
 CodeListType getCodelistType()
           
 String getDescription()
           
 Hashtable<String,TableField> getFieldsName()
           
 String getId()
           
 Calendar getLastUpdate()
           
 String getName()
           
 int getProgress()
           
 CodeListImport.Status getStatus()
           
 List<org.gcube.common.dbinterface.ColumnDefinition> getTableDefinition()
           
 String getTableName()
           
 int getTotalLines()
           
 float getVersion()
           
 boolean importCSV(File file, String encoding, boolean hasHeader, char delimiter, boolean deleteFileWhenFinished)
           
 boolean importSDMX(File file)
           
 boolean importSDMX(URI uri)
           
 boolean isFinal()
           
 boolean isFromSDMXImport()
           
 boolean remove()
           
 void setAgencyId(String agencyId)
           
 void setCodelistType(CodeListType codelistType)
           
 void setDescription(String description)
           
protected  void setFieldsName(Hashtable<String,TableField> tableFieldMapping)
           
 void setFinal(boolean isFinal)
           
 void setLastUpdate(Calendar lastUpdate)
           
 void setName(String name)
           
 void setStatus(CodeListImport.Status status)
           
protected  void setTableDefinition(List<org.gcube.common.dbinterface.ColumnDefinition> tableDefinition)
           
 void setVersion(float version)
           
 boolean store()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CodeListImport

public CodeListImport()
Method Detail

getTableName

public String getTableName()

getFieldsName

public Hashtable<String,TableField> getFieldsName()

getTableDefinition

public List<org.gcube.common.dbinterface.ColumnDefinition> getTableDefinition()

getId

public String getId()

getCodelistType

public CodeListType getCodelistType()
Returns:
the codelistType

setCodelistType

public void setCodelistType(CodeListType codelistType)
Parameters:
codelistType - the codelistType to set

isFinal

public boolean isFinal()
Returns:
the isFinal

setFinal

public void setFinal(boolean isFinal)
Parameters:
isFinal - the isFinal to set

getVersion

public float getVersion()
Returns:
the version

setVersion

public void setVersion(float version)
Parameters:
version - the version to set

getName

public String getName()
Returns:
the name

setName

public void setName(String name)
Parameters:
name - the name to set

getDescription

public String getDescription()
Returns:
the description

setDescription

public void setDescription(String description)
Parameters:
description - the description to set

getAgencyId

public String getAgencyId()
Returns:
the agencyId

setAgencyId

public void setAgencyId(String agencyId)
Parameters:
agencyId - the agencyId to set

getStatus

public CodeListImport.Status getStatus()
Returns:
the status

setStatus

public void setStatus(CodeListImport.Status status)
Parameters:
status - the status to set

getLastUpdate

public Calendar getLastUpdate()
Returns:
the lastUpdate

setLastUpdate

public void setLastUpdate(Calendar lastUpdate)
Parameters:
lastUpdate - the lastUpdate to set

setFieldsName

protected void setFieldsName(Hashtable<String,TableField> tableFieldMapping)

setTableDefinition

protected void setTableDefinition(List<org.gcube.common.dbinterface.ColumnDefinition> tableDefinition)

getTotalLines

public int getTotalLines()
Returns:
the totalLines

getProgress

public int getProgress()
Returns:
the progress

isFromSDMXImport

public boolean isFromSDMXImport()
Returns:

store

public boolean store()

importSDMX

public boolean importSDMX(URI uri)

importSDMX

public boolean importSDMX(File file)

importCSV

public boolean importCSV(File file,
                         String encoding,
                         boolean hasHeader,
                         char delimiter,
                         boolean deleteFileWhenFinished)

remove

public boolean remove()

get

public static CodeListImport get(String id)
                          throws Exception
Throws:
Exception

getAll

public static Iterator<CodeListImport> getAll()
                                       throws Exception
Throws:
Exception


Copyright © 2014. All Rights Reserved.