Skip to main content
Pentaho Documentation

Type

pentaho.type.filter.IsEqual.Type

The type class of the equality filter type.

For more information see pentaho.type.filter.IsEqual.

Extends

Constructor

Name Description
new Type()
 
Static

Members

Name Description
alias : nonEmptyString

Gets the alias for the identifier of this type.

ancestor : pentaho.type.Type

Gets the parent type in the current type hierarchy, if any, or null.

application : object

Gets or sets the application attribute of this type.

category : nonEmptyString

Gets or sets the category associated with this type.

context : pentaho.type.Context

Gets the context that defined this type class.

countMax : undefined | number | pentaho.type.PropertyDynamicAttribute.<number>

Gets or sets the maximum number of elements that properties of this type can have.

countMin : undefined | number | pentaho.type.PropertyDynamicAttribute.<number>

Gets or sets the minimum number of elements that properties of this type must have.

declaringType : pentaho.type.Complex.Type

Gets the complex type that declares this property type.

defaultView : string | function

Gets or sets the default view for instances of this type.

defaultViewClass : Promise.<>

Gets a promise for the default view class or factory, if any; or null.

description : nonEmptyString

Gets or sets the description of this type.

elemName : string

Gets the singular name of Property.Type list-elements.

elemType : pentaho.type.Element.Type

The base element type of the singular values that the property can hold.

hasDescendants : boolean

Gets a value that indicates if this type has any descendant types.

helpUrl : nonEmptyString

Gets or sets a URL pointing to documentation associated with this type.

id : nonEmptyString

Gets the identifier of this type.

index : number

Gets the index of the property in the containing complex type.

inheritedStyleClasses : Array.<string>

Gets the style classes of this and any base types.

instance : pentaho.type.Instance

Gets the prototype of the instances of this type.

isAbstract : boolean

Gets or sets a value that indicates if this type is abstract.

isAdvanced : boolean

Gets or sets the isAdvanced attribute of this type.

isApplicable : undefined | boolean | pentaho.type.PropertyDynamicAttribute.<boolean>

Gets or sets a value or function that indicates if properties of this type are applicable.

isBoundary : boolean

Gets or sets whether the property is a boundary property.

isBrowsable : boolean

Gets or sets the isBrowsable attribute of this type.

isComplex : boolean

Gets a value that indicates if this type is a complex type.

isContainer : boolean

Gets a value that indicates if this type is a list or a complex type.

isElement : boolean

Gets a value that indicates if this type is an element type.

isEnabled : undefined | boolean | pentaho.type.PropertyDynamicAttribute.<boolean>

Gets or sets a value, or function, that indicates if properties of this type can be changed by a user, in a user interface.

isList : boolean

Gets a value that indicates if the property is a list.

isProperty : boolean

Gets a value that indicates if this type is a property type.

isReadOnly : boolean

Gets or sets whether the value of properties of this type can be changed.

isRefinement : boolean

Gets a value that indicates if this type is a refinement type.

isRequired : undefined | boolean | pentaho.type.PropertyDynamicAttribute.<boolean>

Gets or sets a value that indicates if properties of this type are required.

isRoot : boolean

Gets a value that indicates if this type is the root of its type hierarchy.

isSimple : boolean

Gets a value that indicates if this type is a simple type.

isValue : boolean

Gets a value that indicates if this type is a value type.

key : string

Gets the key of the property.

keyName : string

Gets the singular name of Property.Type keys.

label : nonEmptyString

Gets or sets the label of this type.

name : nonEmptyString

Gets or sets the name of the property type.

nameAlias : nonEmptyString

Gets or sets the alias for the name of the property type.

ordinal : number

Gets or sets the ordinal associated with this type.

root : pentaho.type.Type

Gets the root type of this type hierarchy.

shortId : nonEmptyString

Gets the short identifier of this type.

sourceId : nonEmptyString

Gets the source module identifier of this type.

styleClass : nonEmptyString

Gets or sets the CSS class associated with this type.

type : pentaho.type.Value.Type

Gets or sets the type of value that properties of this type can hold.

uid : number

Gets the unique identifier of this type.

value : pentaho.type.Value

Gets or sets the default value of properties of this type.

Methods

Name Description
_fillSpecInContext(spec, keyArgs) : boolean
 
Protected

Fills the given specification with this type's attributes' local values, and returns whether any attribute was actually added.

_init(spec, keyArgs)
 
Protected

Performs initialization tasks that take place before the instance is extended with its spec.

_postInit(spec, keyArgs)
 
Protected

Performs initialization tasks that take place after the instance is extended with its specification.

buildSourceRelativeId(id) : string

Builds an absolute module identifier from one that is relative to the type's source location.

countRangeEval(owner) : pentaho.IRange.<number>

Evaluates the element count range of a property of this type on a given complex value.

create(instSpec, keyArgs) : pentaho.type.Instance

Creates an instance of this type, given an instance specification.

createAsync(instSpec, keyArgs) : Promise.<pentaho.type.Instance>

Creates an instance of this type, asynchronously, given an instance specification.

extendProto(typeSpec, keyArgs) : pentaho.type.Type

Creates a subtype of this one.

is(value) : boolean

Determines if a value is an instance of this type.

isSubtypeOf(superType) : boolean

Determines if this is a subtype of another.

to(value, keyArgs) : pentaho.type.Instance

Converts a value to an instance of this type, if it is not one already.

toJSON() : UJsonValue

Creates a JSON specification that describes this type.

toRef(keyArgs) : pentaho.type.spec.UTypeReference

Returns a reference to this type.

toRefInContext(keyArgs) : pentaho.type.spec.UTypeReference

Returns a reference to this type under a given specification context.

toSpec(keyArgs) : pentaho.type.spec.ITypeProto

Creates a specification that describes this type.

toSpecInContext(keyArgs) : pentaho.type.spec.ITypeProto

Creates a specification that describes this type.

toString() : string

Returns a textual representation suitable to identify this type in an error message.

toValue(valueSpec, noDefault) : pentaho.type.Value

Converts the given value or value specification to a value of this property's value type.

validate(owner) : Array.<!Error>

Determines if this property is valid in a given complex instance.

Constructor Details

new Type()
 
Static

Source: javascript/web/pentaho/type/filter/isEqual.js, line 28

Members Details

alias: nonEmptyString

Gets the alias for the identifier of this type.

The alias of a type can only be specified when extending the ancestor type.

This attribute is not inherited.

When unspecified, defaults to null.

Source: javascript/web/pentaho/type/_type.js, line 538

Overrides: pentaho.type.Property.Type#alias

See also:  pentaho.type.Type#id

ancestor: pentaho.type.Type

Gets the parent type in the current type hierarchy, if any, or null.

The root type returns null.

Source: javascript/web/pentaho/type/_type.js, line 234

Inherited From: pentaho.type.Type#ancestor

See also:  pentaho.type.Type#root , pentaho.type.Type#hasDescendants

application: object

Gets or sets the application attribute of this type.

The application property serves as a collection of properties specific to the container application that can be modified via the Configuration Service.

Setting this to a Nully value will have no effect.

Source: javascript/web/pentaho/type/_type.js, line 640

Inherited From: pentaho.type.Type#application

category: nonEmptyString

Gets or sets the category associated with this type.

The category is used primarily to group similar types (or instances of) in a user interface.

Attempting to set to a non-string value type implicitly converts the value to a string before assignment.

Setting this to undefined causes this attribute to use the inherited value, except for the root type, Instance.type (which has no ancestor), where the attribute is null.

Setting this to null or to an empty string clears the attribute and sets it to null, thus ignoring any inherited value.

Source: javascript/web/pentaho/type/_type.js, line 713

Inherited From: pentaho.type.Type#category

See also:  pentaho.type.Type#isBrowsable , pentaho.type.Type#ordinal

context: pentaho.type.Context

Gets the context that defined this type class.

Source: javascript/web/pentaho/type/_type.js, line 149

Inherited From: pentaho.type.Type#context

countMax: undefined | number | pentaho.type.PropertyDynamicAttribute.<number>

Gets or sets the maximum number of elements that properties of this type can have.

A non-negative integer.

Note that this attribute is taken together with the isRequired and the countMin attributes to determine the effective element count range of a property type.

This attribute is Dynamic

When a dynamic attribute is set to a function, it can evaluate to a different value for each complex instance.

When a dynamic attribute is set to a value other than a function or a Nully value, its value is the same for every complex instance.

This attribute is Monotonic

The value of a monotonic attribute can change, but only in some, predetermined monotonic direction.

In this case, a property type having a countMax of 5 can later be changed to have a countMax of 3. However, a property type having a countMax of 5 can no longer "go back" to have a greater countMax, like 7. The countMax attribute can only change to a lower value.

Because this attribute is also dynamic, the actual countMax values are only known when evaluated for specific complex instances. This behavior ensures that monotonic changes are deferred until evaluation. No errors are thrown; non-monotonic changes simply do not take any effect.

This attribute is Inherited

When there is no local value, the effective value of the attribute is the inherited effective value.

The first set local value must respect the monotonicity property with the inherited value.

Other characteristics

The value got by the attribute is the last set local, value, if any - a function, a constant value; or, undefined, when unset.

When set to a Nully value, the set operation is ignored.

When set and the property already has descendant properties, an error is thrown.

The default (root) countMax attribute value is Infinity.

Source: javascript/web/pentaho/type/property.js, line 1081

Inherited From: pentaho.type.Property.Type#countMax

See also:  pentaho.type.Complex#countRange , pentaho.type.spec.IPropertyTypeProto#countMax

countMin: undefined | number | pentaho.type.PropertyDynamicAttribute.<number>

Gets or sets the minimum number of elements that properties of this type must have.

A non-negative integer.

Note that this attribute is taken together with the isRequired attribute to determine the effective element count range of a property type.

This attribute is Dynamic

When a dynamic attribute is set to a function, it can evaluate to a different value for each complex instance.

When a dynamic attribute is set to a value other than a function or a Nully value, its value is the same for every complex instance.

This attribute is Monotonic

The value of a monotonic attribute can change, but only in some, predetermined monotonic direction.

In this case, a property type having a countMin of 1 can later be changed to have a countMin of 2. However, a property type having a countMin of 2 can no longer go back to have a lower countMin, like 0. The countMin attribute can only change to a greater value.

Because this attribute is also dynamic, the actual countMin values are only known when evaluated for specific complex instances. This behavior ensures that monotonic changes are deferred until evaluation. No errors are thrown; non-monotonic changes simply do not take effect.

This attribute is Inherited

When there is no local value, the effective value of the attribute is the inherited effective value.

The first set local value must respect the monotonicity property with the inherited value.

Other characteristics

The value got by the attribute is the last set local, value, if any - a function, a constant value or undefined, when unset.

When set to a Nully value, the set operation is ignored.

When set and the property already has descendant properties, an error is thrown.

The default (root) countMin attribute value is 0.

Source: javascript/web/pentaho/type/property.js, line 995

Inherited From: pentaho.type.Property.Type#countMin

See also:  pentaho.type.Complex#countRange , pentaho.type.spec.IPropertyTypeProto#countMin

declaringType: pentaho.type.Complex.Type

Gets the complex type that declares this property type.

Source: javascript/web/pentaho/type/property.js, line 225

Inherited From: pentaho.type.Property.Type#declaringType

defaultView: string | function

Gets or sets the default view for instances of this type.

When a string, it is the identifier of the view's AMD module. If the identifier is relative, it is relative to sourceId.

Setting this to undefined causes the default view to be inherited from the ancestor type, except for the root type, Instance.type (which has no ancestor), where the attribute is null.

Setting this to a falsy value (like null or an empty string), clears the value of the attribute and sets it to null, ignoring any inherited value.

When a function, it is the class or factory of the default view.

Source: javascript/web/pentaho/type/_type.js, line 981

Inherited From: pentaho.type.Type#defaultView

See also:  pentaho.type.Type#defaultViewClass , pentaho.type.Type#buildSourceRelativeId

defaultViewClass: Promise.<>

Gets a promise for the default view class or factory, if any; or null.

A default view exists if property pentaho.type.Type#defaultView has a non-null value.

Source: javascript/web/pentaho/type/_type.js, line 1031

Inherited From: pentaho.type.Type#defaultViewClass

See also:  pentaho.type.Type#defaultView

description: nonEmptyString

Gets or sets the description of this type.

Attempting to set to a non-string value type implicitly converts the value to a string before assignment.

Setting this to undefined causes this attribute to use the inherited value, except for the root type, Instance.type (which has no ancestor), where this attribute is null.

Setting this to null or to an empty string clears the attribute and sets it to null, ignoring any inherited value.

Source: javascript/web/pentaho/type/_type.js, line 669

Inherited From: pentaho.type.Type#description

Implements:
elemName: string

Gets the singular name of Property.Type list-elements.

Source: javascript/web/pentaho/type/property.js, line 191

Inherited From: pentaho.type.Property.Type#elemName

Default Value: "property"

elemType: pentaho.type.Element.Type

The base element type of the singular values that the property can hold.

When the property is a list property, that list type's element type, pentaho.type.List.Type#of, is returned.

Otherwise, pentaho.type.Property.type is returned.

Source: javascript/web/pentaho/type/property.js, line 359

Inherited From: pentaho.type.Property.Type#elemType

hasDescendants: boolean

Gets a value that indicates if this type has any descendant types.

Source: javascript/web/pentaho/type/_type.js, line 247

Inherited From: pentaho.type.Type#hasDescendants

See also:  pentaho.type.Type#ancestor

helpUrl: nonEmptyString

Gets or sets a URL pointing to documentation associated with this type.

Attempting to set to a non-string value type implicitly converts the value to a string before assignment.

Setting this to undefined causes this attribute to use the inherited value, except for the root type, Instance.type (which has no ancestor), where the attribute is null.

Setting this to null or to an empty string clears the attribute and sets it to null, ignoring any inherited value.

Source: javascript/web/pentaho/type/_type.js, line 753

Inherited From: pentaho.type.Type#helpUrl

id: nonEmptyString

Gets the identifier of this type.

The identifier of a type can only be specified when extending the ancestor type.

The identifier is only defined for types which have an associated AMD/RequireJS module. However, note that all have a pentaho.type.Type#uid.

This attribute is not inherited.

When unspecified, defaults to the value of sourceId.

Source: javascript/web/pentaho/type/_type.js, line 397

Overrides: pentaho.type.Property.Type#id

See also:  pentaho.type.Type#sourceId

index: number

Gets the index of the property in the containing complex type.

Source: javascript/web/pentaho/type/property.js, line 237

Inherited From: pentaho.type.Property.Type#index

inheritedStyleClasses: Array.<string>

Gets the style classes of this and any base types.

The returned array should not be modified.

Source: javascript/web/pentaho/type/_type.js, line 895

Inherited From: pentaho.type.Type#inheritedStyleClasses

instance: pentaho.type.Instance

Gets the prototype of the instances of this type.

Source: javascript/web/pentaho/type/_type.js, line 259

Inherited From: pentaho.type.Type#instance

isAbstract: boolean

Gets or sets a value that indicates if this type is abstract.

This attribute can only be set once, upon the type definition.

Source: javascript/web/pentaho/type/_type.js, line 572

Inherited From: pentaho.type.Type#isAbstract

Default Value: false

isAdvanced: boolean

Gets or sets the isAdvanced attribute of this type.

Types with isAdvanced attributes set to false are typically immediately accessible to the user. An advanced type typically escapes the expected flow of utilization, yet it is sufficiently relevant to be shown in a user interface.

Setting this to a Nully value causes this attribute to use the inherited value, except for the root type, Instance.type (which has no ancestor), where the attribute is false.

Source: javascript/web/pentaho/type/_type.js, line 828

Inherited From: pentaho.type.Type#isAdvanced

See also:  pentaho.type.Type#isBrowsable

isApplicable: undefined | boolean | pentaho.type.PropertyDynamicAttribute.<boolean>

Gets or sets a value or function that indicates if properties of this type are applicable.

When a property is not (currently) applicable, then it does not apply, as it does not make sense in a certain situation. It may only be applicable when another property of the complex type has a specific value, for example.

When a property is not currently applicable, its value is not significant and, as such, any validations concerning it are not performed.

This attribute is Dynamic

When a dynamic attribute is set to a function, it can evaluate to a different value for each complex instance.

When a dynamic attribute is set to a value other than a function or a Nully value, its value is the same for every complex instance.

This attribute is Monotonic

The value of a monotonic attribute can change, but only in some, predetermined monotonic direction.

In this case, a property type marked as applicable can later be marked as not applicable. However, a property type marked as not applicable can no longer go back to being applicable.

Because this attribute is also dynamic, the actual isApplicable values are only known when evaluated for specific complex instances. This behavior ensures that monotonic changes are deferred until evaluation. No errors are thrown; non-monotonic changes simply do not take any effect.

This attribute is Inherited

When there is no local value, the effective value of the attribute is the inherited effective value.

The first set local value must respect the monotonicity property with the inherited value.

Other characteristics

The value got by the attribute is the last set local, value, if any - a function, a constant value; or, undefined, when unset.

When set to a Nully value, the set operation is ignored.

When set and the property already has descendant properties, an error is thrown.

The default (root) isApplicable attribute value is true.

Source: javascript/web/pentaho/type/property.js, line 1163

Inherited From: pentaho.type.Property.Type#isApplicable

See also:  pentaho.type.Property.Type#isRequired , pentaho.type.Complex#isApplicable , pentaho.type.spec.IPropertyTypeProto#isApplicable

isBoundary: boolean

Gets or sets whether the property is a boundary property.

A boundary property identifies the limits of the aggregate of its declaring type.

If the value type is a list type, then this property sets its lists as boundary lists.

The validity of the object with a boundary property is not affected by the validity of the property's value (or values). Also, changes within its value(s) do not bubble through it.

Boundary properties do not cause their values to hold inverse references to the property holder. This means that, in objects connected by boundary properties, only the property holders prevent their values from being garbage collected, and not the other way round. On the contrary, non-boundary properties form object aggregates that can only be garbage-collected as a whole.

Get

The default value is false.

Set

Only a root property type can set its boundary attribute. When set on a non-root property type, an error is thrown.

When set and the root property already has descendant properties, an error is thrown.

When set to a Nully value, the set operation is ignored.

Otherwise, the set value is converted to boolean, by using Boolean.

Source: javascript/web/pentaho/type/property.js, line 683

Inherited From: pentaho.type.Property.Type#isBoundary

Default Value: false

isBrowsable: boolean

Gets or sets the isBrowsable attribute of this type.

Browsable types are exposed to the end user. Set this attribute to false to prevent exposing the type in a user interface.

Setting this to a Nully value causes this attribute to use the inherited value, except for the root type, Instance.type (which has no ancestor), where the attribute is true.

Source: javascript/web/pentaho/type/_type.js, line 790

Inherited From: pentaho.type.Type#isBrowsable

isComplex: boolean

Gets a value that indicates if this type is a complex type.

Source: javascript/web/pentaho/type/_type.js, line 356

Inherited From: pentaho.type.Type#isComplex

isContainer: boolean

Gets a value that indicates if this type is a list or a complex type.

Source: javascript/web/pentaho/type/_type.js, line 308

Inherited From: pentaho.type.Type#isContainer

isElement: boolean

Gets a value that indicates if this type is an element type.

Source: javascript/web/pentaho/type/_type.js, line 332

Inherited From: pentaho.type.Type#isElement

isEnabled: undefined | boolean | pentaho.type.PropertyDynamicAttribute.<boolean>

Gets or sets a value, or function, that indicates if properties of this type can be changed by a user, in a user interface.

A property should be set disabled whenever its value is implied/imposed somehow, and thus cannot be changed directly by the user through a user interface.

This attribute is Dynamic

When a dynamic attribute is set to a function, it can evaluate to a different value for each complex instance.

When a dynamic attribute is set to a value other than a function or a Nully value, its value is the same for every complex instance.

This attribute is Monotonic

The value of a monotonic attribute can change, but only in some, predetermined monotonic direction.

In this case, a property type marked as enabled can later be marked as not enabled. However, a property type marked as not enabled can no longer go back to being enabled.

Because this attribute is also dynamic, the actual isEnabled values are only known when evaluated for specific complex instances. This behavior ensures that monotonic changes are deferred until evaluation. No errors are thrown; non-monotonic changes simply do not take any effect.

This attribute is Inherited

When there is no local value, the effective value of the attribute is the inherited effective value.

The first set local value must respect the monotonicity property with the inherited value.

Other characteristics

The value got by the attribute is the last set local, value, if any - a function, a constant value; or, undefined, when unset.

When set to a Nully value, the set operation is ignored.

When set and the property already has descendant properties, an error is thrown.

The default (root) isEnabled attribute value is true.

Source: javascript/web/pentaho/type/property.js, line 1243

Inherited From: pentaho.type.Property.Type#isEnabled

See also:  pentaho.type.Complex#isEnabled , pentaho.type.spec.IPropertyTypeProto#isEnabled

isList: boolean

Gets a value that indicates if the property is a list.

A property is a list property if its value type is a list type, that is, if it is or extends List.

Source: javascript/web/pentaho/type/property.js, line 339

Inherited From: pentaho.type.Property.Type#isList

isProperty: boolean

Gets a value that indicates if this type is a property type.

Source: javascript/web/pentaho/type/_type.js, line 295

Inherited From: pentaho.type.Type#isProperty

isReadOnly: boolean

Gets or sets whether the value of properties of this type can be changed.

If the value type is a list type, then this property effectively makes the list read-only.

Get

The default read-only value is the inherited read-only value.

A root property type has a default read-only value of false.

Set

When set and the property already has descendant properties, an error is thrown.

When set to a Nully value, the set operation is ignored.

Otherwise, the set value is converted to boolean, by using Boolean.

This property is monotonic. Once set to true, it can no longer be set to false.

Source: javascript/web/pentaho/type/property.js, line 618

Inherited From: pentaho.type.Property.Type#isReadOnly

isRefinement: boolean

Gets a value that indicates if this type is a refinement type.

Source: javascript/web/pentaho/type/_type.js, line 344

Inherited From: pentaho.type.Type#isRefinement

isRequired: undefined | boolean | pentaho.type.PropertyDynamicAttribute.<boolean>

Gets or sets a value that indicates if properties of this type are required.

When a property is of a required property type, it is considered invalid if its value (in a complex instance) is null; or, in the case of a list property type, it has zero elements.

Note that this attribute is taken together with the countMin attribute to determine the effective element count range of a property type.

This attribute is Dynamic

When a dynamic attribute is set to a function, it can evaluate to a different value for each complex instance.

When a dynamic attribute is set to a value other than a function or a Nully value, its value is the same for every complex instance.

This attribute is Monotonic

The value of a monotonic attribute can change, but only in some, predetermined monotonic direction.

In this case, a property type marked as not required can later be marked as required. However, a property type marked as required can no longer go back to being not required.

Because this attribute is also dynamic, the actual required values are only known when evaluated for specific complex instances. This behavior ensures that monotonic changes are deferred until evaluation. No errors are thrown; non-monotonic changes simply do not take effect.

This attribute is Inherited

When there is no local value, the effective value of the attribute is the inherited effective value.

The first set local value must respect the monotonicity property with the inherited value.

Other characteristics

The value got by the attribute is the last set local, value, if any - a function, a constant value or undefined, when unset.

When set to a Nully value, the set operation is ignored.

When set and the property already has descendant properties, an error is thrown.

The default (root) isRequired attribute value is false.

Source: javascript/web/pentaho/type/property.js, line 906

Inherited From: pentaho.type.Property.Type#isRequired

See also:  pentaho.type.Complex#isRequired , pentaho.type.spec.IPropertyTypeProto#isRequired

isRoot: boolean

Gets a value that indicates if this type is the root of its type hierarchy.

Source: javascript/web/pentaho/type/_type.js, line 218

Inherited From: pentaho.type.Type#isRoot

See also:  pentaho.type.Type#root

isSimple: boolean

Gets a value that indicates if this type is a simple type.

Source: javascript/web/pentaho/type/_type.js, line 368

Inherited From: pentaho.type.Type#isSimple

isValue: boolean

Gets a value that indicates if this type is a value type.

Source: javascript/web/pentaho/type/_type.js, line 283

Inherited From: pentaho.type.Type#isValue

Implements:
key: string

Gets the key of the property.

The key of a property is its name.

Source: javascript/web/pentaho/type/property.js, line 210

Inherited From: pentaho.type.Property.Type#key

Implements:
keyName: string

Gets the singular name of Property.Type keys.

Source: javascript/web/pentaho/type/property.js, line 200

Inherited From: pentaho.type.Property.Type#keyName

Default Value: "name"

label: nonEmptyString

Gets or sets the label of this type.

When set to a non-Nully and non-String value, the value is first replaced by the result of calling its toString method.

When set to an empty string or a nully value, the attribute value is reset.

When reset, the attribute assumes its default value (except on the top-root type, Instance.type, in which case it has no effect).

The default value is the inherited value.

The initial value of the attribute on the top-root type is "instance".

Source: javascript/web/pentaho/type/_type.js, line 604

Inherited From: pentaho.type.Type#label

name: nonEmptyString

Gets or sets the name of the property type.

The name of a property type identifies it within its declaring type.

Set

This attribute must be set when defining a new property type, and cannot be changed afterwards.

When set to a non-Nully and non-String value, the value is first replaced by the result of calling its toString method.

Source: javascript/web/pentaho/type/property.js, line 266

Inherited From: pentaho.type.Property.Type#name

See also:  pentaho.type.spec.IPropertyTypeProto#name

nameAlias: nonEmptyString

Gets or sets the alias for the name of the property type.

The alias for the name of a property type is an alternative identifier for serialization purposes.

Set

This attribute can only be set when defining a new property type, and cannot be changed afterwards.

When set to a non-Nully and non-String value, the value is first replaced by the result of calling its toString method.

Source: javascript/web/pentaho/type/property.js, line 312

Inherited From: pentaho.type.Property.Type#nameAlias

See also:  pentaho.type.spec.IPropertyTypeProto#nameAlias

ordinal: number

Gets or sets the ordinal associated with this type.

The ordinal is used to disambiguate the order with which a type (or an instance of it) is shown in a user interface.

Setting this to a Nully value causes this attribute to use the inherited value, except for the root type, Instance.type (which has no ancestor), where the attribute is 0.

Source: javascript/web/pentaho/type/_type.js, line 929

Inherited From: pentaho.type.Type#ordinal

See also:  pentaho.type.Type#isBrowsable , pentaho.type.Type#category

root: pentaho.type.Type

Gets the root type of this type hierarchy.

Even though the ultimate type root of types defined in this system is Instance, the system is designed to represent multiple type hierarchies, each representing concrete, more meaningful concepts.

When deriving a type from Instance, it can be marked as the root of a type hierarchy, by specifying the isRoot keyword argument to extend.

Typically, root types are immediate subtypes of Instance. However, this is not enforced and it is up to the developer to decide at what level a practical, meaningful type root arises.

For example, Value is the root of value types. However, Property, also an immediate subtype of Instance, is not considered a root type. It is the immediate subtypes of Property (each root property within a complex type) which are considered roots. This aligns with users expectations of what an attribute named root in a property type should mean.

Source: javascript/web/pentaho/type/_type.js, line 175

Inherited From: pentaho.type.Type#root

See also:  pentaho.type.Type#isRoot , pentaho.type.Type#ancestor

shortId: nonEmptyString

Gets the short identifier of this type.

The short identifier of a type is equal to its alias, provided it is defined. Otherwise, it is equal to the identifier.

Source: javascript/web/pentaho/type/_type.js, line 472

Inherited From: pentaho.type.Type#shortId

See also:  pentaho.type.Type#id , pentaho.type.Type#alias

sourceId: nonEmptyString

Gets the source module identifier of this type.

The source identifier is the module identifier of the actual AMD/RequireJS module that provides the type and may be different from the identifier when an AMD package or custom mapping is configured for the module.

The source identifier is used to resolve module identifiers relative to the source module, as is the case with the pentaho.type.Type#defaultView attribute.

The source identifier of a type can only be specified when extending the ancestor type.

This attribute is not inherited.

When unspecified, defaults to the value of id.

Source: javascript/web/pentaho/type/_type.js, line 442

Inherited From: pentaho.type.Type#sourceId

See also:  pentaho.type.Type#id , pentaho.type.Type#defaultView

styleClass: nonEmptyString

Gets or sets the CSS class associated with this type.

This attribute is typically used to associate an icon with a type.

Attempting to set to a non-string value type implicitly converts the value to a string before assignment.

An empty string or null clears the property value.

Setting to undefined, makes the property assume its default value.

The default value of a type with an id is the identifier converted to snake-case, plus special characters like \, /, _ and spaces are converted to: a dash (). For example: "pentaho/visual/models/heatGrid" would have a default styleClass of: "pentaho-visual-ccc-heat-grid". The default value of an anonymous type is null.

Source: javascript/web/pentaho/type/_type.js, line 875

Inherited From: pentaho.type.Type#styleClass

type: pentaho.type.Value.Type

Gets or sets the type of value that properties of this type can hold.

If the value type is a list type, then this property will be a list (or multiple-elements) property; otherwise, this property will be an element (or single-element) property.

Get

The default value type is the inherited value type.

A root property type has a default value type of string.

Set

When set and the property already has descendant properties, an error is thrown.

When set to a Nully value, the set operation is ignored.

Otherwise, the set value is assumed to be an spec.UTypeReference and is first resolved using this.context.get.

When set to a value type that is not a subtype of the attribute's current value type, an error is thrown.

Relation to value attribute

When set and the value attribute is locally set, it is checked against the new value type, and set to null, if it's not an instance of it.

Source: javascript/web/pentaho/type/property.js, line 410

Inherited From: pentaho.type.Property.Type#type

See also:  pentaho.type.spec.IPropertyTypeProto#type

uid: number

Gets the unique identifier of this type.

Unique type identifiers are auto-generated in each session.

Note that even anonymous types (those whose pentaho.type.Type#id is null) have a unique identifier.

This attribute is not inherited.

Source: javascript/web/pentaho/type/_type.js, line 169

Inherited From: pentaho.type.Type#uid

value: pentaho.type.Value

Gets or sets the default value of properties of this type.

The default value is the "prototype" value that properties of this type take, on complex instances, when the property is unspecified or specified as a Nully value. A cloned value is used each time.

The value null is a valid default value.

Get

When got and the default value (local or inherited) is not an instance of the value type (local or inherited), null is returned.

Set

When set and the property already has descendant properties, an error is thrown.

When set to null, it is respected.

When set to the control value undefined, the attribute value is reset, causing it to assume its default value (yes, the default value of the default value attribute...):

  • for root property types, the default value is null
  • for non-root property types, the default value is the inherited value, if it is an instance of the property type's value type; or, null, otherwise.

When set to any other value, it is first converted to the property type's value type, using its Value.Type#to method. The conversion may be impossible and thus an error may be thrown.

Source: javascript/web/pentaho/type/property.js, line 493

Inherited From: pentaho.type.Property.Type#value

See also:  pentaho.type.spec.IPropertyTypeProto#value

Methods Details

_fillSpecInContext(spec, keyArgs) : boolean
 
Protected

Fills the given specification with this type's attributes' local values, and returns whether any attribute was actually added.

This method requires that there currently exists an ambient specification context.

This method does not add the special id and base attributes to the specification.

Source: javascript/web/pentaho/type/_type.js, line 1463

Inherited From: pentaho.type.Type#_fillSpecInContext

Parameters:
Name Default Value Summary
spec : Object

The specification to be filled.

keyArgs : Object
 
Optional

The keyword arguments object. Passed to every type and instance serialized within this scope.

Please see the documentation of subclasses for information on additional, supported keyword arguments.

Returns:
Name Description
boolean

Returns true if any attribute was added; false, otherwise.

See also:  pentaho.type.Instance#toSpecInContext

_init(spec, keyArgs)
 
Protected

Performs initialization tasks that take place before the instance is extended with its spec.

Source: javascript/web/pentaho/type/property.js, line 143

Inherited From: pentaho.type.Property.Type#_init

Parameters:
Name Default Value Summary
spec : pentaho.type.spec.UPropertyTypeProto

A property name or specification object.

keyArgs : Object

Keyword arguments.

Parameters:
Name Default Value Summary
declaringType : pentaho.type.Complex.Type

The complex type that declares the property.

index : number

The index of the property within its complex type.

_postInit(spec, keyArgs)
 
Protected

Performs initialization tasks that take place after the instance is extended with its specification.

This method is typically overridden to validate the values of the attributes.

The default implementation does nothing.

Source: javascript/web/pentaho/type/_type.js, line 128

Inherited From: pentaho.type.Type#_postInit

Parameters:
Name Default Value Summary
spec : Object

The specification of this type.

keyArgs : Object

Keyword arguments.

buildSourceRelativeId(id) : string

Builds an absolute module identifier from one that is relative to the type's source location.

Relative module identifiers start with a . and do not end with ".js". For example, "./view" and "../view", but not ./view.js.

Absolute identifiers are returned without modification.

Source: javascript/web/pentaho/type/_type.js, line 491

Inherited From: pentaho.type.Type#buildSourceRelativeId

Parameters:
Name Default Value Summary
id : string

A module identifier.

Returns:
Name Description
string

An absolute module identifier.

See also:  pentaho.type.Type#sourceId

countRangeEval(owner) : pentaho.IRange.<number>

Evaluates the element count range of a property of this type on a given complex value.

The element count range is a conciliation of the effective value of the following attributes:

The logic can be best explained by the following simple example function:

function evaluateRange(isList, isRequiredEf, countMinEf, countMaxEf) {
  var min = countMinEf;
  var max = countMaxEf;

  if(!isList && min > 1) min = 1;
  if(!isList && max > 1) max = 1;

  if(isRequiredEf && min < 1) min = 1;

  if(max < min) max = min;

  return {min: min, max};
}

When the property is not a list property, then both the minimum and maximum values can only be either zero or one.

If isRequired is true, then the minimum must be greater than or equal to one.

The countMax value is constrained to be greater than or equal to the minimum.

Source: javascript/web/pentaho/type/property.js, line 1351

Inherited From: pentaho.type.Property.Type#countRangeEval

Parameters:
Name Default Value Summary
owner : pentaho.type.Complex

The complex value that owns a property of this type.

Returns:
Name Description
pentaho.IRange.<number>

The evaluated element count range.

See also:  pentaho.type.Complex#countRange

create(instSpec, keyArgs) : pentaho.type.Instance

Creates an instance of this type, given an instance specification.

If the instance specification contains an inline type reference, in property "_", the referenced type is used to create the instance (as long as it is a subtype of this type).

If the specified instance specification does not contain an inline type reference, the type is assumed to be this type.

Source: javascript/web/pentaho/type/_type.js, line 1189

Inherited From: pentaho.type.Type#create

Parameters:
Name Default Value Summary
instSpec : pentaho.type.spec.UInstance
 
Optional

An instance specification.

keyArgs : Object
 
Optional

The keyword arguments passed to the instance constructor.

Returns:
Name Description
pentaho.type.Instance

The created instance.

Throws:
Name Description
pentaho.lang.OperationInvalidError

When instSpec contains an inline type reference that refers to a type that is not a subtype of this one.

Error

When instSpec contains an inline type reference which is not defined as a module in the AMD module system (specified directly in instSpec, or present in an generic type specification).

Error

When instSpec contains an inline type reference which is from a module that the AMD module system has not loaded yet.

pentaho.lang.OperationInvalidError

When the determined type for the specified instSpec is an abstract type.

See also:  pentaho.type.Type#createAsync , pentaho.type.Type#isSubtypeOf , pentaho.type.Context#get

Examples

Create a complex instance from a specification that contains the type inline.

require(["pentaho/type/Context"], function(Context) {

 var context = new Context({application: "data-explorer-101"});
 var Value = context.get("value");

 var product = Value.type.create({
 _: {
 props: ["id", "name", {name: "price", type: "number"}]
 },

 id: "mpma",
 name: "Principia Mathematica",
 price: 1200
 });

 // ...

});

Create a list instance from a specification that contains the type inline.

require(["pentaho/type/Context"], function(Context) {

 var context = new Context({application: "data-explorer-101"});
 var Value = context.get("value");

 var productList = Value.type.create({
 _: [{
 props: ["id", "name", {name: "price", type: "number"}]
 }],

 d: [
 {id: "mpma", name: "Principia Mathematica", price: 1200},
 {id: "flot", name: "The Laws of Thought", price: 500}
 ]
 });

 // ...

});

Create an instance from a specification that does not contain the type inline.

require(["pentaho/type/Context"], function(Context) {

 var context = new Context({application: "data-explorer-101"});
 var ProductList = context.get([{
 props: [
 "id",
 "name",
 {name: "price", type: "number"}
 ]
 }]);

 // Provide the default type, in case the instance spec doesn't provide one.
 var productList = ProductList.type.create(
 [
 {id: "mpma", name: "Principia Mathematica", price: 1200},
 {id: "flot", name: "The Laws of Thought", price: 500}
 ]);

 // ...

});
createAsync(instSpec, keyArgs) : Promise.<pentaho.type.Instance>

Creates an instance of this type, asynchronously, given an instance specification.

If the instance specification contains an inline type reference, in property "_", the referenced type is used to create the instance (as long as it is a subtype of this type).

If the specified instance specification does not contain an inline type reference, the type is assumed to be this type.

Source: javascript/web/pentaho/type/_type.js, line 1258

Inherited From: pentaho.type.Type#createAsync

Parameters:
Name Default Value Summary
instSpec : pentaho.type.spec.UInstance
 
Optional

An instance specification.

keyArgs : Object
 
Optional

The keyword arguments passed to create.

Returns:
Name Description
Promise.<pentaho.type.Instance>

A promise to the created instance.

See also:  pentaho.type.Type#create , pentaho.type.Type#isSubtypeOf , pentaho.type.Context#get

extendProto(typeSpec, keyArgs) : pentaho.type.Type

Creates a subtype of this one.

This method creates a subtype that does not have own instance or type constructors. The base type's instance and type constructors are used to initialize instances and the type.

To create a type with own constructors, extend from the base instance constructor instead, by calling its extend method.

Source: javascript/web/pentaho/type/_type.js, line 1055

Inherited From: pentaho.type.Type#extendProto

Parameters:
Name Default Value Summary
typeSpec : object
 
Optional

The new type specification.

keyArgs : object
 
Optional

Keyword arguments.

Returns:
Name Description
pentaho.type.Type

The created subtype.

is(value) : boolean

Determines if a value is an instance of this type.

Source: javascript/web/pentaho/type/_type.js, line 1326

Inherited From: pentaho.type.Type#is

Parameters:
Name Default Value Summary
value : any

The value to test.

Returns:
Name Description
boolean

true if the value is an instance of this type; false, otherwise.

isSubtypeOf(superType) : boolean

Determines if this is a subtype of another.

A type is considered a subtype of itself.

Source: javascript/web/pentaho/type/_type.js, line 1338

Inherited From: pentaho.type.Type#isSubtypeOf

Parameters:
Name Default Value Summary
superType : pentaho.type.Type

The candidate super-type.

Returns:
Name Description
boolean

true if this is a subtype of superType type; false, otherwise.

to(value, keyArgs) : pentaho.type.Instance

Converts a value to an instance of this type, if it is not one already.

If a Nully value is specified, null is returned.

Otherwise, if a given value is not already an instance of this type (checked using is), this method delegates the creation of an instance to create.

Source: javascript/web/pentaho/type/_type.js, line 1359

Inherited From: pentaho.type.Type#to

Parameters:
Name Default Value Summary
value : any

The value to convert.

keyArgs : Object
 
Optional

The keyword arguments passed to create, when a new instance is created.

Returns:
Name Description
pentaho.type.Instance | null

The converted value or null.

toJSON() : UJsonValue

Creates a JSON specification that describes this type.

Attributes which do not have a JSON-compatible specification are omitted. Specifically, attributes with a function value are not supported.

This method simply calls pentaho.type.Instance#toSpec with argument keyArgs.isJson as true and exists for seamless integration with JavaScript's JSON.stringify method.

Source: javascript/web/pentaho/type/_type.js, line 1438

Inherited From: pentaho.type.Type#toJSON

Returns:
Name Description
UJsonValue

A JSON-compatible specification.

See also:  pentaho.type.Instance#toSpec

toRef(keyArgs) : pentaho.type.spec.UTypeReference

Returns a reference to this type.

This method returns a reference to this type that is appropriate to be the value of an inline type property that is included on a specification of an instance of this type.

If an ambient specification context, currently exists, it is used to manage the serialization process. Otherwise, one is created and set as current.

When a type is not anonymous, the id is returned.

For anonymous types, a temporary, serialization-only identifier is generated. In the first occurrence in the given scope, that identifier is returned, within a full specification of the type, obtained by calling toSpecInContext. In following occurrences, only the previously used temporary identifier is returned.

Some standard types have a special reference syntax. For example: List.Type#toRef.

Source: javascript/web/pentaho/type/_type.js, line 1539

Inherited From: pentaho.type.Type#toRef

Parameters:
Name Default Value Summary
keyArgs : Object
 
Optional

The keyword arguments object. Passed to every type and instance serialized within this scope.

Please see the documentation of subclasses for information on additional, supported keyword arguments.

Returns:
Name Description
pentaho.type.spec.UTypeReference

A reference to this type.

See also:  pentaho.type.Type#toSpec

toRefInContext(keyArgs) : pentaho.type.spec.UTypeReference

Returns a reference to this type under a given specification context.

This method requires that there currently exists an ambient specification context.

Source: javascript/web/pentaho/type/_type.js, line 1559

Inherited From: pentaho.type.Type#toRefInContext

Parameters:
Name Default Value Summary
keyArgs : Object
 
Optional

The keyword arguments object. Passed to every type and instance serialized within this scope.

Please see the documentation of subclasses for information on additional, supported keyword arguments.

Returns:
Name Description
pentaho.type.spec.UTypeReference

A reference to this type.

See also:  pentaho.type.Type#toRef

toSpec(keyArgs) : pentaho.type.spec.ITypeProto

Creates a specification that describes this type.

If an ambient specification context, currently exists, it is used to manage the serialization process. Otherwise, one is created and set as current.

This method creates a new pentaho.type.SpecificationScope for describing this type, and any other instances and types it references, and then delegates the actual work to pentaho.type.Type#toSpecInContext.

Source: javascript/web/pentaho/type/_type.js, line 1390

Inherited From: pentaho.type.Type#toSpec

Parameters:
Name Default Value Summary
keyArgs : Object
 
Optional

The keyword arguments object. Passed to every type and instance serialized within this scope.

Please see the documentation of subclasses for information on additional, supported keyword arguments.

Parameters:
Name Default Value Summary
isJson : boolean
 
Optional
false

Generates a JSON-compatible specification. Attributes that do not have a JSON-compatible specification are omitted.

Returns:
Name Description
pentaho.type.spec.ITypeProto

A specification of this type.

See also:  pentaho.type.Type#toSpecInContext , pentaho.type.Type#_fillSpecInContext

toSpecInContext(keyArgs) : pentaho.type.spec.ITypeProto

Creates a specification that describes this type.

This method requires that there currently exists an ambient specification context.

The default implementation returns a plain object with the identifier of the type and any other specified attributes (like label or description).

Source: javascript/web/pentaho/type/_type.js, line 1413

Inherited From: pentaho.type.Type#toSpecInContext

Parameters:
Name Default Value Summary
keyArgs : Object
 
Optional

The keyword arguments object. Passed to every type and instance serialized within this scope.

Please see the documentation of subclasses for information on additional, supported keyword arguments.

Returns:
Name Description
pentaho.type.spec.ITypeProto

A specification of this type.

See also:  pentaho.type.Type#toSpec

toString() : string

Returns a textual representation suitable to identify this type in an error message.

Source: javascript/web/pentaho/type/_type.js, line 1570

Inherited From: pentaho.type.Type#toString

Returns:
Name Description
string

A textual representation.

toValue(valueSpec, noDefault) : pentaho.type.Value

Converts the given value or value specification to a value of this property's value type.

If the given value is already an instance of the property's value type, it is returned.

By default, a Nully value is converted to (a clone of) the property's default value, pentaho.type.Property.Type#value.

Source: javascript/web/pentaho/type/property.js, line 529

Inherited From: pentaho.type.Property.Type#toValue

Parameters:
Name Default Value Summary
valueSpec : any

A value or value specification.

noDefault : boolean
 
Optional
false

Indicates if Nully values should not be converted to the property's default value.

Returns:
Name Description
pentaho.type.Value | null

A value.

validate(owner) : Array.<!Error>

Determines if this property is valid in a given complex instance.

This method first ensures the value of the property is consistent with its type. Afterwards, the cardinality is verified against the attributes pentaho.type.Property.Type#countMin and pentaho.type.Property.Type#countMax.

Source: javascript/web/pentaho/type/property.js, line 743

Inherited From: pentaho.type.Property.Type#validate

Parameters:
Name Default Value Summary
owner : pentaho.type.Complex

The complex value that owns the property.

Returns:
Name Description
Array.<!Error> | null

A non-empty array of Error or null.

See also:  pentaho.type.Complex#validate