org.gcube.contentmanagement.codelistmanager.managers.handlers
Class HierarchicalCodeListHandler

java.lang.Object
  extended by org.gcube.contentmanagement.codelistmanager.managers.handlers.HierarchicalCodeListHandler
All Implemented Interfaces:
CodeListCurationHandler

public class HierarchicalCodeListHandler
extends Object
implements CodeListCurationHandler


Constructor Summary
HierarchicalCodeListHandler()
           
 
Method Summary
 boolean changeColumnDataType(String fieldId, org.gcube.common.dbinterface.types.Type type, org.gcube.common.dbinterface.tables.SimpleTable table, Hashtable<String,TableField> fieldLabelMapping)
           
 void changeColumnType(String fieldId, TableField.ColumnType columnType, org.gcube.common.dbinterface.tables.SimpleTable table, Hashtable<String,TableField> fieldLabelMapping, String... relatedCLId)
           
 Integer[] checkInvalidValues(String fieldId, ColumnReference columnReference, org.gcube.common.dbinterface.tables.SimpleTable table, Hashtable<String,TableField> fieldLabelMapping)
           
 Integer[] checkInvalidValues(String fieldId, org.gcube.common.dbinterface.types.Type type, org.gcube.common.dbinterface.tables.SimpleTable table, Hashtable<String,TableField> fieldLabelMapping)
           
 boolean checkRelationMatch(String fieldId, org.gcube.common.dbinterface.tables.SimpleTable table, Hashtable<String,TableField> fieldLabelMapping)
           
static HierarchicalCodeListHandler get()
           
 boolean isMappingFinished(org.gcube.common.dbinterface.tables.SimpleTable table, Hashtable<String,TableField> fieldLabelMapping)
           
 boolean replaceValue(String fieldId, String newValue, int rowId, org.gcube.common.dbinterface.tables.SimpleTable table, Hashtable<String,TableField> fieldLabelMapping)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HierarchicalCodeListHandler

public HierarchicalCodeListHandler()
Method Detail

get

public static HierarchicalCodeListHandler get()

checkInvalidValues

public Integer[] checkInvalidValues(String fieldId,
                                    ColumnReference columnReference,
                                    org.gcube.common.dbinterface.tables.SimpleTable table,
                                    Hashtable<String,TableField> fieldLabelMapping)
                             throws Exception
Specified by:
checkInvalidValues in interface CodeListCurationHandler
Throws:
Exception

checkInvalidValues

public Integer[] checkInvalidValues(String fieldId,
                                    org.gcube.common.dbinterface.types.Type type,
                                    org.gcube.common.dbinterface.tables.SimpleTable table,
                                    Hashtable<String,TableField> fieldLabelMapping)
                             throws Exception
Specified by:
checkInvalidValues in interface CodeListCurationHandler
Throws:
Exception

replaceValue

public boolean replaceValue(String fieldId,
                            String newValue,
                            int rowId,
                            org.gcube.common.dbinterface.tables.SimpleTable table,
                            Hashtable<String,TableField> fieldLabelMapping)
                     throws Exception
Specified by:
replaceValue in interface CodeListCurationHandler
Throws:
Exception

changeColumnType

public void changeColumnType(String fieldId,
                             TableField.ColumnType columnType,
                             org.gcube.common.dbinterface.tables.SimpleTable table,
                             Hashtable<String,TableField> fieldLabelMapping,
                             String... relatedCLId)
                      throws ColumnTypeNotSelectableException,
                             Exception
Specified by:
changeColumnType in interface CodeListCurationHandler
Parameters:
fieldId -
columnType -
Throws:
ParentNotSelectableException
ColumnTypeNotSelectableException
Exception

changeColumnDataType

public boolean changeColumnDataType(String fieldId,
                                    org.gcube.common.dbinterface.types.Type type,
                                    org.gcube.common.dbinterface.tables.SimpleTable table,
                                    Hashtable<String,TableField> fieldLabelMapping)
                             throws NullValuesOnCastException
Specified by:
changeColumnDataType in interface CodeListCurationHandler
Throws:
NullValuesOnCastException

checkRelationMatch

public boolean checkRelationMatch(String fieldId,
                                  org.gcube.common.dbinterface.tables.SimpleTable table,
                                  Hashtable<String,TableField> fieldLabelMapping)
Specified by:
checkRelationMatch in interface CodeListCurationHandler

isMappingFinished

public boolean isMappingFinished(org.gcube.common.dbinterface.tables.SimpleTable table,
                                 Hashtable<String,TableField> fieldLabelMapping)
Specified by:
isMappingFinished in interface CodeListCurationHandler


Copyright © 2014. All Rights Reserved.