public class OpendapDataSourceODC extends Source
As an example, consider the FNOC1 data source available at test.opendap.org. The full URL for this is http://test.opendap.org/opendap/data/nc/fnoc1.nc. It contains a variable 'u' which has three dimensions. We can constrain 'u' so that it has only two dimensions when read into Kepler using the CE 'u[0][0:16][0:20]' which selects only the first element (index 0) for the first dimension while requesting all of the remaining elements for the second and third dimensions. The www.opendap.org has documentation about the CE syntax.
The second data type returned by the actor is a record. In reality, all DAP data sources are records but the actor automatically 'disassembles' the top most record since we know that's what the vast majority of users will want. However, some data sources contains nested hierarchies of records many levels deep. When dealing with those data sources you will need to use the Kepler record disassembler in your work flow.
Entity.ContainedObjectsIterator
Modifier and Type | Field and Description |
---|---|
FileParameter |
opendapCEParameter
The OPeNDAP Constraint Expression used to sub sample the dataset.
|
FileParameter |
opendapURLParameter
The OPeNDAP URL that identifies a (possibly constrained) dataset.
|
Parameter |
runODC |
_triggered, output, trigger
_typesValid
_actorFiringListeners, _initializables, _notifyingActorFiring, _stopRequested
_changeListeners, _changeLock, _changeRequests, _debugging, _debugListeners, _deferChangeRequests, _elementName, _isPersistent, _verbose, _workspace, ATTRIBUTES, CLASSNAME, COMPLETE, CONTENTS, DEEP, FULLNAME, LINKS
COMPLETED, NOT_READY, STOP_ITERATING
Constructor and Description |
---|
OpendapDataSourceODC(CompositeEntity container,
java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
void |
attributeChanged(Attribute attribute)
React to a change in an attribute.
|
void |
fire()
Read at most one input token from each channel of the trigger
input and discard it.
|
void |
initialize()
Initialize this actor.
|
static java.lang.String |
portInfo(TypedIOPort port)
Probe a port
|
boolean |
postfire()
Return true, unless stop() has been called, in which case,
return false.
|
boolean |
prefire()
If the trigger input is connected and it has no input or an unknown
state, then return false.
|
void |
preinitialize()
Create receivers and declare delay dependencies.
|
static void |
squeezeArrays(opendap.dap.DConstructor dds)
Eliminates array dimensions whose dimensions are 1 (and thus in practice
don't exisit)
|
_customTypeConstraints
_containedTypeConstraints, _defaultTypeConstraints, _fireAt, _fireAt, attributeTypeChanged, clone, clone, isBackwardTypeInferenceEnabled, newPort, typeConstraintList, typeConstraints
_actorFiring, _actorFiring, _declareDelayDependency, addActorFiringListener, addInitializable, connectionsChanged, createReceivers, declareDelayDependency, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, isFireFunctional, isStrict, iterate, newReceiver, outputPortList, pruneDependencies, recordFiring, removeActorFiringListener, removeDependency, removeInitializable, setContainer, stop, stopFire, terminate, wrapup
_adjustDeferrals, _checkContainer, _getContainedObject, _propagateExistence, getContainer, instantiate, isAtomic, isOpaque, moveDown, moveToFirst, moveToIndex, moveToLast, moveUp, propagateExistence, setName
_addPort, _description, _exportMoMLContents, _removePort, _validateSettables, connectedPortList, connectedPorts, containedObjectsIterator, getAttribute, getPort, getPorts, linkedRelationList, linkedRelations, portList, removeAllPorts, setClassDefinition, uniqueName
_setParent, exportMoML, getChildren, getElementName, getParent, getPrototypeList, isClassDefinition, isWithinClassDefinition
_addAttribute, _adjustOverride, _attachText, _cloneFixAttributeFields, _containedDecorators, _copyChangeRequestList, _debug, _debug, _debug, _debug, _debug, _executeChangeRequests, _getIndentPrefix, _isMoMLSuppressed, _markContentsDerived, _notifyHierarchyListenersAfterChange, _notifyHierarchyListenersBeforeChange, _propagateValue, _removeAttribute, _splitName, _stripNumericSuffix, addChangeListener, addDebugListener, addHierarchyListener, attributeDeleted, attributeList, attributeList, decorators, deepContains, depthInHierarchy, description, description, event, executeChangeRequests, exportMoML, exportMoML, exportMoML, exportMoML, exportMoMLPlain, getAttribute, getAttributes, getChangeListeners, getClassName, getDecoratorAttribute, getDecoratorAttributes, getDerivedLevel, getDerivedList, getDisplayName, getFullName, getModelErrorHandler, getName, getName, getSource, handleModelError, isDeferringChangeRequests, isOverridden, isPersistent, lazyContainedObjectsIterator, message, notifyOfNameChange, propagateValue, propagateValues, removeAttribute, removeChangeListener, removeDebugListener, removeHierarchyListener, requestChange, setClassName, setDeferringChangeRequests, setDerivedLevel, setDisplayName, setModelErrorHandler, setPersistent, setSource, sortContainedObjects, toplevel, toString, validateSettables, workspace
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
createReceivers, getCausalityInterface, getDirector, getExecutiveDirector, getManager, inputPortList, newReceiver, outputPortList
isFireFunctional, isStrict, iterate, stop, stopFire, terminate
addInitializable, removeInitializable, wrapup
description, getContainer, getDisplayName, getFullName, getName, getName, setName
getDerivedLevel, getDerivedList, propagateValue
public FileParameter opendapURLParameter
public FileParameter opendapCEParameter
public OpendapDataSourceODC(CompositeEntity container, java.lang.String name) throws NameDuplicationException, IllegalActionException
public void attributeChanged(Attribute attribute) throws IllegalActionException
NamedObj
attributeChanged
in class NamedObj
attribute
- The changed Attribute.IllegalActionException
- When bad things happen.public void preinitialize() throws IllegalActionException
AtomicActor
preinitialize
in interface Initializable
preinitialize
in class AtomicActor<TypedIOPort>
IllegalActionException
- Not thrown in this base class.public void initialize() throws IllegalActionException
AtomicActor
initialize
in interface Initializable
initialize
in class AtomicActor<TypedIOPort>
IllegalActionException
- If a derived class throws it.public boolean prefire() throws IllegalActionException
Source
prefire
in interface Executable
prefire
in class Source
IllegalActionException
- If checking the trigger for
a token throws it or if the super class throws it.public void fire() throws IllegalActionException
Source
fire
in interface Executable
fire
in class Source
IllegalActionException
- Not thrown in this base class.public boolean postfire() throws IllegalActionException
AtomicActor
postfire
in interface Executable
postfire
in class AtomicActor<TypedIOPort>
IllegalActionException
- Not thrown in this base class.public static java.lang.String portInfo(TypedIOPort port)
port
- The port to probe.public static void squeezeArrays(opendap.dap.DConstructor dds)
dds
- The DDS to traverse and squeeze its member arrays.