org.unizone.finance.equity

Type VolumeDiff

org.unizone.0.5820
Instance of Type
Inheriting from SourceAdapterSingle

Type dataValue
org.uninode.Type.displayPattern{att:org.unizone.source.Source.displayName}
org.unizone.source.Source.valueAttribute
org.uninode.Resource.resourceType
org.uninode.Resource.label
org.uninode.Resource.resourceOfList{}
org.uninode.Listable.resourcesReference[org.uninode.Listable.resources] of org.unizone.finance.equity.VolumeDiff

Attribute summaryDefined inUninode® IdPropertiesDefault
Reference[org.uninode.Listable.resources]resourcesListableorg.uninode.0.2001type
StringtoString
This is the display string.
Nodeorg.uninode.0.102
Typetype
The type of an object determines the behaviour and attributes of the object.
Nodeorg.uninode.0.101
StringuriNodeorg.uninode.0.103
StringlabelResourceorg.uninode.0.2041type
List[Type]resourceOfResourceorg.uninode.0.2042type
SignatureresourceType
This defines the type of resource. It can be 'view', 'adapter' or 'action'
Resourceorg.uninode.0.2043type
StringdisplayName
The display name is the name that is shown in lists, displays and graphs.
Sourceorg.unizone.0.4001essential
AttributevalueAttribute
The value attribute is used for determining the default value that should be used for displaying this source in a graph.
Sourceorg.unizone.0.4011type
inheritValue
SignaturevalueType
The value type determines which axes should be used in graphs.
Sourceorg.unizone.0.4002inheritValue
SourcesourceSourceAdapterSingleorg.unizone.0.4051

Method summaryDefined inOverridesProperties
voidactivateListable
voidcheckRangeSourceAdapterSingleSource
voiddesignEditor(WidgetWorkspace ws)Listable
voidgenerateScript(ScriptGenerationInfo info)SourceAdapterSingleScriptGenerator
BooleanisResourceOf(Listable listable, Signature aspect)Mixabletype
ListablemixOn(Mixable mix)Mixable
ListablemixWith(Mixable mix)Mixable
StringresourceStringListableintrospection
voidsetSource(Source source)SourceAdapterSingle
SourcesourceSourceAdapterSingle
voidXXXcom.nodelab.java.sourceadaptersingle.CheckRangeSourceAdapterSingle
SignatureXXXcom.nodelab.java.sourceadaptersingle.ValueTypeSourceAdapterSingle
voidcom.nodelab.java.source.ActivateSourceListable
Listablecom.nodelab.java.source.MixWithMiSourceMixable

Script summary
org.unizone.0.8534
/*


BaliTimeSeries subclass: #BaliVolumeDiff

	instanceVariableNames: 'resolution '

	classVariableNames: ''

	poolDictionaries: ''
	category: 'Bali'!


!BaliVolumeDiff methodsFor: 'timeList'!

prepareDataFrom: aBaliTime resolution: aResolution
	| to sourceSteps val index src set data env load last i |
	self resolution: aResolution.
	load := self loadResolution: aResolution.
	(load loadedFrom notNil and: [load loadedFrom <= aBaliTime]) ifTrue: [^nil].
	self server user report: 'Preparing ' , self name.
	self resolution: nil. "clear it all"
	self resolution: aResolution.
	load := self loadResolution: aResolution.
	src := self nextSource.
	to := (self loadResolution: aResolution) loadedFrom.
	to isNil ifTrue: [to := BaliTime now addDays: 1].
	env := JazzEnvironment new.
	env localAt: 'cond_history_from' put: aBaliTime.
	env localAt: 'cond_history_to' put: to.
	env localAt: 'cond_history_resolution' put: aResolution.
	set := Set new.
	src collectStepsDim: #dimHistory environment: env into: set.
	sourceSteps := set asList.
	sourceSteps sortWith: [:a :b | a < b].
	i := 1.
	[i < sourceSteps size] whileTrue: [
		val := sourceSteps at: i.
		(val equalTo: (sourceSteps at: i + 1) type: aResolution)
			ifTrue: [sourceSteps removeAtIndex: i]
			ifFalse: [i := i + 1]].
	index := 1.
	last := nil.
	self dataList isEmpty ifFalse: [self dataList removeFirst].
	[index <= sourceSteps size] whileTrue: [
		env localAt: 'cond_history' put: (sourceSteps at: index).
		(index > 1 and: [(sourceSteps at: index - 1) equalTo: (sourceSteps at: index) type: #day]) ifFalse: [last := nil].
		val := src valueAspect: #volume environment: env.
		data := BaliTimeData new source: self.
		data aspects at: #timestamp put: (sourceSteps at: index).
		(val isNil or: [last isNil])
			ifFalse: [data aspects at: #value put: (val < last ifTrue: [nil] ifFalse: [val - last])]
			ifTrue: [data aspects at: #value put: val].
		self dataList add: data.
		last := val.
		index := index + 1].
	self dataList sort.
	self server user report: ''.
	load loadedFrom: aBaliTime.! !

!BaliVolumeDiff methodsFor: 'source'!

basicPreferredDisplayType: aBaliDisplay
	^#bar!

basicValueAspect: anAspect environment: env
	self resolution: env resolution.
	^self valueAspect: anAspect time: env timestamp resolution: env resolution environment: env.!

basicValueTypes
	^#(#volume)!

defaultColor
	^#veryLightGray!

defaultName
	self nextSource isNil ifTrue: [^'volume diff'].
	^'interval volume of ' , self nextSource name.! !

!BaliVolumeDiff methodsFor: 'aspects'!

resolution
	^resolution!

resolution: newResolution
	resolution = newResolution ifFalse: [
		resolution := newResolution.
		self dataList: nil.
		self dataDict: nil.
		self loads: nil].! !




*/