org.gcube.portlets.user.codelistinterface.curation
Interface CurationServiceInterface


public interface CurationServiceInterface

Author:
"Federico De Faveri defaveri@isti.cnr.it"

Method Summary
 void cancelEditSession()
          Cancels the edit session, all modification will be lost.
 void closeEditSession()
          Closes the edit session.
 int countErrors(java.lang.String columnId, ColumnType columnType, java.lang.String referencedColumnId)
           
 int countErrors(java.lang.String columnId, ValueType valueType)
          Counts the number of errors for the specified column and the specified dimension.
 java.lang.String getCodeAsJson(int offset, int length, java.lang.String sortColumnId, Order order)
           
 java.util.List<CurationColumn> getColumns()
          Get the columns definitions for this Curation.
 CurationColumn getColumnUnderEdit()
          Returns the column currently under edit.
 CurationCreationState getCreationState()
           
 java.lang.String getDataAsJson(int offset, int length, java.lang.String sortColumnId, Order order)
          Gets the curation data in JSON format.
 EditSessionOpeningState getEditSessionOpeningState()
          Returns the EditSession opening state.
 long getErrorCount()
          Returns the number of error for this edit session.
 java.lang.String getId()
           
 boolean isEditSessionOpen()
           
 void modifyEntryId(long rowId, java.lang.String columnId, long id)
          Modifies an Id in the Curation.
 void modifyEntryValue(int rowId, java.lang.String columnId, java.lang.String value)
          Modifies a value in the Curation
 void openEditSession(java.lang.String columnId, ColumnType columnType)
           
 void openEditSession(java.lang.String columnId, ColumnType columnType, java.lang.String referencedCodeListId)
           
 void openEditSession(java.lang.String columnId, ColumnType columnType, ValueType valueType)
          Open a new edit session.
 void removeAllErrors()
          Removes all errors in the current edit session.
 void removeColumn(java.lang.String columnId)
          Removes the specified column.
 void setColumnLabel(java.lang.String columnId, java.lang.String label)
          Sets a column label.
 void setColumnType(java.lang.String columnId, ColumnType type)
          Sets the column type.
 void setColumnType(java.lang.String columnId, ColumnType columnType, java.lang.String referencedCodeListId)
           
 

Method Detail

getId

java.lang.String getId()

getColumns

java.util.List<CurationColumn> getColumns()
                                          throws java.lang.Exception
Get the columns definitions for this Curation.

Returns:
Throws:
java.lang.Exception

getDataAsJson

java.lang.String getDataAsJson(int offset,
                               int length,
                               java.lang.String sortColumnId,
                               Order order)
                               throws java.lang.Exception
Gets the curation data in JSON format.

Parameters:
offset -
length -
sortColumnId -
order -
showOnlyErrors -
Returns:
Throws:
java.lang.Exception

getCodeAsJson

java.lang.String getCodeAsJson(int offset,
                               int length,
                               java.lang.String sortColumnId,
                               Order order)
                               throws java.lang.Exception
Throws:
java.lang.Exception

getCreationState

CurationCreationState getCreationState()
                                       throws java.lang.Exception
Throws:
java.lang.Exception

removeColumn

void removeColumn(java.lang.String columnId)
                  throws java.lang.Exception
Removes the specified column.

Parameters:
columnId - the column id.
Throws:
java.lang.Exception

setColumnLabel

void setColumnLabel(java.lang.String columnId,
                    java.lang.String label)
                    throws java.lang.Exception
Sets a column label.

Parameters:
columnId - the column id.
label - the column label.
Throws:
java.lang.Exception

countErrors

int countErrors(java.lang.String columnId,
                ValueType valueType)
                throws java.lang.Exception
Counts the number of errors for the specified column and the specified dimension.

Parameters:
columnId -
keyFamilyId -
keyId -
Returns:
Throws:
java.lang.Exception

countErrors

int countErrors(java.lang.String columnId,
                ColumnType columnType,
                java.lang.String referencedColumnId)
                throws java.lang.Exception
Throws:
java.lang.Exception

setColumnType

void setColumnType(java.lang.String columnId,
                   ColumnType type)
                   throws java.lang.Exception
Sets the column type.

Parameters:
columnId -
type -
Throws:
java.lang.Exception

setColumnType

void setColumnType(java.lang.String columnId,
                   ColumnType columnType,
                   java.lang.String referencedCodeListId)
                   throws java.lang.Exception
Throws:
java.lang.Exception

openEditSession

void openEditSession(java.lang.String columnId,
                     ColumnType columnType,
                     ValueType valueType)
                     throws java.lang.Exception
Open a new edit session.

Parameters:
columnId - the column to edit.
keyFamilyId - the assigned family key.
keyId - the assigned key.
Throws:
java.lang.Exception

openEditSession

void openEditSession(java.lang.String columnId,
                     ColumnType columnType)
                     throws java.lang.Exception
Throws:
java.lang.Exception

openEditSession

void openEditSession(java.lang.String columnId,
                     ColumnType columnType,
                     java.lang.String referencedCodeListId)
                     throws java.lang.Exception
Throws:
java.lang.Exception

getEditSessionOpeningState

EditSessionOpeningState getEditSessionOpeningState()
                                                   throws java.lang.Exception
Returns the EditSession opening state.

Returns:
Throws:
java.lang.Exception

isEditSessionOpen

boolean isEditSessionOpen()
                          throws java.lang.Exception
Returns:
true if the curation is under edit mode, false otherwise.
Throws:
java.lang.Exception

getColumnUnderEdit

CurationColumn getColumnUnderEdit()
                                  throws java.lang.Exception
Returns the column currently under edit.

Returns:
Throws:
java.lang.Exception

getErrorCount

long getErrorCount()
                   throws java.lang.Exception
Returns the number of error for this edit session.

Returns:
Throws:
java.lang.Exception

removeAllErrors

void removeAllErrors()
                     throws java.lang.Exception
Removes all errors in the current edit session.

Throws:
java.lang.Exception

closeEditSession

void closeEditSession()
                      throws java.lang.Exception
Closes the edit session.

Throws:
java.lang.Exception

cancelEditSession

void cancelEditSession()
                       throws java.lang.Exception
Cancels the edit session, all modification will be lost.

Throws:
java.lang.Exception

modifyEntryValue

void modifyEntryValue(int rowId,
                      java.lang.String columnId,
                      java.lang.String value)
                      throws java.lang.Exception
Modifies a value in the Curation

Parameters:
rowId - the row number.
columnId - the column.
value - the new value
Throws:
java.lang.Exception

modifyEntryId

void modifyEntryId(long rowId,
                   java.lang.String columnId,
                   long id)
                   throws java.lang.Exception
Modifies an Id in the Curation.

Parameters:
rowId - the row number.
columnId - the column id.
id - the new id.
Throws:
java.lang.Exception