org.unizone.source | ![]() |
org.unizone.0.4080
Instance of Type
Inheriting from SourceAdapterMultipleTimeseries
Type data | Value |
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.resourceOf | List{} |
org.uninode.Listable.resources | Reference[org.uninode.Listable.resources] of org.unizone.source.Correlation |
Attribute summary | Defined in | Uninode® Id | Properties | Default | |
Reference[org.uninode.Listable.resources] | resources | Listable | org.uninode.0.2001 | type | |
String | toString This is the display string. | Node | org.uninode.0.102 | ||
Type | type The type of an object determines the behaviour and attributes of the object. | Node | org.uninode.0.101 | ||
String | uri | Node | org.uninode.0.103 | ||
String | label | Resource | org.uninode.0.2041 | type | |
List[Type] | resourceOf | Resource | org.uninode.0.2042 | type | |
Signature | resourceType This defines the type of resource. It can be 'view', 'adapter' or 'action' | Resource | org.uninode.0.2043 | type | |
String | displayName The display name is the name that is shown in lists, displays and graphs. | Source | org.unizone.0.4001 | essential | |
Attribute | valueAttribute The value attribute is used for determining the default value that should be used for displaying this source in a graph. | Source | org.unizone.0.4011 | type inheritValue | |
Signature | valueType The value type determines which axes should be used in graphs. | Source | org.unizone.0.4002 | inheritValue | |
List[Source] | sources | SourceAdapterMultiple | org.unizone.0.4031 |
Method summary | Defined in | Overrides | Properties | |
void | activate | Listable | ||
void | checkRange | SourceAdapterMultiple | Source | |
void | designEditor(WidgetWorkspace ws) | Listable | ||
void | generateScript(ScriptGenerationInfo info) | SourceAdapterMultiple | ScriptGenerator | |
Real | get(DateTime timestamp) | SourceAdapterMultipleTimeseries | ||
Boolean | isResourceOf(Listable listable, Signature aspect) | Mixable | type | |
Listable | mixOn(Mixable mix) | Mixable | ||
Listable | mixWith(Mixable mix) | Mixable | ||
void | put(DateTime timestamp, Real value) | SourceAdapterMultipleTimeseries | ||
String | resourceString | Listable | introspection | |
void | com.nodelab.java.source.Activate | Source | Listable | |
Listable | com.nodelab.java.source.MixWithMi | Source | Mixable |
Script summary |
org.unizone.0.8547/* instance Source src1; instance Source src2; instance Value[Int] days; constructor() { TimeBuffer:(); instance days = new Value(Int, 30); } Void setDays(Int days) { instance days.set(days); } class Boolean isResourceOf(Listable node, Symbol aspect) { if (aspect == #adaptors) return true; false; } class String resourceLabel() { "correlation"; } String resourceString() { instance days.toString + " days correlation (" + instance src1.toString + ", " + instance src2.toString + ")"; } Symbol valueType() { #correlation } Void designEditor(WidgetWorkspace ws) { ws.addLabel(new Place(0, 0).setPadding(5, 5), "Days"); ws.addField(new Place(1, 0).setPadding(20, 5), instance days, null); } Mixable mixWith(Mixable item) { instance src1 = Producer.mix(1); addNextSource(instance src1); instance src2 = Producer.mix(0); addNextSource(instance src2); this; } trace TimeData createData(Time t, Symbol resolution) { t.toString; Producer.report("Preparing " + toString() + " at " + t.toString); external cond_history_from = t.addDays(-instance days.value); external cond_history_to = t; external cond_history_resolution = #day; Set[Time] dates = new Set(Time); instance src1.collectSteps(#cond_history, dates); instance src2.collectSteps(#cond_history, dates); if (dates.size < 2) return; Array[Real] ar1 = new Array(Real, dates.size - 1); Array[Real] ar2 = new Array(Real, dates.size - 1); Real val1 = null; Real val2 = null; Time time = null; Real trailVal1 = null; Real trailVal2 = null; Time trailTime = null; 0 .to(dates.size - 2, trace Void(Int i) { trailVal1 = val1; trailVal2 = val2; trailTime = time; time = dates.at(i); external cond_history = time; val1 = instance src1.aspectReal(#value); val2 = instance src2.aspectReal(#value); if (val1 != null && val2 != null && trailVal1 != null && trailVal2 != null) { Int span = time.subtractDate(trailTime); if (span > 0) { ar1.set(i, (val1 - trailVal1) / (span / 365) ^ 0.5); ar2.set(i, (val2 - trailVal2) / (span / 365) ^ 0.5); } else { time = trailTime; val1 = trailVal1; val2 = trailVal2; } } }); TimeData data = new TimeData(this, time); data.setAspect(#value, Math.correlationMinusOne(ar1, ar2, 0)); Producer.report(""); data; } */ |