org.unizone.source

Type Diff

org.unizone.0.4100
Instance of Type
Inheriting from SourceAdapterMultiple

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.source.Diff

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
List[Source]sourcesSourceAdapterMultipleorg.unizone.0.4031

Method summaryDefined inOverridesProperties
voidactivateListable
voidcheckRangeSourceAdapterMultipleSource
voiddesignEditor(WidgetWorkspace ws)Listable
voidgenerateScript(ScriptGenerationInfo info)SourceAdapterMultipleScriptGenerator
BooleanisResourceOf(Listable listable, Signature aspect)Mixabletype
ListablemixOn(Mixable mix)Mixable
ListablemixWith(Mixable mix)Mixable
StringresourceStringListableintrospection
voidcom.nodelab.java.source.ActivateSourceListable
Listablecom.nodelab.java.source.MixWithMiSourceMixable

Script summary
org.unizone.0.8548
/*

BaliSource subclass: #BaliDiff

	instanceVariableNames: ' diff dimSymbol factor '

	classVariableNames: ''

	poolDictionaries: ''
	category: 'Bali'!


!BaliDiff methodsFor: 'source'!

basicValueAspect: anAspect environment: env
	| dim v1 v2 newEnv identifier |
	env gig isNil ifTrue: [^nil].
	dim := env gig dimensionType: self dimSymbol value.
	v1 := self nextSource valueAspect: anAspect environment: env.
	v1 isNil ifTrue: [^nil].
	newEnv := JazzEnvironment new parent: env.
	identifier := 'cond_' , dim name.
	newEnv localAt: identifier put: (dim subtractFrom: (env localAt: identifier) diff: self diff value).
	v2 := self nextSource valueAspect: anAspect environment: newEnv.
	v2 isNil ifTrue: [^nil].
	^self factor value * (v1 - v2)!

basicValueTypes
	^#(#diff)!

defaultName
	| sourceName diffStr |
	sourceName := self nextSource name.
	diffStr := self diff value printString.
	self dimSymbol value = #dimHistory ifTrue: [diffStr := diffStr , ' days'].
	self dimSymbol value = #dimMaturity ifTrue: [diffStr := diffStr , ' years maturity'].
	self dimSymbol value = #dimForward ifTrue: [diffStr := diffStr , ' years maturity'].
	self factor value = 1
		ifFalse: [^' diff ' , self factor value printString , ' * (' , sourceName , ', ' diffStr , ')']
		ifTrue: [^' diff (' , sourceName , ', ' , diffStr , ')'].! !

!BaliDiff methodsFor: 'aspects'!

diff
	diff isNil ifTrue: [diff := 1 asValue].
	^diff!

dimSymbol
	dimSymbol isNil ifTrue: [dimSymbol := #dimHistory asValue].
	^dimSymbol!

factor
	factor isNil ifTrue: [factor := 1 asValue].
	^factor!

uiClass
	^BaliDiffUI! !

!BaliDiff methodsFor: ' database'!

addDefinition
	| aspects |
	(aspects := super addDefinition) isNil ifTrue: [^nil].
	self addAspect: #dbDiff value: self diff value printString position: aspects + 1.
	self addAspect: #dbDimension value: self dimSymbol value asString position: aspects + 2.
	^aspects + 2!

dbDiff: aString
	self diff value: (GotheTools atod: aString).!

dbDimension: aString
	self dimSymbol value: aString asSymbol! !
"-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- "!

BaliDiff class
	instanceVariableNames: ''!


!BaliDiff class methodsFor: 'aspects'!

scriptClass
	^' Diff'!

scriptSuperClass
	^'Effect'! !





*/