public class MosaicEngine
extends java.lang.Object
com.buckosoft.PicMan.business.mosaic.engine
Modifier and Type | Class and Description |
---|---|
class |
MosaicEngine.ConfigItem
Support for runtime MosaicEngine configuration.
|
Modifier and Type | Field and Description |
---|---|
protected java.awt.image.BufferedImage |
bi |
protected java.util.HashMap<java.lang.String,java.lang.Object> |
buildParameters |
protected java.util.LinkedList<java.lang.String> |
configList
The names of the configured parameters, so we can pull them in a reasonable order for display.
|
protected java.util.HashMap<java.lang.String,MosaicEngine.ConfigItem> |
configMap
A hash of all of the configured parameters
|
protected DatabaseFacade |
dbf |
protected static boolean |
DEBUG |
protected JobLogEntry |
jobLogEntry |
protected java.util.Date |
lastMosaicUpdate |
protected Pic |
masterPic |
protected int |
mid |
protected Mosaic |
mosaic |
protected Set |
mosaicSet |
protected PicManFacade |
pmf |
protected int |
tileHeight |
Constructor and Description |
---|
MosaicEngine()
Default constructor
Base class constructor.
|
Modifier and Type | Method and Description |
---|---|
protected boolean |
_build() |
protected void |
addConfig(java.lang.String name,
java.lang.String description,
int type,
double value) |
protected void |
addConfig(java.lang.String name,
java.lang.String description,
int type,
int value) |
boolean |
build()
Build the Mosaic.
|
java.util.HashMap<java.lang.String,MosaicEngine.ConfigItem> |
getConfigMap()
A map of the available ConfigItems for an engine.
|
java.lang.String |
getDurationAsString()
Fetch how long this Engine has been running.
|
java.awt.image.BufferedImage |
getImage()
Fetch the image that we built / are building.
|
java.lang.String |
getInfo()
Get the engine's semi-static build info.
|
java.util.Date |
getLastMosaicUpdate() |
java.lang.String |
getMasterPicName()
Get the name of the master pic that we are building from.
|
java.lang.String |
getName()
Get the name of the Mosaic that we are building.
|
java.lang.String |
getOutputFileName()
Get the name of the output file that will be written.
|
java.lang.String |
getStatus()
Get the engine's build status.
|
int |
getTileHeight()
Get the Tile Height / thumbnail height to be used to build this Mosaic.
|
void |
outputMosaicFile(boolean makeBackup)
Write the built image to the jpg specified in outPic
|
void |
setDEBUG(boolean debugFlag)
Enable logger output on this module
|
protected void |
setLastMosaicUpdate() |
void |
setMosaic(Mosaic mosaic)
Set the Mosaic that we are going to build.
|
void |
setPicMan(PicManFacade pmf)
Set the reference to the PicMan API.
|
void |
setTileHeight(int tileHeight) |
protected static boolean DEBUG
protected PicManFacade pmf
protected DatabaseFacade dbf
protected Mosaic mosaic
protected Pic masterPic
protected int mid
protected java.awt.image.BufferedImage bi
protected int tileHeight
protected java.util.Date lastMosaicUpdate
protected Set mosaicSet
protected JobLogEntry jobLogEntry
protected java.util.HashMap<java.lang.String,MosaicEngine.ConfigItem> configMap
protected java.util.LinkedList<java.lang.String> configList
protected java.util.HashMap<java.lang.String,java.lang.Object> buildParameters
public MosaicEngine()
public void setPicMan(PicManFacade pmf)
pmf
- The PicManFacadepublic void setDEBUG(boolean debugFlag)
debugFlag
- true == turn on debugging.public java.util.Date getLastMosaicUpdate()
protected void setLastMosaicUpdate()
public int getTileHeight()
public void setTileHeight(int tileHeight)
tileHeight
- the tileHeight to setpublic java.awt.image.BufferedImage getImage()
public java.lang.String getName()
public java.lang.String getMasterPicName()
public java.lang.String getOutputFileName()
public java.lang.String getDurationAsString()
public void setMosaic(Mosaic mosaic)
mosaic
- The Mosaic parameters as specified by the User.public void outputMosaicFile(boolean makeBackup)
makeBackup
- Maintain a set of backups of the output mosaic.public boolean build() throws java.lang.Exception
java.lang.Exception
- Something went wrong.protected boolean _build() throws java.lang.Exception
java.lang.Exception
public java.lang.String getStatus()
public java.lang.String getInfo()
protected void addConfig(java.lang.String name, java.lang.String description, int type, int value)
protected void addConfig(java.lang.String name, java.lang.String description, int type, double value)
public java.util.HashMap<java.lang.String,MosaicEngine.ConfigItem> getConfigMap()