Class GSWorksheet
- java.lang.Object
-
- org.eclipse.epsilon.emc.spreadsheets.SpreadsheetWorksheet
-
- org.eclipse.epsilon.emc.spreadsheets.google.GSWorksheet
-
public class GSWorksheet extends SpreadsheetWorksheet
-
-
Field Summary
-
Fields inherited from class org.eclipse.epsilon.emc.spreadsheets.SpreadsheetWorksheet
alias, dataTypeStrict, existsInSpreadsheet, header, name
-
-
Constructor Summary
Constructors Constructor Description GSWorksheet(GSModel model, com.google.gdata.data.spreadsheet.WorksheetEntry worksheetEntry, boolean existsInSpreadsheet)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SpreadsheetColumn
addColumn(ISpreadsheetMetadata.SpreadsheetColumnMetadata metadata)
Adds information about an existing header column to the worksheet.protected void
checkThatWorksheetExists()
This method checks if this worksheet exists in the spreadsheet.SpreadsheetColumn
createColumn(int columnIndex)
Creates a column with the specified column indexprotected void
createInSpreadsheet()
The purpose of this method is to create this worksheet in the spreadsheetvoid
delete()
Deletes this worksheet from the containing spreadsheet.int
getColumnOffset()
String
getDefaultEmptyCellValue()
This method returns the default value to be written to a cell when a new empty row is created in a worksheet that is not enforcing data type strictness.com.google.gdata.data.spreadsheet.ListEntry
getListEntry(GSRow row)
URL
getListFeedURL()
Returns the List Feed URL for working with this worksheet.int
getRowIndex(GSRow row)
List<SpreadsheetRow>
getRows()
Gets all rows contained by the worksheetvoid
getSelf()
protected SpreadsheetRow
insertRow(Map<SpreadsheetColumn,String> values)
Inserts a new row in the worksheet with given values in the given columns.protected void
loadHeader()
Loads header row information - index and name - from the spreadsheet if the worksheet exists in the spreadsheetvoid
removeRow(SpreadsheetRow row)
Deletes the given row from the actual worksheet.void
writeHeaderCell(int columnIndex, String columnName)
-
Methods inherited from class org.eclipse.epsilon.emc.spreadsheets.SpreadsheetWorksheet
addColumn, addRow, addRowWithValuesInColumns, addWorksheetMetadata, deleteRow, findRows, getAlias, getColumn, getColumn, getDoesNotExistInSpreadsheet, getExistsInSpreadsheet, getHeader, getModel, getName, getNonexistentWorksheetMessage, getValuesForEmptyRow, isDataTypeStrict, isIdentifiablyBy, toString
-
-
-
-
Method Detail
-
loadHeader
protected void loadHeader() throws EolModelLoadingException
Description copied from class:SpreadsheetWorksheet
Loads header row information - index and name - from the spreadsheet if the worksheet exists in the spreadsheet- Specified by:
loadHeader
in classSpreadsheetWorksheet
- Throws:
EolModelLoadingException
-
writeHeaderCell
public void writeHeaderCell(int columnIndex, String columnName) throws Exception
- Throws:
Exception
-
delete
public void delete() throws Exception
Deletes this worksheet from the containing spreadsheet.- Throws:
IOException
com.google.gdata.util.ServiceException
Exception
-
addColumn
public SpreadsheetColumn addColumn(ISpreadsheetMetadata.SpreadsheetColumnMetadata metadata)
Description copied from class:SpreadsheetWorksheet
Adds information about an existing header column to the worksheet. If the column described by the given metadata does not exist the column is created.- Overrides:
addColumn
in classSpreadsheetWorksheet
- Returns:
- SpreadsheetColumn
-
createColumn
public SpreadsheetColumn createColumn(int columnIndex)
Description copied from class:SpreadsheetWorksheet
Creates a column with the specified column index- Specified by:
createColumn
in classSpreadsheetWorksheet
- Returns:
- column
-
getRows
public List<SpreadsheetRow> getRows()
Description copied from class:SpreadsheetWorksheet
Gets all rows contained by the worksheet- Specified by:
getRows
in classSpreadsheetWorksheet
- Returns:
- List of rows
-
insertRow
protected SpreadsheetRow insertRow(Map<SpreadsheetColumn,String> values)
Description copied from class:SpreadsheetWorksheet
Inserts a new row in the worksheet with given values in the given columns.- Specified by:
insertRow
in classSpreadsheetWorksheet
- Returns:
- the newly created row
-
removeRow
public void removeRow(SpreadsheetRow row)
Description copied from class:SpreadsheetWorksheet
Deletes the given row from the actual worksheet.- Specified by:
removeRow
in classSpreadsheetWorksheet
-
checkThatWorksheetExists
protected void checkThatWorksheetExists()
Description copied from class:SpreadsheetWorksheet
This method checks if this worksheet exists in the spreadsheet.- Overrides:
checkThatWorksheetExists
in classSpreadsheetWorksheet
-
getDefaultEmptyCellValue
public String getDefaultEmptyCellValue()
Description copied from class:SpreadsheetWorksheet
This method returns the default value to be written to a cell when a new empty row is created in a worksheet that is not enforcing data type strictness.- Specified by:
getDefaultEmptyCellValue
in classSpreadsheetWorksheet
- Returns:
- String
-
getColumnOffset
public int getColumnOffset()
-
getListFeedURL
public URL getListFeedURL() throws IOException, com.google.gdata.util.ServiceException
Returns the List Feed URL for working with this worksheet.- Returns:
- URL
- Throws:
com.google.gdata.util.ServiceException
IOException
-
getRowIndex
public int getRowIndex(GSRow row)
-
getListEntry
public com.google.gdata.data.spreadsheet.ListEntry getListEntry(GSRow row) throws IOException, com.google.gdata.util.ServiceException
- Throws:
IOException
com.google.gdata.util.ServiceException
-
createInSpreadsheet
protected void createInSpreadsheet()
Description copied from class:SpreadsheetWorksheet
The purpose of this method is to create this worksheet in the spreadsheet- Specified by:
createInSpreadsheet
in classSpreadsheetWorksheet
-
-