org.dawb.passerelle.actors.edna
Class AbstractEdnaPlugin

java.lang.Object
  extended by ptolemy.kernel.util.NamedObj
      extended by ptolemy.kernel.InstantiableNamedObj
          extended by ptolemy.kernel.Entity
              extended by ptolemy.kernel.ComponentEntity
                  extended by ptolemy.actor.AtomicActor
                      extended by ptolemy.actor.TypedAtomicActor
                          extended by com.isencia.passerelle.actor.Actor
                              extended by com.isencia.passerelle.actor.Transformer
                                  extended by org.dawb.passerelle.common.actors.AbstractPassModeTransformer
                                      extended by org.dawb.passerelle.common.actors.AbstractDataMessageTransformer
                                          extended by org.dawb.passerelle.actors.edna.AbstractEdnaPlugin
All Implemented Interfaces:
com.isencia.passerelle.message.interceptor.IMessageCreator, com.isencia.passerelle.workbench.model.actor.IResourceActor, java.io.Serializable, java.lang.Cloneable, IVariableProvider, SubstitutionParticipant, XPathParticipant, ptolemy.actor.Actor, ptolemy.actor.Executable, ptolemy.actor.FiringsRecordable, ptolemy.actor.Initializable, ptolemy.actor.TypedActor, ptolemy.kernel.util.Changeable, ptolemy.kernel.util.Debuggable, ptolemy.kernel.util.DebugListener, ptolemy.kernel.util.Derivable, ptolemy.kernel.util.Instantiable, ptolemy.kernel.util.ModelErrorHandler, ptolemy.kernel.util.MoMLExportable, ptolemy.kernel.util.Moveable, ptolemy.kernel.util.Nameable
Direct Known Subclasses:
ControlCharAtNewOrientationv2_0, ControlCharForReorientationv2_0, ControlIndexingv10, ControlIntegrationv10, ControlStrategyv1_2, ImageIndexingPlugin, PeakSearchv1_0, ReadImageHeaderPlugin, ThumbnailImagePlugin

public abstract class AbstractEdnaPlugin
extends AbstractDataMessageTransformer
implements ptolemy.actor.Actor, com.isencia.passerelle.workbench.model.actor.IResourceActor, IVariableProvider, SubstitutionParticipant, XPathParticipant

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.isencia.passerelle.actor.Transformer
input
 
Fields inherited from class com.isencia.passerelle.actor.Actor
OPTIONS_FACTORY_CFG_NAME, receiverQueueCapacityParam, receiverQueueWarningSizeParam
 
Fields inherited from class ptolemy.kernel.util.NamedObj
ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
 
Fields inherited from interface ptolemy.actor.Executable
COMPLETED, NOT_READY, STOP_ITERATING
 
Constructor Summary
AbstractEdnaPlugin(java.lang.String pluginName, ptolemy.kernel.CompositeEntity container, java.lang.String name)
           
 
Method Summary
 void attributeChanged(ptolemy.kernel.util.Attribute attribute)
           
abstract  java.lang.String getDefaultInputXML()
          The original idea for this method was to use the schema to generate some default input xml.
abstract  java.util.Properties getDefaultOutputProperties()
          Returns key value pairs for the variables and their corresponding xpath values or a string describing the parameter.
 java.lang.String getDefaultSubstitution()
          Use to reset editor
 org.eclipse.core.resources.IProject getEdnaProject()
          Project used to get edna resources.
 java.lang.String getExampleValue(java.lang.String xPath, java.lang.String rename)
           
 java.util.List<IVariable> getInputVariables()
          These are cached and cleared when the model is.
 java.util.List<IVariable> getOutputVariables()
          This method reads the output file and returns the variable names defined in the output file.
 com.isencia.passerelle.workbench.model.actor.ResourceObject getResource(int num)
           
 int getResourceCount()
           
 boolean isDefinitelyLocalOutput(java.lang.String name)
          returns only the outputs from this plugin, not upstream ones.
 void setMomlResource(org.eclipse.core.resources.IResource momlFile)
           
 
Methods inherited from class org.dawb.passerelle.common.actors.AbstractDataMessageTransformer
doPreInitialize, getExampleValues
 
Methods inherited from class org.dawb.passerelle.common.actors.AbstractPassModeTransformer
isUpstreamVariable, refreshResource
 
Methods inherited from class com.isencia.passerelle.actor.Actor
createErrorMessage, createMessage, createMessage, createTriggerMessage, fire, getAuditLogger, getConfigurableParameter, getConfigurableParameter, getConfigurableParameters, getFullNameButWithoutModelName, getInfo, getOptionsFactory, initialize, isFinishRequested, isFiring, isMockMode, newReceiver, postfire, prefire, preinitialize, requestFinish, sendErrorMessage, stop, stopFire, terminate, wrapup
 
Methods inherited from class ptolemy.actor.TypedAtomicActor
attributeTypeChanged, clone, newPort, typeConstraintList
 
Methods inherited from class ptolemy.actor.AtomicActor
addActorFiringListener, addInitializable, clone, connectionsChanged, getDirector, getExecutiveDirector, getFunctionDependency, getManager, inputPortList, isFireFunctional, isStrict, iterate, outputPortList, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer
 
Methods inherited from class ptolemy.kernel.ComponentEntity
getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
 
Methods inherited from class ptolemy.kernel.Entity
connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
 
Methods inherited from class ptolemy.kernel.InstantiableNamedObj
exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
 
Methods inherited from class ptolemy.kernel.util.NamedObj
addChangeListener, addDebugListener, attributeList, attributeList, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, message, propagateValue, propagateValues, removeChangeListener, removeDebugListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface ptolemy.actor.Actor
getDirector, getExecutiveDirector, getFunctionDependency, getManager, inputPortList, newReceiver, outputPortList
 
Methods inherited from interface ptolemy.actor.Executable
fire, isFireFunctional, isStrict, iterate, postfire, prefire, stop, stopFire, terminate
 
Methods inherited from interface ptolemy.actor.Initializable
addInitializable, initialize, preinitialize, removeInitializable, wrapup
 
Methods inherited from interface ptolemy.kernel.util.Nameable
description, getContainer, getDisplayName, getFullName, getName, getName, setName
 
Methods inherited from interface org.dawb.passerelle.editors.SubstitutionParticipant
getExampleValues
 
Methods inherited from interface org.dawb.passerelle.editors.XPathParticipant
getName, isUpstreamVariable
 
Methods inherited from interface ptolemy.kernel.util.Derivable
getDerivedLevel, getDerivedList, propagateValue
 

Constructor Detail

AbstractEdnaPlugin

public AbstractEdnaPlugin(java.lang.String pluginName,
                          ptolemy.kernel.CompositeEntity container,
                          java.lang.String name)
                   throws ptolemy.kernel.util.NameDuplicationException,
                          ptolemy.kernel.util.IllegalActionException
Throws:
ptolemy.kernel.util.NameDuplicationException
ptolemy.kernel.util.IllegalActionException
Method Detail

attributeChanged

public void attributeChanged(ptolemy.kernel.util.Attribute attribute)
                      throws ptolemy.kernel.util.IllegalActionException
Overrides:
attributeChanged in class AbstractPassModeTransformer
Parameters:
attribute - The attribute that changed.
Throws:
ptolemy.kernel.util.IllegalActionException

getDefaultInputXML

public abstract java.lang.String getDefaultInputXML()
The original idea for this method was to use the schema to generate some default input xml. Just as the action Generate ->Xml doe in eclipse on a xsd file. However the xml was not really good enough for the default input. It turns out better for each actor to provide the default XML.


getDefaultOutputProperties

public abstract java.util.Properties getDefaultOutputProperties()
Returns key value pairs for the variables and their corresponding xpath values or a string describing the parameter.

Parameters:
message -
Throws:
com.isencia.passerelle.actor.ProcessingException

getEdnaProject

public org.eclipse.core.resources.IProject getEdnaProject()
Project used to get edna resources. You may set a system property org.dawb.edna.project.name to change the default project, or override this method.

Returns:

getResourceCount

public int getResourceCount()
Specified by:
getResourceCount in interface com.isencia.passerelle.workbench.model.actor.IResourceActor

getResource

public com.isencia.passerelle.workbench.model.actor.ResourceObject getResource(int num)
Specified by:
getResource in interface com.isencia.passerelle.workbench.model.actor.IResourceActor

setMomlResource

public void setMomlResource(org.eclipse.core.resources.IResource momlFile)
Specified by:
setMomlResource in interface com.isencia.passerelle.workbench.model.actor.IResourceActor

getInputVariables

public java.util.List<IVariable> getInputVariables()
Description copied from class: AbstractPassModeTransformer
These are cached and cleared when the model is.

Specified by:
getInputVariables in interface IVariableProvider
Specified by:
getInputVariables in interface SubstitutionParticipant
Overrides:
getInputVariables in class AbstractPassModeTransformer
Returns:

getOutputVariables

public java.util.List<IVariable> getOutputVariables()
This method reads the output file and returns the variable names defined in the output file. You can override this method to return the variables from both upstream nodes and xpath variables. The file is a properties file.

Specified by:
getOutputVariables in interface IVariableProvider
Specified by:
getOutputVariables in interface XPathParticipant
Overrides:
getOutputVariables in class AbstractPassModeTransformer
Returns:

isDefinitelyLocalOutput

public boolean isDefinitelyLocalOutput(java.lang.String name)
                                throws java.io.IOException,
                                       org.eclipse.core.runtime.CoreException
returns only the outputs from this plugin, not upstream ones.

Returns:
Throws:
org.eclipse.core.runtime.CoreException
java.io.IOException

getExampleValue

public java.lang.String getExampleValue(java.lang.String xPath,
                                        java.lang.String rename)
Specified by:
getExampleValue in interface XPathParticipant
Returns:

getDefaultSubstitution

public java.lang.String getDefaultSubstitution()
Use to reset editor

Specified by:
getDefaultSubstitution in interface SubstitutionParticipant