public abstract class AbstractModuleInfo extends AbstractUIDetails implements ModuleInfo, Identifiable, Locatable, Versioned
ModuleInfo implementation.
By default, ModuleItems are stored in HashMaps and
ArrayLists, internally.
APPLICATION_MENU_ROOT| Constructor and Description |
|---|
AbstractModuleInfo() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canCancel()
Gets whether the module condones cancellation.
|
boolean |
canPreview()
Gets whether the module supports previews.
|
boolean |
canRunHeadless()
Gets whether the module condones headless execution.
|
protected void |
clearParameters()
Clears input and output parameters.
|
String |
getIdentifier()
Gets a string intended to function as an identifier for the object.
|
String |
getInitializer()
Gets the function that is called to initialize the module's values.
|
ModuleItem<?> |
getInput(String name)
Gets the input item with the given name.
|
<T> ModuleItem<T> |
getInput(String name,
Class<T> type)
Gets the input item with the given name and type.
|
String |
getLocation()
Gets the URL string defining the object's location.
|
ModuleItem<?> |
getOutput(String name)
Gets the output item with the given name.
|
<T> ModuleItem<T> |
getOutput(String name,
Class<T> type)
Gets the output item with the given name and type.
|
List<ValidityProblem> |
getProblems()
Gets the list of problems encountered while initializing the object.
|
String |
getTitle()
Gets an appropriate title for the object, for use in a user interface.
|
String |
getVersion()
Gets the version of the object.
|
protected List<ModuleItem<?>> |
inputList()
Gets
outputMap, initializing if needed. |
protected Map<String,ModuleItem<?>> |
inputMap()
Gets
inputMap, initializing if needed. |
Iterable<ModuleItem<?>> |
inputs()
Gets the list of input items.
|
boolean |
isInteractive()
Gets whether the module is intended to be run interactively.
|
boolean |
isValid()
Gets whether the object is completely valid (i.e., no problems during
initialization).
|
protected List<ModuleItem<?>> |
outputList()
Gets
outputList, initializing if needed. |
protected Map<String,ModuleItem<?>> |
outputMap()
Gets
inputList, initializing if needed. |
Iterable<ModuleItem<?>> |
outputs()
Gets the list of output items.
|
protected void |
parseParameters()
Parses input and output parameters.
|
protected void |
registerInput(ModuleItem<?> input)
Adds an input.
|
protected void |
registerOutput(ModuleItem<?> output)
Adds an output.
|
void |
update(EventService eventService)
Notifies interested parties that the module info has been modified.
|
compareTo, getIconPath, getMenuPath, getMenuRoot, getPriority, getSelectionGroup, isEnabled, isSelectable, isSelected, isVisible, setEnabled, setIconPath, setMenuPath, setMenuRoot, setPriority, setSelectable, setSelected, setSelectionGroup, setVisible, toStringget, getDescription, getLabel, getName, is, set, setDescription, setLabel, setNameclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitcreateModule, getDelegateClassName, loadDelegateClassgetIconPath, getMenuPath, getMenuRoot, getSelectionGroup, isEnabled, isSelectable, isSelected, isVisible, setEnabled, setIconPath, setMenuPath, setMenuRoot, setSelectable, setSelected, setSelectionGroup, setVisibleget, getDescription, getLabel, is, set, setDescription, setLabelgetPriority, setPrioritycompareTopublic ModuleItem<?> getInput(String name)
ModuleInfogetInput in interface ModuleInfopublic <T> ModuleItem<T> getInput(String name, Class<T> type)
ModuleInfogetInput in interface ModuleInfopublic ModuleItem<?> getOutput(String name)
ModuleInfogetOutput in interface ModuleInfopublic <T> ModuleItem<T> getOutput(String name, Class<T> type)
ModuleInfogetOutput in interface ModuleInfopublic Iterable<ModuleItem<?>> inputs()
ModuleInfoinputs in interface ModuleInfopublic Iterable<ModuleItem<?>> outputs()
ModuleInfooutputs in interface ModuleInfopublic boolean isInteractive()
ModuleInfoRunnable.run() being called whenever any of the values change.isInteractive in interface ModuleInfopublic boolean canPreview()
ModuleInfoRunnable.run(). If this method returns false, then
calling Module.preview() will have no effect.canPreview in interface ModuleInfopublic boolean canCancel()
ModuleInfoModule.cancel() will
have no effect.canCancel in interface ModuleInfopublic boolean canRunHeadless()
ModuleInfocanRunHeadless in interface ModuleInfopublic String getInitializer()
ModuleInfogetInitializer in interface ModuleInfopublic void update(EventService eventService)
ModuleInfo
For classes implementing this interface directly, this method should
publish a ModulesUpdatedEvent to the event bus (see
update(EventService) for an example).
update in interface ModuleInfopublic String getTitle()
UIDetailsgetTitle in interface UIDetailsgetTitle in class AbstractUIDetailspublic boolean isValid()
Validatedpublic List<ValidityProblem> getProblems()
ValidatedgetProblems in interface ValidatedValidated.isValid() returning true.public String getIdentifier()
IdentifiablegetIdentifier in interface Identifiablepublic String getLocation()
LocatablegetLocation in interface Locatablepublic String getVersion()
VersionedgetVersion in interface Versionedprotected void parseParameters()
protected void clearParameters()
protected void registerInput(ModuleItem<?> input)
parseParameters() methods.protected void registerOutput(ModuleItem<?> output)
parseParameters() methods.protected Map<String,ModuleItem<?>> inputMap()
inputMap, initializing if needed.protected Map<String,ModuleItem<?>> outputMap()
inputList, initializing if needed.protected List<ModuleItem<?>> inputList()
outputMap, initializing if needed.protected List<ModuleItem<?>> outputList()
outputList, initializing if needed.Copyright © 2009–2016 SciJava. All rights reserved.