Skip to main content

Pentaho+ documentation has moved!

The new product documentation portal is here. Check it out now at docs.hitachivantara.com

 

Hitachi Vantara Lumada and Pentaho Documentation

IAnnotatable

pentaho.lang. IAnnotatable

The IAnnotatable interface represents the class of objects whose instances can be freely augmented with annotations.

An annotation has a name and a value, of (almost) any kind. The undefined value denotes a missing annotation, so it cannot be usefully be the value of an annotation.

The pentaho.lang.IAnnotatable#property method allows getting or setting annotations on an annotated object.

By convention, the specification of an annotatable object uses a property named p to contain a plain object, a dictionary of annotations' names and values (see pentaho.lang.spec.IAnnotatable).

Source: doc-js/pentaho/lang/IAnnotatable.jsdoc, line 17

See also: pentaho.lang.ISpecifiable , pentaho.lang.spec.IAnnotatable

Example

// Obtain an annotatable object
 var foo = ...

 // Read foo's "bar" annotation
 var bar = foo.property("bar");

 // And create it, if it ain't there
 if(bar === undefined) {
 bar = "I have a 'bar' annotation!";
 foo.property("bar", bar);
 }

 console.log(bar);

Methods

Name Description
property(name, value) : pentaho.lang.ISpecifiable

Sets an annotation on this object.

property(name) : *

Gets an annotation of the object.

Methods Details

property(name, value) : pentaho.lang.ISpecifiable

Sets an annotation on this object.

Source: doc-js/pentaho/lang/IAnnotatable.jsdoc, line 66

Parameters:
Name Default Value Summary
name : string

The name of the annotation.

value : *

The value of the annotation.

Returns:
Name Description
pentaho.lang.ISpecifiable

This object ??? the this value.

property(name) : *

Gets an annotation of the object.

If an annotation with the specified name does not exist, undefined is returned.

Source: doc-js/pentaho/lang/IAnnotatable.jsdoc, line 55

Parameters:
Name Default Value Summary
name : string

The name of the annotation.

Returns:
Name Description
*

The annotation's value.