Type
pentaho.type.filter.Abstract.Type
The base type class of filter types.
For more information see pentaho.type.filter.Abstract
.
Extends
Constructor
Name | Description |
---|---|
new Type() Static |
Members
Name | Description |
---|---|
alias : | Gets the alias for the identifier of this type. |
ancestor : | Gets the parent type in the current type hierarchy, if any, or |
application : | Gets or sets the |
category : | Gets or sets the category associated with this type. |
context : | Gets the context that defined this type class. |
count | Gets the number of properties of the complex type. |
defaultView : | Gets or sets the default view for instances of this type. |
defaultViewClass : | Gets a promise for the default view class or factory, if any; or |
description : | Gets or sets the description of this type. |
hasDescendants : | Gets a value that indicates if this type has any descendant types. |
helpUrl : | Gets or sets a URL pointing to documentation associated with this type. |
id : | Gets the identifier of this type. |
inheritedStyleClasses : | Gets the style classes of this and any base types. |
instance : | Gets the prototype of the instances of this type. |
isAbstract : | Gets or sets a value that indicates if this type is abstract. |
isAdvanced : | Gets or sets the |
isBrowsable : | Gets or sets the |
isComplex : | |
isContainer : | Gets a value that indicates if this type |
isElement : | Gets a value that indicates if this type |
isList : | |
isProperty : | Gets a value that indicates if this type |
isRefinement : | Gets a value that indicates if this type |
isRoot : | Gets a value that indicates if this type is the root of its type hierarchy. |
isSimple : | |
isValue : | |
label : | Gets or sets the label of this type. |
ordinal : | Gets or sets the ordinal associated with this type. |
root : | Gets the root type of this type hierarchy. |
shortId : | Gets the short identifier of this type. |
sourceId : | Gets the source module identifier of this type. |
styleClass : | Gets or sets the CSS class associated with this type. |
uid : | Gets the unique identifier 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 specification. |
_postInit(spec, keyArgs) Protected | Performs initialization tasks that take place after the instance is extended with its specification. |
add(propTypeSpec) : pentaho.type.Complex | Adds, overrides or configures properties to/of the complex type. |
areEqual(va, vb) : boolean | Gets a value that indicates if two given values are equal. |
at(index, sloppy) : pentaho.type.Property.Type | Gets the property type object of the property with a given index, if in range, or |
buildSourceRelativeId(id) : string | Builds an absolute module identifier from one that is relative to the type's |
create(instSpec, keyArgs) : pentaho.type.Instance | Creates an instance of this type, given an instance specification. |
createAsync(instSpec, keyArgs) : Promise.< | Creates an instance of this type, asynchronously, given an instance specification. |
each(f, x) : pentaho.type.Complex | Calls a function for each defined property type. |
eachCommonWith(otherType, f, x) : pentaho.type.Complex | Calls a function for each defined property type that this type shares with another given type and whose value can, in principle, be copied from it. |
extendProto(typeSpec, keyArgs) : pentaho.type.Type | Creates a subtype of this one. |
get(name, sloppy) : pentaho.type.Property.Type | Gets the type object of the property with the given name, or |
has(name) : boolean | Gets a value that indicates if a given property is defined. |
is(value) : boolean | Determines if a value is an instance of this type. |
isSubtypeOf(superType) : boolean | Determines if this is a subtype of another. |
isValid(value) : boolean | Determines if a value is a valid instance of this type. |
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. |
validate(value) : Array.< | Determines if a value is a valid instance of this type. |
validateInstance(value) : Array.< | Determines if a value, that is an instance of this type, is also a valid instance of this (and its) type. |
Constructor Details
new Type() Static |
---|
Source: javascript/web/pentaho/type/filter/abstract.js, line 44 |
Members Details
alias: |
---|
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 Source: javascript/web/pentaho/type/_type.js, line 538 Inherited From: pentaho.type.Type#alias See also: pentaho.type.Type#id |
ancestor: |
---|
Gets the parent type in the current type hierarchy, if any, or The root type returns 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: |
---|
Gets or sets the The application property serves as a collection of properties specific to the container application that can be modified via the Setting this to a Source: javascript/web/pentaho/type/_type.js, line 640 Inherited From: pentaho.type.Type#application |
category: |
---|
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 Setting this to 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: |
---|
Gets the context that defined this type class. Source: javascript/web/pentaho/type/_type.js, line 149 Inherited From: pentaho.type.Type#context |
count: |
---|
Gets the number of properties of the complex type. Source: javascript/web/pentaho/type/complex.js, line 957 Inherited From: pentaho.type.Complex.Type#count |
defaultView: |
---|
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 Setting this to Setting this to a falsy value (like 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: |
---|
Gets a promise for the default view class or factory, if any; or A default view exists if property Source: javascript/web/pentaho/type/_type.js, line 1031 Inherited From: pentaho.type.Type#defaultViewClass See also: pentaho.type.Type#defaultView |
description: |
---|
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 Setting this to Source: javascript/web/pentaho/type/_type.js, line 669 Inherited From: pentaho.type.Type#description |
hasDescendants: |
---|
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: |
---|
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 Setting this to Source: javascript/web/pentaho/type/_type.js, line 753 Inherited From: pentaho.type.Type#helpUrl |
id: |
---|
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 This attribute is not inherited. When unspecified, defaults to the value of Source: javascript/web/pentaho/type/_type.js, line 397 Overrides: pentaho.type.Complex.Type#id See also: pentaho.type.Type#sourceId |
inheritedStyleClasses: |
---|
Gets the style classes of this and any base types. Does not modify the returned array. Source: javascript/web/pentaho/type/_type.js, line 895 Inherited From: pentaho.type.Type#inheritedStyleClasses |
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: |
---|
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 Default Value: false Overrides: pentaho.type.Complex.Type#isAbstract |
isAdvanced: |
---|
Gets or sets the Types with Setting this to a Source: javascript/web/pentaho/type/_type.js, line 828 Inherited From: pentaho.type.Type#isAdvanced See also: pentaho.type.Type#isBrowsable |
isBrowsable: |
---|
Gets or sets the Browsable types are exposed to the end user. Set this attribute to Setting this to a Source: javascript/web/pentaho/type/_type.js, line 790 Inherited From: pentaho.type.Type#isBrowsable |
isComplex: |
---|
Gets a value that indicates if this type Source: javascript/web/pentaho/type/_type.js, line 356 Inherited From: pentaho.type.Type#isComplex |
isContainer: |
---|
Gets a value that indicates if this type Source: javascript/web/pentaho/type/_type.js, line 308 Inherited From: pentaho.type.Type#isContainer |
isElement: |
---|
Gets a value that indicates if this type Source: javascript/web/pentaho/type/_type.js, line 332 Inherited From: pentaho.type.Type#isElement |
isList: |
---|
Gets a value that indicates if this type Source: javascript/web/pentaho/type/_type.js, line 320 Inherited From: pentaho.type.Type#isList |
isProperty: |
---|
Gets a value that indicates if this type Source: javascript/web/pentaho/type/_type.js, line 295 Inherited From: pentaho.type.Type#isProperty |
isRefinement: |
---|
Gets a value that indicates if this type Source: javascript/web/pentaho/type/_type.js, line 344 Inherited From: pentaho.type.Type#isRefinement |
isRoot: |
---|
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: |
---|
Gets a value that indicates if this type Source: javascript/web/pentaho/type/_type.js, line 368 Inherited From: pentaho.type.Type#isSimple |
isValue: |
---|
Gets a value that indicates if this type Source: javascript/web/pentaho/type/_type.js, line 283 Inherited From: pentaho.type.Type#isValue |
label: |
---|
Gets or sets the label of this type. When set to a non- 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, The default value is the inherited value. The initial value of the attribute on the top-root type is Source: javascript/web/pentaho/type/_type.js, line 604 Inherited From: pentaho.type.Type#label |
ordinal: |
---|
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 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: |
---|
Gets the root type of this type hierarchy. Even though the ultimate type root of types defined in this system is When deriving a type from Typically, root types are immediate subtypes of For example, 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: |
---|
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: |
---|
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 The source identifier is used to resolve module identifiers relative to the source module, as is the case with the 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 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: |
---|
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 Setting to The default value of a type with an Source: javascript/web/pentaho/type/_type.js, line 875 Inherited From: pentaho.type.Type#styleClass |
uid: |
---|
Gets the unique identifier of this type. Unique type identifiers are auto-generated in each session. Note that even anonymous types (those whose This attribute is not inherited. Source: javascript/web/pentaho/type/_type.js, line 169 Inherited From: pentaho.type.Type#uid |
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 This method does not add the special Source: javascript/web/pentaho/type/_type.js, line 1463 Inherited From: pentaho.type.Type#_fillSpecInContext
See also: pentaho.type.Instance#toSpecInContext |
_init(spec, keyArgs) Protected | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Performs initialization tasks that take place before the instance is extended with its specification. This method is typically overridden to block the inheritance of certain attributes. Source: javascript/web/pentaho/type/_type.js, line 87 Inherited From: pentaho.type.Type#_init
|
_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
|
add(propTypeSpec) : pentaho.type.Complex | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Adds, overrides or configures properties to/of the complex type. Source: javascript/web/pentaho/type/complex.js, line 994 Inherited From: pentaho.type.Complex.Type#add
|
areEqual(va, vb) : boolean | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets a value that indicates if two given values are equal. If both values are Source: javascript/web/pentaho/type/value.js, line 284 Inherited From: pentaho.type.Value.Type#areEqual
|
at(index, sloppy) : pentaho.type.Property.Type | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the property type object of the property with a given index, if in range, or Source: javascript/web/pentaho/type/complex.js, line 938 Inherited From: pentaho.type.Complex.Type#at
|
buildSourceRelativeId(id) : string | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Builds an absolute module identifier from one that is relative to the type's Relative module identifiers start with a Absolute identifiers are returned without modification. Source: javascript/web/pentaho/type/_type.js, line 491 Inherited From: pentaho.type.Type#buildSourceRelativeId
See also: pentaho.type.Type#sourceId |
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 If the specified instance specification does not contain an inline type reference, the type is assumed to be Source: javascript/web/pentaho/type/_type.js, line 1189 Inherited From: pentaho.type.Type#create
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.< | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Creates an instance of this type, asynchronously, given an instance specification. If the instance specification contains an inline type reference, in property If the specified instance specification does not contain an inline type reference, the type is assumed to be Source: javascript/web/pentaho/type/_type.js, line 1258 Inherited From: pentaho.type.Type#createAsync
See also: pentaho.type.Type#create , pentaho.type.Type#isSubtypeOf , pentaho.type.Context#get |
each(f, x) : pentaho.type.Complex | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Calls a function for each defined property type. Source: javascript/web/pentaho/type/complex.js, line 973 Inherited From: pentaho.type.Complex.Type#each
|
eachCommonWith(otherType, f, x) : pentaho.type.Complex | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Calls a function for each defined property type that this type shares with another given type and whose value can, in principle, be copied from it. This method finds the lowest common ancestor of both types. If it is a complex type, each of the corresponding local properties is yielded. Source: javascript/web/pentaho/type/complex.js, line 1040 Inherited From: pentaho.type.Complex.Type#eachCommonWith
|
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 Source: javascript/web/pentaho/type/_type.js, line 1055 Inherited From: pentaho.type.Type#extendProto
|
get(name, sloppy) : pentaho.type.Property.Type | |||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Gets the type object of the property with the given name, or If a property type object is specified, it is returned back only if it is the property type object of same name in this complex type. Source: javascript/web/pentaho/type/complex.js, line 891 Inherited From: pentaho.type.Complex.Type#get
|
has(name) : boolean | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Gets a value that indicates if a given property is defined. If a property type object is specified, this method tests whether it is the same property type object that exists under that name, if any. Source: javascript/web/pentaho/type/complex.js, line 918 Inherited From: pentaho.type.Complex.Type#has
|
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
|
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
|
isValid(value) : boolean | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Determines if a value is a valid instance of this type. This method calls The Source: javascript/web/pentaho/type/value.js, line 305 Inherited From: pentaho.type.Value.Type#isValid
|
to(value, keyArgs) : pentaho.type.Instance | |||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Converts a value to an instance of this type, if it is not one already. If a Otherwise, if a given value is not already an instance of this type (checked using Source: javascript/web/pentaho/type/_type.js, line 1359 Inherited From: pentaho.type.Type#to
|
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 Source: javascript/web/pentaho/type/_type.js, line 1438 Inherited From: pentaho.type.Type#toJSON
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 If an When a type is not anonymous, the For anonymous types, a Some standard types have a special reference syntax. For example: Source: javascript/web/pentaho/type/_type.js, line 1539 Inherited From: pentaho.type.Type#toRef
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 Source: javascript/web/pentaho/type/_type.js, line 1559 Inherited From: pentaho.type.Type#toRefInContext
See also: pentaho.type.Type#toRef |
toSpec(keyArgs) : pentaho.type.spec.ITypeProto | ||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Creates a specification that describes this type. If an This method creates a new Source: javascript/web/pentaho/type/_type.js, line 1390 Inherited From: pentaho.type.Type#toSpec
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 The default implementation returns a plain object with the identifier of the type and any other specified attributes (like Source: javascript/web/pentaho/type/_type.js, line 1413 Inherited From: pentaho.type.Type#toSpecInContext
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
|
validate(value) : Array.< | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Determines if a value is a valid instance of this type. Validation of
Use this method when you know nothing about a value. Otherwise, if you know that a value is an instance of this type, you can call Source: javascript/web/pentaho/type/value.js, line 327 Inherited From: pentaho.type.Value.Type#validate
See also: pentaho.type.Value.Type#isValid |
validateInstance(value) : Array.< | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
Determines if a value, that is an instance of this type, is also a valid instance of this (and its) type. Thus, The default implementation simply calls Special types, like Source: javascript/web/pentaho/type/value.js, line 359 Inherited From: pentaho.type.Value.Type#validateInstance
See also: pentaho.type.Value#validate , pentaho.type.Value.Type#validate , pentaho.type.spec.IValueTypeProto#validateInstance |