Skip to main content
Pentaho Documentation

PropertyType

pentaho.visual.role. PropertyType

The type class of pentaho.visual.role.Property.

Extends

Constructor

Name Description
new PropertyType()

Members

Name Description
_isLabelSet :  boolean
Protected

Gets a value that indicates if the label is locally set.

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.

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

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

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

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

declaringType :  pentaho.type.ComplexType

Gets the complex type that declares this property type.

defaultValue :  pentaho.type.Value | pentaho.type.spec.PropertyDynamicAttribute.<?pentaho.type.spec.Value>

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

description :  nonEmptyString

Gets or sets the description of this type.

domain :  undefined | Array.<pentaho.type.Element> | pentaho.type.spec.PropertyDynamicAttribute.<Array.<pentaho.type.Element>>

Gets or sets the list of valid values (or a function that evaluates to these) of properties of this type.

domainOn

Evaluates the value of the domain attribute of a property of this type on a given owner complex value.

elementType :  pentaho.type.Type

Gets the element type of this type.

elemName :  string

Gets the singular name of PropertyType list-elements.

fields :  pentaho.visual.role.IFieldsConstraints

Gets or updates the metadata about the fields property of mappings of this visual role property.

hasAnyCategoricalModes :  boolean

Gets a value that indicates if the visual role has any categorical modes.

hasAnyContinuousModes :  boolean

Gets a value that indicates if the visual role has any continuous modes.

hasAnyListModes :  boolean

Gets a value that indicates if the visual role has any list modes.

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.

instance :  pentaho.type.Instance

Gets the prototype of the instances of this type.

isAbstract :  boolean

Gets 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.spec.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.

isContinuous :  boolean

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

isElement :  boolean

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

isEnabled :  undefined | boolean | pentaho.type.spec.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.

isReadOnly :  boolean

Gets whether the value of properties of this type cannot be changed, from the outside.

isRequired :  undefined | boolean | pentaho.type.spec.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.

isVisualKey :  boolean

Gets or sets a value that indicates if the visual role is a key property of the visual space.

isVisualKeyEffective :  boolean | undefined

Gets a value that indicates if the visual role is effectively a visual key.

key :  string

Gets the key of the property.

keyName :  string

Gets the singular name of PropertyType keys.

label :  nonEmptyString

Gets or sets the label of this type.

mixins :  Array.<pentaho.type.Type>

Gets or sets the mixin types that are locally mixed into this type.

modes :  pentaho.type.List.<pentaho.visual.role.Mode>

Gets or sets the array of modes of operation supported by the visual role.

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.

uid :  number

Gets the unique identifier of this type.

valueType :  pentaho.type.ValueType

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

Methods

Name Description
__assertValueTypeReadOnlyConsistent(valueType)

Asserts that a given value type is consistent with the isReadOnly status of the declaring type.

__setValueType(value)

Sets the value type of the property.

_assertNoSubtypesAttribute(attributeName)
Protected

Asserts that the type has no subtypes and that as such the given attribute can be set.

_collectElementValidators(addValidator, owner, value)
Protected

Called each time a property value is validated to collect the list of element validators.

_getLabelDefault() : string
Protected

Gets the default label of the property.

_init(spec, keyArgs) : object
Protected

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

_validateValueOn(owner, value) : pentaho.type.ValidationError | Array.<pentaho.type.ValidationError>
Protected

Validates the given non-null value in the context of this property.

countMaxOn(owner) : number

Evaluates the value of the countMax attribute of a property of this type on a given complex value.

countMinOn(owner) : number

Evaluates the value of the countMin attribute of a property of this type on a given complex value.

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

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

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

Creates or resolves an instance of this type given an instance reference.

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

Creates or resolves an instance of this type, asynchronously, given an instance reference.

defaultValueOn(owner) : pentaho.type.Value

Gets a default value for use in a given Complex instance.

getModeEffectiveOn(model) : pentaho.visual.role.Mode

Determines the effective operation mode of the visual role on the given visual model.

hasAnyModes(keyArgs) : boolean

Gets a value that indicates if the visual role has any modes having the specified properties.

is(value) : boolean

Determines if a value is an instance of this type.

isApplicableOn(owner) : boolean

Evaluates the value of the isApplicable attribute of a property of this type on a given owner complex value.

isEnabledOn(owner) : boolean

Evaluates the value of the isEnabled attribute of a property of this type on a given owner complex value.

isRequiredOn(owner) : boolean

Evaluates the value of the isRequired attribute of a property of this type on a given complex value.

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() : JsonValue

Creates a JSON specification that describes this type.

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

Creates a specification that describes this type.

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

Creates a specification that describes this type.

toString() : string

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

toValueOn(defaultValueOwner, valueSpec) : pentaho.type.Value

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

validateOn(model) : Array.<pentaho.type.ValidationError>

Determines if this visual role is valid on the given visualization model.

Constructor Details

new PropertyType()

Source: javascript/web/pentaho/visual/role/Property.js, line 37

Members Details

_isLabelSet:  boolean
Protected

Gets a value that indicates if the label is locally set.

Source: javascript/web/pentaho/type/InstanceType.js, line 652

Inherited From: pentaho.type.Type#_isLabelSet

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/InstanceType.js, line 515

Inherited From: pentaho.type.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/InstanceType.js, line 265

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/InstanceType.js, line 670

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/InstanceType.js, line 739

Inherited From: pentaho.type.Type#category

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

countMax:  undefined | number | pentaho.type.spec.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 1258

Inherited From: pentaho.type.PropertyType#countMax

See also: pentaho.type.Complex#countRangeOf , pentaho.type.spec.IPropertyType#countMax

countMin:  undefined | number | pentaho.type.spec.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 1171

Inherited From: pentaho.type.PropertyType#countMin

See also: pentaho.type.Complex#countRangeOf , pentaho.type.spec.IPropertyType#countMin

declaringType:  pentaho.type.ComplexType

Gets the complex type that declares this property type.

Source: javascript/web/pentaho/type/Property.js, line 246

Inherited From: pentaho.type.PropertyType#declaringType

defaultValue:  pentaho.type.Value | pentaho.type.spec.PropertyDynamicAttribute.<?pentaho.type.spec.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.

The value null is a valid default value.

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.

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 or properties with a locally specified valueType, the default value is null
  • for other property types, the default value is the inherited value.

When set to a function, it is accepted. For each complex instance, the function is evaluated and its result converted to the property type's valueType, using its ValueType#to method. The conversion may be impossible and thus an error may be thrown.

When set to any other value, it is immediately converted to the property type's valueType.

Source: javascript/web/pentaho/type/Property.js, line 583

Inherited From: pentaho.type.PropertyType#defaultValue

See also: pentaho.type.spec.IPropertyType#defaultValue

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/InstanceType.js, line 699

Inherited From: pentaho.type.Type#description

domain:  undefined | Array.<pentaho.type.Element> | pentaho.type.spec.PropertyDynamicAttribute.<Array.<pentaho.type.Element>>

Gets or sets the list of valid values (or a function that evaluates to these) of properties of this 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, 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, the list of valid values can only be successfully reduced.

When the valueType is an enumeration, the initial list of valid values is its domain.

Because this attribute is also dynamic, the actual domain 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.

When the valueType is an enumeration, the values intersection preserves those which have a formatted value. When both instances have a formatted value, the one specified last wins.

The last specified domain determines the order.

Source: javascript/web/pentaho/type/mixins/DiscreteDomain.js, line 80

Inherited From: pentaho.type.PropertyType#domain

See also: pentaho.type.Complex#domainOf , pentaho.type.mixins.spec.IDiscreteDomainType#domain

domainOn:

Evaluates the value of the domain attribute of a property of this type on a given owner complex value.

Source: javascript/web/pentaho/type/mixins/DiscreteDomain.js, line 68

Inherited From: pentaho.type.mixins.DiscreteDomainType#domainOn

See also: pentaho.type.PropertyType#domain

elementType:  pentaho.type.Type

Gets the element type of this type.

If this type is a list type, returns its of attribute. Otherwise, this type is an element type, and it returns itself.

Source: javascript/web/pentaho/type/InstanceType.js, line 420

Inherited From: pentaho.type.Type#elementType

See also: pentaho.type.Type#isList , pentaho.type.Type#isElement , pentaho.type.ListType#of

Implements:
elemName:  string

Gets the singular name of PropertyType list-elements.

Source: javascript/web/pentaho/type/Property.js, line 209

Inherited From: pentaho.type.PropertyType#elemName

Default Value: "property"

fields:  pentaho.visual.role.IFieldsConstraints

Gets or updates the metadata about the fields property of mappings of this visual role property.

Source: javascript/web/pentaho/visual/role/Property.js, line 319

Overrides: pentaho.visual.role.AbstractPropertyType#fields

hasAnyCategoricalModes:  boolean

Gets a value that indicates if the visual role has any categorical modes.

Source: javascript/web/pentaho/visual/role/AbstractProperty.js, line 114

Inherited From: pentaho.visual.role.AbstractPropertyType#hasAnyCategoricalModes

See also: pentaho.visual.role.AbstractPropertyType#hasAnyContinuousModes , pentaho.visual.role.Mode#isContinuous , pentaho.visual.role.AbstractPropertyType#modes

hasAnyContinuousModes:  boolean

Gets a value that indicates if the visual role has any continuous modes.

Source: javascript/web/pentaho/visual/role/AbstractProperty.js, line 134

Inherited From: pentaho.visual.role.AbstractPropertyType#hasAnyContinuousModes

See also: pentaho.visual.role.AbstractPropertyType#hasAnyCategoricalModes , pentaho.visual.role.Mode#isContinuous , pentaho.visual.role.AbstractPropertyType#modes

hasAnyListModes:  boolean

Gets a value that indicates if the visual role has any list modes.

Source: javascript/web/pentaho/visual/role/AbstractProperty.js, line 94

Inherited From: pentaho.visual.role.AbstractPropertyType#hasAnyListModes

See also: pentaho.visual.role.Mode#dataType , pentaho.type.Type#isList , pentaho.type.Type#isElement

hasDescendants:  boolean

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

Source: javascript/web/pentaho/type/InstanceType.js, line 278

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/InstanceType.js, line 775

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/InstanceType.js, line 449

Overrides: pentaho.visual.role.AbstractPropertyType#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 258

Inherited From: pentaho.type.PropertyType#index

instance:  pentaho.type.Instance

Gets the prototype of the instances of this type.

Source: javascript/web/pentaho/type/InstanceType.js, line 290

Inherited From: pentaho.type.Type#instance

isAbstract:  boolean

Gets 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/InstanceType.js, line 538

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/InstanceType.js, line 842

Inherited From: pentaho.type.Type#isAdvanced

See also: pentaho.type.Type#isBrowsable

isApplicable:  undefined | boolean | pentaho.type.spec.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 1341

Inherited From: pentaho.type.PropertyType#isApplicable

See also: pentaho.type.PropertyType#isRequired , pentaho.type.Complex#isApplicableOf , pentaho.type.spec.IPropertyType#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 761

Inherited From: pentaho.type.PropertyType#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/InstanceType.js, line 808

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/InstanceType.js, line 374

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/InstanceType.js, line 339

Inherited From: pentaho.type.Type#isContainer

isContinuous:  boolean

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

A non-continuous type is said to be categorical.

The default implementation returns false.

The types pentaho.type.Number and pentaho.type.Date are known to be continuous.

Source: javascript/web/pentaho/type/InstanceType.js, line 402

Inherited From: pentaho.type.Type#isContinuous

isElement:  boolean

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

Source: javascript/web/pentaho/type/InstanceType.js, line 363

Inherited From: pentaho.type.Type#isElement

isEnabled:  undefined | boolean | pentaho.type.spec.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 1422

Inherited From: pentaho.type.PropertyType#isEnabled

See also: pentaho.type.Complex#isEnabledOf , pentaho.type.spec.IPropertyType#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 361

Inherited From: pentaho.type.PropertyType#isList

isReadOnly:  boolean

Gets whether the value of properties of this type cannot be changed, from the outside.

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

This attribute can only be set when defining a root property or an abstract property type.

When the property belongs to a read-only complex type, then the property is necessarily read-only, as well as the element type of the property's value type.

The default read-only value of false.

Source: javascript/web/pentaho/type/Property.js, line 389

Inherited From: pentaho.type.PropertyType#isReadOnly

See also: pentaho.type.ValueType#isReadOnly , pentaho.type.PropertyType#valueType

isRequired:  undefined | boolean | pentaho.type.spec.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 1081

Inherited From: pentaho.type.PropertyType#isRequired

See also: pentaho.type.Complex#isRequiredOf , pentaho.type.spec.IPropertyType#isRequired

isRoot:  boolean

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

Source: javascript/web/pentaho/type/InstanceType.js, line 249

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/InstanceType.js, line 386

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/InstanceType.js, line 314

Inherited From: pentaho.type.Type#isValue

isVisualKey:  boolean

Gets or sets a value that indicates if the visual role is a key property of the visual space.

When a visual role is a key visual role, each distinct combination of key visual roles' values corresponds to a distinct visual element being rendered. When a visual model has no key visual roles, then it is assumed that one visual element is rendered per input row of data.

This attribute is Monotonic

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

In this case, once true, the value cannot be set to false anymore.

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

When set and the visual role property already has subtypes, an error is thrown.

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

The default value of the root property is the value returned by hasAnyCategoricalModes.

Source: javascript/web/pentaho/visual/role/Property.js, line 292

Overrides: pentaho.visual.role.AbstractPropertyType#isVisualKey

See also: pentaho.visual.AbstractModelType#visualKeyType , pentaho.visual.role.AbstractPropertyType#isVisualKeyEffective

isVisualKeyEffective:  boolean | undefined

Gets a value that indicates if the visual role is effectively a visual key.

When the property's associated model is not defined or does not have a visualKeyType of dataKey, undefined is returned.

Source: javascript/web/pentaho/visual/role/AbstractProperty.js, line 228

Inherited From: pentaho.visual.role.AbstractPropertyType#isVisualKeyEffective

See also: pentaho.visual.role.AbstractPropertyType#isVisualKey

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 228

Inherited From: pentaho.type.PropertyType#key

Implements:
keyName:  string

Gets the singular name of PropertyType keys.

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

Inherited From: pentaho.type.PropertyType#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/InstanceType.js, line 613

Inherited From: pentaho.type.Type#label

mixins:  Array.<pentaho.type.Type>

Gets or sets the mixin types that are locally mixed into this type.

Can be set to either type identifiers, instance classes or type instances and arrays thereof.

The attributes defined by the added mixin types become available for extension/configuration on this type. When extending, mixins are always applied first.

When set to a Nully value, nothing is done.

Source: javascript/web/pentaho/type/InstanceType.js, line 557

Inherited From: pentaho.type.Type#mixins

modes:  pentaho.type.List.<pentaho.visual.role.Mode>

Gets or sets the array of modes of operation supported by the visual role.

A visual role that supports more than one mode of operation is said to be modal.

Visual roles need to support at least one mode of operation.

This attribute is Monotonic

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

In this case, modes can only be added at the root property, at construction time, after which modes can only be removed. To remove a mode, set the property to all of the current modes (possibly other instances, but which are equal to the existing ones) except the one to be removed.

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

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

If not specified at the root visual.role.Property, the modes attribute is initialized with a single, default mode, having a dataType of String and an isContinuous of false.

The returned list or its elements should not be modified.

Source: javascript/web/pentaho/visual/role/Property.js, line 148

Overrides: pentaho.visual.role.AbstractPropertyType#modes

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 287

Inherited From: pentaho.type.PropertyType#name

See also: pentaho.type.spec.IPropertyType#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 333

Inherited From: pentaho.type.PropertyType#nameAlias

See also: pentaho.type.spec.IPropertyType#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/InstanceType.js, line 875

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/InstanceType.js, line 206

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/InstanceType.js, line 492

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.

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/InstanceType.js, line 477

Inherited From: pentaho.type.Type#sourceId

See also: pentaho.type.Type#id

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/InstanceType.js, line 200

Inherited From: pentaho.type.Type#uid

valueType:  pentaho.type.ValueType

Gets 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.

The default value type is the inherited value type.

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

This attribute can only be specified upon property definition.

When a Nully value is specified, it is ignored.

Otherwise, the specified value is assumed to be an spec.TypeReference and is first resolved using ILoader#resolveType.

An error is thrown when the specified value is not a subtype of the attribute's current value type.

An error is thrown when the specified value is such that its element type would not be read-only and the property belongs to a read-only complex type.

Methods Details

__assertValueTypeReadOnlyConsistent(valueType)

Asserts that a given value type is consistent with the isReadOnly status of the declaring type.

Source: javascript/web/pentaho/type/Property.js, line 501

Inherited From: pentaho.type.PropertyType#__assertValueTypeReadOnlyConsistent

Parameters:
Name Default Value Summary
valueType : pentaho.type.ValueType

The value type.@

Throws:
Name Description
pentaho.lang.ArgumentInvalidError

When the element type corresponding to the given value type would not be read-only and the declaring complex type is read-only.

__setValueType(value)

Sets the value type of the property.

Source: javascript/web/pentaho/type/Property.js, line 464

Inherited From: pentaho.type.PropertyType#__setValueType

Parameters:
Name Default Value Summary
value : pentaho.type.spec.TypeReference

A value type reference.

Throws:
Name Description
pentaho.lang.ArgumentInvalidError

When setting to a value type that is not a subtype of the inherited value type.

pentaho.lang.ArgumentInvalidError

When setting and the corresponding element type would not be read-only and the declaring complex type is read-only.

_assertNoSubtypesAttribute(attributeName)
Protected

Asserts that the type has no subtypes and that as such the given attribute can be set.

Source: javascript/web/pentaho/type/InstanceType.js, line 1045

Inherited From: pentaho.type.Type#_assertNoSubtypesAttribute

Parameters:
Name Default Value Summary
attributeName : string

The name of the attribute being set.

Throws:
Name Description
pentaho.lang.OperationInvalidError

When setting and the type already has subtypes.

_collectElementValidators(addValidator, owner, value)
Protected

Called each time a property value is validated to collect the list of element validators.

When overriding this method, be sure to also call the base implementation.

Source: javascript/web/pentaho/type/Property.js, line 928

Inherited From: pentaho.type.PropertyType#_collectElementValidators

Parameters:
Name Default Value Summary
addValidator : function

The function to call to register an element validator.

owner : pentaho.type.Complex

The complex value that owns the property.

value : pentaho.type.Value

The value whose elements will be validated.

_getLabelDefault() : string
Protected

Gets the default label of the property.

The label of a root property is reset to a capitalization of the name attribute. A non-root property inherits the label of its closest ancestor.

Source: javascript/web/pentaho/type/Property.js, line 708

Inherited From: pentaho.type.PropertyType#_getLabelDefault

Returns:
Name Description
string | null

The default label or an empty value.

_init(spec, keyArgs) : object
Protected

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

Source: javascript/web/pentaho/type/Property.js, line 137

Overrides: pentaho.visual.role.AbstractPropertyType#_init

Parameters:
Name Default Value Summary
spec : object

A property name or specification object.

keyArgs : object

Keyword arguments.

Parameters:
Name Default Value Summary
declaringType : pentaho.type.ComplexType

The complex type that declares the property.

index : number

The index of the property within its complex type.

Returns:
Name Description
object | null

A specification to use instead of the given spec argument to extend the type, or undefined, to use the given specification.

_validateValueOn(owner, value) : pentaho.type.ValidationError | Array.<pentaho.type.ValidationError>
Protected

Validates the given non-null value in the context of this property.

The base implementation calls _collectElementValidators to obtain the list of currently applicable element validators. Then, each element is validated against the list of collected validators.

When overriding this method, the error utilities in pentaho.type.Util can be used to help in the implementation.

Source: javascript/web/pentaho/type/Property.js, line 887

Inherited From: pentaho.type.PropertyType#_validateValueOn

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

The complex value that owns the property.

value : pentaho.type.Value

The value to validate.

Returns:
Name Description
pentaho.type.ValidationError | Array.<pentaho.type.ValidationError> | null

An error, a non-empty array of errors or null.

countMaxOn(owner) : number

Evaluates the value of the countMax attribute of a property of this type on a given complex value.

This method is used to determine the effective element count range and is not intended to be used directly.

Source: javascript/web/pentaho/type/Property.js, line 1241

Inherited From: pentaho.type.PropertyType#countMaxOn

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

The complex value that owns a property of this type.

Returns:
Name Description
number

The evaluated value of the countMax attribute.

See also: pentaho.type.PropertyType#countMax

countMinOn(owner) : number

Evaluates the value of the countMin attribute of a property of this type on a given complex value.

This method is used to determine the effective element count range and is not intended to be used directly.

Source: javascript/web/pentaho/type/Property.js, line 1154

Inherited From: pentaho.type.PropertyType#countMinOn

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

The complex value that owns a property of this type.

Returns:
Name Description
number

The evaluated value of the countMin attribute.

See also: pentaho.type.PropertyType#countMin

countRangeOn(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 1530

Inherited From: pentaho.type.PropertyType#countRangeOn

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#countRangeOf

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

Creates or resolves an instance of this type given an instance reference.

This method delegates to InstancesContainer#get with this type as the typeBase argument.

Source: javascript/web/pentaho/type/InstanceType.js, line 977

Inherited From: pentaho.type.Type#create

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

An instance or instance specification.

instKeyArgs : object
Optional

The keyword arguments passed to the instance constructor, when one is created.

Returns:
Name Description
pentaho.type.Instance

The created instance or the resolved instance (possibly null).

Throws:
Name Description
Error

Other errors, as documented in: InstancesContainer#get.

See also: pentaho.type.Type#createAsync , pentaho.type.Type#to , pentaho.type.Type#is

Examples

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

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

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

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

 // ...

});

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

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

 var productList = Instance.type.create({
 _: [{
 props: ["id", "name", {name: "price", valueType: "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/Instance", "pentaho/type/standard"], function(Instance) {

 var ProductList = Instance.type.create([{
 props: [
 "id",
 "name",
 {name: "price", valueType: "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, instKeyArgs) : Promise.<pentaho.type.Instance>

Creates or resolves an instance of this type, asynchronously, given an instance reference.

This method delegates to InstancesContainer#getAsync with this type as the typeBase argument.

Source: javascript/web/pentaho/type/InstanceType.js, line 998

Inherited From: pentaho.type.Type#createAsync

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

An instance or instance specification.

instKeyArgs : object
Optional

The keyword arguments passed to the instance constructor, when one is created.

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

A promise to the created instance or resolved instance (possibly null).

See also: pentaho.type.Type#create

defaultValueOn(owner) : pentaho.type.Value

Gets a default value for use in a given Complex instance.

Ensures that list properties always have a non-null default value.

Source: javascript/web/pentaho/type/Property.js, line 679

Inherited From: pentaho.type.PropertyType#defaultValueOn

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

The complex value that owns the property.

Returns:
Name Description
pentaho.type.Value

The default value.

getModeEffectiveOn(model) : pentaho.visual.role.Mode

Determines the effective operation mode of the visual role on the given visual model.

When the associated mapping has a specified modeFixed (whether or not it is applicable), then that operation mode is used.

Otherwise, the first operation mode in modes which is applicable to the mapping's fields is used. If there are no applicable modes, null is returned.

Source: javascript/web/pentaho/visual/role/Property.js, line 205

Parameters:
Name Default Value Summary
model : pentaho.visual.Model

The visual model.

Returns:
Name Description
pentaho.visual.role.Mode

The effective operation mode, if one exists; null if not.

See also: pentaho.visual.role.Mapping#modeFixed , pentaho.visual.role.PropertyType#modes

hasAnyModes(keyArgs) : boolean

Gets a value that indicates if the visual role has any modes having the specified properties.

Source: javascript/web/pentaho/visual/role/AbstractProperty.js, line 166

Inherited From: pentaho.visual.role.AbstractPropertyType#hasAnyModes

Parameters:
Name Default Value Summary
keyArgs : object

The keyword arguments.

Parameters:
Name Default Value Summary
isContinuous : boolean
Optional

Indicates that matching modes are continuous.

isList : boolean
Optional

Indicates that the data type of matching modes are list data types.

elementDataType : pentaho.type.spec.TypeReference
Optional

The element data type (or a subtype of) of matching modes.

Returns:
Name Description
boolean

true if a mode having the specified properties exists; false otherwise.

See also: pentaho.visual.role.AbstractPropertyType#hasAnyContinuousModes , pentaho.visual.role.AbstractPropertyType#hasAnyCategoricalModes , pentaho.visual.role.AbstractPropertyType#hasAnyListModes , pentaho.visual.role.AbstractPropertyType#modes , pentaho.visual.role.Mode#isContinuous , pentaho.type.Type#isList , pentaho.visual.role.Mode#dataType , pentaho.type.Type#elementType

is(value) : boolean

Determines if a value is an instance of this type.

Source: javascript/web/pentaho/type/InstanceType.js, line 1059

Inherited From: pentaho.type.Type#is

Parameters:
Name Default Value Summary
value : *

The value to test.

Returns:
Name Description
boolean

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

isApplicableOn(owner) : boolean

Evaluates the value of the isApplicable attribute of a property of this type on a given owner complex value.

Source: javascript/web/pentaho/type/Property.js, line 1328

Inherited From: pentaho.type.PropertyType#isApplicableOn

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

The complex value that owns a property of this type.

Returns:
Name Description
boolean

The evaluated value of the isApplicable attribute.

See also: pentaho.type.PropertyType#isApplicable

isEnabledOn(owner) : boolean

Evaluates the value of the isEnabled attribute of a property of this type on a given owner complex value.

Source: javascript/web/pentaho/type/Property.js, line 1409

Inherited From: pentaho.type.PropertyType#isEnabledOn

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

The complex value that owns a property of this type.

Returns:
Name Description
boolean

The evaluated value of the isEnabled attribute.

See also: pentaho.type.PropertyType#isEnabled

isRequiredOn(owner) : boolean

Evaluates the value of the isRequired attribute of a property of this type on a given complex value.

This method is used to determine the effective element count range and is not intended to be used directly.

Source: javascript/web/pentaho/type/Property.js, line 1064

Inherited From: pentaho.type.PropertyType#isRequiredOn

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

The complex value that owns a property of this type.

Returns:
Name Description
boolean

The evaluated value of the isRequired attribute.

See also: pentaho.type.PropertyType#isRequired

isSubtypeOf(superType) : boolean

Determines if this is a subtype of another.

A type is considered a subtype of itself.

Source: javascript/web/pentaho/type/InstanceType.js, line 1071

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/InstanceType.js, line 1092

Inherited From: pentaho.type.Type#to

Parameters:
Name Default Value Summary
value : *

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() : JsonValue

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/InstanceType.js, line 1223

Inherited From: pentaho.type.Type#toJSON

Returns:
Name Description
JsonValue | null

A JSON-compatible specification.

See also: pentaho.type.Instance#toSpec

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

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.

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.

When a type has an identifier, its id (or its alias) 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.

Source: javascript/web/pentaho/type/InstanceType.js, line 1137

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.TypeReference

A reference to this type.

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

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

Creates a specification that describes this type.

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

This method handles the cases where this type has an identifier or it does not but a temporary identifier has already been assigned in the ambient specification context. Otherwise, execution delegates to _toSpecInContextCore.

Source: javascript/web/pentaho/type/InstanceType.js, line 1166

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.TypeReference

A reference to 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/InstanceType.js, line 1293

Inherited From: pentaho.type.Type#toString

Returns:
Name Description
string

A textual representation.

toValueOn(defaultValueOwner, valueSpec) : 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, if, defaultValueOwner is specified, a Nully value is converted to the property's default value, pentaho.type.PropertyType#defaultValue.

Source: javascript/web/pentaho/type/Property.js, line 639

Inherited From: pentaho.type.PropertyType#toValueOn

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

The complex value that owns the property. Only needed if it is desired that Nully values are converted to the property's default value.

valueSpec : *

A value or value specification.

Returns:
Name Description
pentaho.type.Value | null

A value.

validateOn(model) : Array.<pentaho.type.ValidationError>

Determines if this visual role is valid on the given visualization model.

If base property validation fails, those errors are returned.

Otherwise, validity is further determined as follows:

  1. The number of currently mapped fields must satisfy the property cardinality constraints, according to PropertyType#fields

  2. When specified, the value of modeFixed must be one of the corresponding internal visual role's modes

Source: javascript/web/pentaho/visual/role/Property.js, line 481

Overrides: pentaho.visual.role.AbstractPropertyType#validateOn

Parameters:
Name Default Value Summary
model : pentaho.visual.Model

The visual model.

Returns:
Name Description
Array.<pentaho.type.ValidationError>

A non-empty array of ValidationError or null.