Class MediaRow
- java.lang.Object
-
- mil.nga.geopackage.user.UserCoreRow<TColumn,TTable>
-
- mil.nga.geopackage.user.UserRow<UserCustomColumn,UserCustomTable>
-
- mil.nga.geopackage.user.custom.UserCustomRow
-
- mil.nga.geopackage.extension.related.media.MediaRow
-
- Direct Known Subclasses:
IconRow
public class MediaRow extends UserCustomRow
User Media Row containing the values from a single result set row- Since:
- 3.0.1
- Author:
- osbornb
-
-
Field Summary
-
Fields inherited from class mil.nga.geopackage.user.UserCoreRow
columns, columnTypes, table, values
-
-
Constructor Summary
Constructors Modifier Constructor Description MediaRow(MediaRow mediaRow)Copy ConstructorprotectedMediaRow(MediaTable table)Constructor to create an empty rowMediaRow(UserCustomRow userCustomRow)Constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MediaRowcopy()Copy the rowStringgetContentType()Get the content typeUserCustomColumngetContentTypeColumn()Get the content type columnintgetContentTypeColumnIndex()Get the content type column indexbyte[]getData()Get the dataUserCustomColumngetDataColumn()Get the data columnintgetDataColumnIndex()Get the data column indexBufferedImagegetDataImage()Get the data imagelonggetId()Get the idUserCustomColumngetIdColumn()Get the id columnintgetIdColumnIndex()Get the id column indexMediaTablegetTable()voidsetContentType(String contentType)Set the content typevoidsetData(byte[] data)Set the datavoidsetData(BufferedImage image, String imageFormat)Set the data from an imagevoidsetData(BufferedImage image, String imageFormat, Float quality)Set the data from an image with optional quality-
Methods inherited from class mil.nga.geopackage.user.custom.UserCustomRow
getColumns
-
Methods inherited from class mil.nga.geopackage.user.UserRow
columnToContentValue, toContentValues, toContentValues
-
Methods inherited from class mil.nga.geopackage.user.UserCoreRow
columnCount, copyValue, getAsMap, getColumn, getColumn, getColumnIndex, getColumnName, getColumnNames, getPkColumn, getPkColumnIndex, getRowColumnType, getRowColumnType, getRowColumnTypes, getValue, getValue, getValues, getValueString, getValueString, hasColumn, hasId, hasIdColumn, resetId, setId, setValue, setValue, validateValue
-
-
-
-
Constructor Detail
-
MediaRow
protected MediaRow(MediaTable table)
Constructor to create an empty row- Parameters:
table- media table
-
MediaRow
public MediaRow(UserCustomRow userCustomRow)
Constructor- Parameters:
userCustomRow- user custom row
-
MediaRow
public MediaRow(MediaRow mediaRow)
Copy Constructor- Parameters:
mediaRow- media row to copy
-
-
Method Detail
-
getTable
public MediaTable getTable()
- Overrides:
getTablein classUserCoreRow<UserCustomColumn,UserCustomTable>
-
getIdColumnIndex
public int getIdColumnIndex()
Get the id column index- Returns:
- id column index
-
getIdColumn
public UserCustomColumn getIdColumn()
Get the id column- Returns:
- id column
-
getId
public long getId()
Get the id- Overrides:
getIdin classUserCoreRow<UserCustomColumn,UserCustomTable>- Returns:
- id
-
getDataColumnIndex
public int getDataColumnIndex()
Get the data column index- Returns:
- data column index
-
getDataColumn
public UserCustomColumn getDataColumn()
Get the data column- Returns:
- data column
-
getData
public byte[] getData()
Get the data- Returns:
- data
-
setData
public void setData(byte[] data)
Set the data- Parameters:
data- data
-
getDataImage
public BufferedImage getDataImage() throws IOException
Get the data image- Returns:
- image
- Throws:
IOException- upon failure- Since:
- 3.2.0
-
setData
public void setData(BufferedImage image, String imageFormat) throws IOException
Set the data from an image- Parameters:
image- imageimageFormat- image format- Throws:
IOException- upon failure- Since:
- 3.2.0
-
setData
public void setData(BufferedImage image, String imageFormat, Float quality) throws IOException
Set the data from an image with optional quality- Parameters:
image- imageimageFormat- image formatquality- null or quality between 0.0 and 1.0- Throws:
IOException- upon failure- Since:
- 3.2.0
-
getContentTypeColumnIndex
public int getContentTypeColumnIndex()
Get the content type column index- Returns:
- content type column index
-
getContentTypeColumn
public UserCustomColumn getContentTypeColumn()
Get the content type column- Returns:
- content type column
-
getContentType
public String getContentType()
Get the content type- Returns:
- content type
-
setContentType
public void setContentType(String contentType)
Set the content type- Parameters:
contentType- content type
-
copy
public MediaRow copy()
Copy the row- Overrides:
copyin classUserCustomRow- Returns:
- row copy
-
-