|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.jhu.ece.iacl.jist.pipeline.PipePort<T> edu.jhu.ece.iacl.jist.pipeline.parameter.ParamModel<T>
public abstract class ParamModel<T>
Generic Parameter with a bridge to interface with methods in the parameter getFactory(). The parameter factory is not serialized when exporting the parameter to XML
Nested Class Summary |
---|
Nested classes/interfaces inherited from class edu.jhu.ece.iacl.jist.pipeline.PipePort |
---|
PipePort.PortListener, PipePort.type |
Field Summary | |
---|---|
protected java.lang.String |
cliTag
|
protected java.lang.String |
description
Description of parameter. |
protected ParamFactory |
factory
The factory. |
protected boolean |
hidden
The hidden. |
protected java.lang.String |
label
The label. |
protected boolean |
loadAndSaveOnValidate
Should the parameter be validated on load. |
protected boolean |
mandatory
The mandatory. |
protected java.lang.String |
shortLabel
The shortLabel --- "command line flag" |
Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.PipePort |
---|
connectible, gport, incomingConnectors, listeners, maxIncoming, maxOutgoing, outgoingConnectors, owner, portType, useWire |
Constructor Summary | |
---|---|
ParamModel()
Default constructor. |
Method Summary | |
---|---|
void |
clean()
Clean resources that maybe out-of-date with the system |
abstract ParamModel<T> |
clone()
Clone parameter. |
int |
compareTo(ParamModel mod)
Compare specificity of parameters. |
void |
createMipavParameter(AlgorithmParameters scriptParams)
Create MIPAV parameter that represents this parameter. |
javax.swing.tree.MutableTreeNode |
createTreeNode()
Create tree node that represents this parameter. |
void |
dispose()
Release as much memory as possible from this object without setting the entire object to null. |
boolean |
equals(ParamModel<T> model)
|
java.lang.String |
getCliTag()
|
java.lang.String |
getDescription()
Get port description. |
ParamFactory |
getFactory()
Get parameter factory. |
abstract java.lang.String |
getHumanReadableDataType()
|
ParamInputView |
getInputView()
Get the input view to specify the parameter value. |
java.lang.String |
getLabel()
Get the text label for this parameter. |
java.lang.String |
getName()
Get the parameter's name, which should be unique. |
ParamOutputView |
getOutputView()
Get the output view to specify the output parameter. |
java.lang.String |
getShortLabel()
Get the short text label for this parameter. |
abstract T |
getValue()
Get the value stored in the parameter. |
javax.swing.JPanel |
getView()
Get panel that represents this parameter, depending on whether it is an input or output parameter. |
abstract java.lang.String |
getXMLValue()
|
void |
hide()
Hide this parameter. |
void |
importMipavParameter(ParameterTable paramTable)
Import value from MIPAV script parameter. |
boolean |
importParameter(ParamModel model)
Import the contents of a foreign parameter into this parameter. |
boolean |
isCompatible(PipePort model)
Check for compatibility between parameters. |
boolean |
isConnectible()
returns true if connector can connect to this parameter. |
boolean |
isHidden()
Returns true if parameter is hidden. |
boolean |
isMandatory()
File field is mandatory. |
boolean |
loadResources(ParamModel param)
Load resources. |
boolean |
loadResources(ParamModel param,
javax.swing.ProgressMonitor monitor)
Load external resources specified in foreign parameter. |
abstract java.lang.String |
probeDefaultValue()
|
boolean |
read(java.io.File f)
Read parameter information from file. |
boolean |
read(java.lang.String text,
boolean loadResources)
Read parameter information from string. |
void |
replacePath(java.io.File originalDir,
java.io.File replaceDir)
Replace path in all file type objects with this path. |
boolean |
saveResources(java.io.File dir,
boolean saveSubDirectoryOverride)
Save external resources associated with the parameter to the specified directory. |
void |
setCliTag(java.lang.String tag)
|
void |
setDescription(java.lang.String description)
|
void |
setFactory(ParamFactory factory)
Use a different factory for manipulating this parameter model. |
void |
setHidden(boolean b)
Set hidden status. |
void |
setInputView(ParamInputView view)
Set the input view used to specify the parameter value. |
void |
setLabel(java.lang.String label)
Set the label to be displayed in the input and output views. |
void |
setLoadAndSaveOnValidate(boolean flag)
Allow memory saving operations by reducing the level of validation performed. |
void |
setMandatory(boolean mandatory)
Set the mandatory field. |
void |
setName(java.lang.String name)
Set the name of the parameter, which will appear as the label if the label is not specified. |
void |
setOutputView(ParamOutputView view)
Set the output view used to display the parameter value. |
void |
setShortLabel(java.lang.String shortLabel)
Set the shortLabel to be used as a command line switch. |
abstract void |
setValue(T value)
Set the parameter value. |
abstract void |
setXMLValue(java.lang.String arg)
|
abstract java.lang.String |
toString()
Get description of parameter. |
java.lang.String |
toXML()
Serialize parameter as XML. |
abstract void |
validate()
Validate parameter associated with this port. |
boolean |
write(java.io.File f)
Write this parameter to an XML file. |
void |
write(java.io.ObjectOutputStream out)
Write parameter to byte serialized output stream. |
void |
writeAndFreeNow(ProcessingAlgorithm src)
Attempt to export the current parameter now, and, if possible, free associated memory. |
Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.PipePort |
---|
addListener, disconnect, disconnect, disconnect, disconnect, getGraphPort, getIncomingConnector, getIncomingConnectors, getIncomingPorts, getListeners, getMaxIncoming, getMaxOutgoing, getOutgoingConnector, getOutgoingConnectors, getOutgoingPorts, getOwner, getPortType, init, isConnected, isConnectedTo, isInputPort, isOutputPort, notifyListenersOfConnection, notifyListenersOfDisconnection, removeAllListeners, removeListener, setConnectable, setGraphPort, setMaxIncoming, setMaxOutgoing, setOwner, setPortType, setUseConnector, usingConnector |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected transient ParamFactory factory
protected java.lang.String shortLabel
protected java.lang.String label
protected boolean hidden
protected boolean mandatory
protected java.lang.String description
protected transient boolean loadAndSaveOnValidate
protected java.lang.String cliTag
Constructor Detail |
---|
public ParamModel()
Method Detail |
---|
public abstract ParamModel<T> clone()
PipePort
clone
in class PipePort<T>
public int compareTo(ParamModel mod)
compareTo
in interface java.lang.Comparable<ParamModel>
mod
- the mod
public void createMipavParameter(AlgorithmParameters scriptParams) throws ParserException
scriptParams
- script parameter
ParserException
- the parser exceptionpublic final javax.swing.tree.MutableTreeNode createTreeNode()
public void clean()
public void replacePath(java.io.File originalDir, java.io.File replaceDir)
replaceDir
- public ParamFactory getFactory()
public final ParamInputView getInputView()
public java.lang.String getShortLabel()
public java.lang.String getLabel()
getLabel
in class PipePort<T>
public java.lang.String getName()
getName
in class PipePort<T>
public final ParamOutputView getOutputView()
public abstract T getValue()
getValue
in class PipePort<T>
public javax.swing.JPanel getView()
getView
in class PipePort<T>
public void hide()
public void importMipavParameter(ParameterTable paramTable) throws ParameterException
paramTable
- parameter table
ParameterException
- the parameter exceptionpublic final boolean importParameter(ParamModel model)
model
- foreign parameter
public boolean isCompatible(PipePort model)
isCompatible
in class PipePort<T>
model
- foreign parameter
public boolean isConnectible()
isConnectible
in class PipePort<T>
public boolean isHidden()
public boolean isMandatory()
public final boolean loadResources(ParamModel param)
param
- the param
public final boolean loadResources(ParamModel param, javax.swing.ProgressMonitor monitor)
param
- foreign parametermonitor
- TODO
public final boolean read(java.io.File f)
f
- XML file
public final boolean read(java.lang.String text, boolean loadResources)
text
- the textloadResources
- the load resources
public final boolean saveResources(java.io.File dir, boolean saveSubDirectoryOverride)
dir
- save directory
public void setFactory(ParamFactory factory)
factory
- the factorypublic void setHidden(boolean b)
b
- true if hiddenpublic final void setInputView(ParamInputView view)
view
- the viewpublic void setLabel(java.lang.String label)
setLabel
in class PipePort<T>
label
- the labelpublic void setShortLabel(java.lang.String shortLabel)
shortLabel
- the shortLabelpublic void setMandatory(boolean mandatory)
mandatory
- the mandatorypublic void setName(java.lang.String name)
setName
in class PipePort<T>
name
- the namepublic final void setOutputView(ParamOutputView view)
view
- the viewpublic abstract void setValue(T value) throws InvalidParameterValueException
setValue
in class PipePort<T>
value
- the value
InvalidParameterValueException
- object type is not an acceptable value for this parameter
parameter
- assigned value of an improper typepublic abstract java.lang.String toString()
toString
in class PipePort<T>
public final java.lang.String toXML()
public abstract void validate() throws InvalidParameterException
PipePort
validate
in class PipePort<T>
InvalidParameterException
- the invalid parameter exceptionpublic final boolean write(java.io.File f)
f
- file
public final void write(java.io.ObjectOutputStream out) throws java.io.IOException
out
- the out
java.io.IOException
- Signals that an I/O exception has occurred.public java.lang.String getDescription()
PipePort
getDescription
in class PipePort<T>
public void setDescription(java.lang.String description)
description
- the description to setpublic boolean equals(ParamModel<T> model)
public abstract java.lang.String getHumanReadableDataType()
public void setCliTag(java.lang.String tag)
public java.lang.String getCliTag()
public abstract void setXMLValue(java.lang.String arg)
public abstract java.lang.String getXMLValue()
public abstract java.lang.String probeDefaultValue()
public void setLoadAndSaveOnValidate(boolean flag)
flag
- - false = do not perform extra validation, true (default) = perform standard valdiationpublic void dispose()
public void writeAndFreeNow(ProcessingAlgorithm src)
src
- - Parent ProcessingAlgorithm needed to determine output location
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |