org.gcube.contentmanagement.codelistmanager.managers
Class CodeListCuration
java.lang.Object
org.gcube.common.dbinterface.persistence.ObjectStateControl
org.gcube.contentmanagement.codelistmanager.managers.CodeListCuration
public class CodeListCuration
- extends org.gcube.common.dbinterface.persistence.ObjectStateControl
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
id
protected String id
labelFieldMapping
protected Hashtable<String,TableField> labelFieldMapping
agencyId
protected String agencyId
name
protected String name
description
protected String description
creationDate
protected Calendar creationDate
lastModifyDate
protected Calendar lastModifyDate
isFinal
protected boolean isFinal
version
protected float version
codelistType
protected CodeListType codelistType
codeListImportId
protected String codeListImportId
table
protected org.gcube.common.dbinterface.tables.SimpleTable table
CodeListCuration
public CodeListCuration()
CodeListCuration
public CodeListCuration(String name,
String description,
String agencyId,
boolean isFinal,
float version,
CodeListType type)
CodeListCuration
public CodeListCuration(String name,
String description,
String agencyId,
boolean isFinal,
float version)
getId
public String getId()
- Returns:
- the id
getHandler
protected CodeListCurationHandler getHandler()
getTable
public org.gcube.common.dbinterface.tables.SimpleTable getTable()
- Returns:
- the table
getCount
public int getCount()
- Returns:
- the count
updateCount
public void updateCount()
getVersion
public float getVersion()
- Returns:
- the version
setVersion
public void setVersion(float version)
- Parameters:
version - the version to set
setAgencyId
public void setAgencyId(String agencyId)
- Parameters:
agencyId - the agencyId to set
setFinal
public void setFinal(boolean isFinal)
- Parameters:
isFinal - the isFinal to set
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
getCodeListImportId
public String getCodeListImportId()
- Returns:
- the codeListImportId
getCreationDate
public Calendar getCreationDate()
- Returns:
- the creationDate
getLastModifyDate
public Calendar getLastModifyDate()
- Returns:
- the lastModified
getAgencyId
public String getAgencyId()
- Returns:
- the agencyId
getLabelFieldMapping
public Hashtable<String,TableField> getLabelFieldMapping()
- Returns:
- the labelFieldMapping
setLabelFieldMapping
public void setLabelFieldMapping(Hashtable<String,TableField> labelFieldMapping)
- Parameters:
labelFieldMapping - the labelFieldMapping to set
getTableName
public String getTableName()
- Returns:
- the tableName
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
start
public boolean start(CodeListImport importManager)
- Parameters:
importManager - parent - fieldsMask -
- Returns:
getFieldsIdByColumnType
public List<String> getFieldsIdByColumnType(TableField.ColumnType columnType)
removeColumn
public boolean removeColumn(String fieldId)
- Parameters:
fieldId -
- Returns:
removeRows
public boolean removeRows(int... rowsId)
- Parameters:
rowsId -
- Returns:
getData
public Iterator<List<String>> getData()
throws Exception
- Returns:
-
- Throws:
Exception
getRowsData
public Iterator<List<String>> getRowsData(Integer... rowsIds)
throws Exception
- Parameters:
rowsIds -
- Returns:
-
- Throws:
Exception
store
public boolean store()
remove
public boolean remove()
- Returns:
isMappingFinished
public boolean isMappingFinished()
- Returns:
getAll
public static Iterator<CodeListCuration> getAll()
throws Exception
- Returns:
-
- Throws:
Exception
get
public static CodeListCuration get(String id)
throws Exception
- Parameters:
id -
- Returns:
-
- Throws:
Exception
destroy
public static void destroy(String id)
throws Exception
- Parameters:
id -
- Throws:
Exception
changeColumnType
public void changeColumnType(String fieldId,
TableField.ColumnType columnType,
String... codelistReferenceId)
throws Exception
- Throws:
Exception
getInvalidRows
public Integer[] getInvalidRows(String fieldId,
ColumnReference columnDefinition)
throws Exception
- Throws:
Exception
getInvalidRows
public Integer[] getInvalidRows(String fieldId,
org.gcube.common.dbinterface.types.Type type)
throws Exception
- Throws:
Exception
replaceValue
public void replaceValue(String fieldId,
String newValue,
int row)
throws Exception
- Throws:
Exception
Copyright © 2014. All Rights Reserved.