|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectedu.jhu.ece.iacl.jist.pipeline.PipePort<T>
edu.jhu.ece.iacl.jist.pipeline.parameter.ParamModel<java.io.File>
edu.jhu.ece.iacl.jist.pipeline.parameter.ParamFile
public class ParamFile
File parameter used to store a file name with a particular file extension.
| Nested Class Summary | |
|---|---|
static class |
ParamFile.DialogType
The Enum DialogType. |
| Nested classes/interfaces inherited from class edu.jhu.ece.iacl.jist.pipeline.PipePort |
|---|
PipePort.PortListener, PipePort.type |
| Field Summary | |
|---|---|
protected ParamFile.DialogType |
dialogType
The dialog type. |
protected FileExtensionFilter |
extensionFilter
The extension filter. |
protected java.io.File |
file
The file. |
protected java.net.URI |
uri
The URI. |
| Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamModel |
|---|
cliTag, description, factory, hidden, label, loadAndSaveOnValidate, mandatory, shortLabel |
| Fields inherited from class edu.jhu.ece.iacl.jist.pipeline.PipePort |
|---|
connectible, gport, incomingConnectors, listeners, maxIncoming, maxOutgoing, outgoingConnectors, owner, portType, useWire |
| Constructor Summary | |
|---|---|
ParamFile(ParamFile.DialogType type)
Construct parameter with specified restrictions. |
|
ParamFile(java.lang.String name)
Construct parameter for a mandatory file type. |
|
ParamFile(java.lang.String name,
FileExtensionFilter filter)
Construct parameter for a mandatory file type. |
|
ParamFile(java.lang.String name,
java.io.File f,
ParamFile.DialogType type)
Construct parameter with specified restrictions. |
|
ParamFile(java.lang.String name,
ParamFile.DialogType type)
Construct parameter with specified restrictions. |
|
ParamFile(java.lang.String name,
java.net.URI uri,
ParamFile.DialogType type)
Construct parameter with specified restrictions. |
|
| Method Summary | |
|---|---|
void |
clean()
Clean resources that maybe out-of-date with the system |
ParamFile |
clone()
Clone object. |
int |
compareTo(ParamModel model)
Compare two parameters based on their dialog types, extensionFilters, and mandatory fields F *. |
ParamFile.DialogType |
getDialogType()
Get dialog type. |
FileExtensionFilter |
getExtensionFilter()
Gets the extension filter. |
java.lang.String |
getHumanReadableDataType()
|
java.net.URI |
getURI()
Get uri location. |
java.io.File |
getValue()
Get file location. |
java.lang.String |
getXMLValue()
|
void |
init()
Initialized data that could not be deserialized. |
boolean |
isCompatible(PipePort model)
Returns true if port is compatible with this parameter's extension filter. |
java.lang.String |
probeDefaultValue()
|
void |
replacePath(java.io.File originalDir,
java.io.File replaceDir)
Replace path in all file type objects with this path. |
void |
setExtensionFilter(FileExtensionFilter filter)
Sets the extension filter. |
void |
setValue(java.io.File value)
Set the file location for this parameter. |
void |
setValue(java.lang.String value)
Set file location. |
void |
setValue(java.net.URI value)
Set the uri location for this parameter. |
void |
setXMLValue(java.lang.String arg)
|
java.lang.String |
toString()
Get description of parameter. |
static java.io.File |
translatePath(java.io.File f,
java.io.File originalDir,
java.io.File replaceDir)
|
void |
validate()
Validate that the specified file exists and meets all restrictions. |
| Methods inherited from class edu.jhu.ece.iacl.jist.pipeline.parameter.ParamModel |
|---|
createMipavParameter, createTreeNode, dispose, equals, getCliTag, getDescription, getFactory, getInputView, getLabel, getName, getOutputView, getShortLabel, getView, hide, importMipavParameter, importParameter, isConnectible, isHidden, isMandatory, loadResources, loadResources, read, read, saveResources, setCliTag, setDescription, setFactory, setHidden, setInputView, setLabel, setLoadAndSaveOnValidate, setMandatory, setName, setOutputView, setShortLabel, toXML, write, write, writeAndFreeNow |
| 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, 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 FileExtensionFilter extensionFilter
protected ParamFile.DialogType dialogType
protected java.io.File file
protected java.net.URI uri
| Constructor Detail |
|---|
public ParamFile(ParamFile.DialogType type)
type - directory or file dialogpublic ParamFile(java.lang.String name)
name - parameter name
public ParamFile(java.lang.String name,
ParamFile.DialogType type)
name - parameter nametype - directory or file dialog
public ParamFile(java.lang.String name,
java.io.File f,
ParamFile.DialogType type)
name - parameter nametype - directory or file dialogf - the file
public ParamFile(java.lang.String name,
java.net.URI uri,
ParamFile.DialogType type)
name - parameter nametype - directory or file dialoguri - the uri
public ParamFile(java.lang.String name,
FileExtensionFilter filter)
name - parameter namefilter - the filter| Method Detail |
|---|
public ParamFile clone()
clone in class ParamModel<java.io.File>public int compareTo(ParamModel model)
compareTo in interface java.lang.Comparable<ParamModel>compareTo in class ParamModel<java.io.File>model - the model
public ParamFile.DialogType getDialogType()
public FileExtensionFilter getExtensionFilter()
public java.io.File getValue()
getValue in class ParamModel<java.io.File>public java.net.URI getURI()
public void init()
PipePort
init in class PipePort<java.io.File>public boolean isCompatible(PipePort model)
isCompatible in class ParamModel<java.io.File>model - the model
public void setExtensionFilter(FileExtensionFilter filter)
filter - the new extension filterpublic void setValue(java.io.File value)
setValue in class ParamModel<java.io.File>value - parameter valuepublic void setValue(java.net.URI value)
value - parameter valuepublic void setValue(java.lang.String value)
value - file location as stringpublic java.lang.String toString()
toString in class ParamModel<java.io.File>
public void validate()
throws InvalidParameterException
validate in class ParamModel<java.io.File>InvalidParameterException - parameter value does not meet value restrictionspublic void clean()
ParamModel
clean in class ParamModel<java.io.File>
public static java.io.File translatePath(java.io.File f,
java.io.File originalDir,
java.io.File replaceDir)
public void replacePath(java.io.File originalDir,
java.io.File replaceDir)
ParamModel
replacePath in class ParamModel<java.io.File>public java.lang.String getHumanReadableDataType()
getHumanReadableDataType in class ParamModel<java.io.File>public java.lang.String getXMLValue()
getXMLValue in class ParamModel<java.io.File>public void setXMLValue(java.lang.String arg)
setXMLValue in class ParamModel<java.io.File>public java.lang.String probeDefaultValue()
probeDefaultValue in class ParamModel<java.io.File>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||