Class: InstanceType

$k. InstanceType

new $k.InstanceType()

Represents a type of instances

Extends

Methods

createInstance(param, language, options) : $k.Instance

Create a new instance of this type

Name Type Description
param string optional

The name of the new instance

language string optional

Internal Error: no text for this language or unsupported language

options object optional

Options

  • cluster: {$k.SemanticElement} Store the new instance the cluster of the element
Throws:
Type Description
$k.exception.SchemaError

If the type is abstract

$k.exception.AccessDenied

If creating an instance is not allowed

$k.exception.TransactionError

If no write transaction is active

Returns:
Type Description
$k.Instance The created instance

createSubtype(param, language) : $k.Type

Create a new subtype

Name Type Description
param string optional

The name of the new type

language string optional

Internal Error: no text for this language or unsupported language

Throws:
Type Description
$k.exception.SchemaError

If subtypes cannot be created

$k.exception.AccessDenied

If creating a subtype is not allowed

$k.exception.TransactionError

If no write transaction is active

Returns:
Type Description
$k.Type The created type

extendedTypes() : Array.<$k.InstanceType>

Returns the types that can be extended by this type or a subtype.
Does not check if this type allows to create extensions

See:
Returns:
Type Description
Array.<$k.InstanceType>

extensionTypes() : Array.<$k.InstanceType>

Returns the types that can extend instances of this type.
Does not check if these types allow to create extensions

See:
Returns:
Type Description
Array.<$k.InstanceType>

Intherited methods

addSupertype(type), allInstances(), allSubtypes(), allSupertypes(), attribute(type), attributes(type), attributeValue(type, language), attributeValueString(type, language), callBehaviour(method, args), canCreateExtensions(), canCreateInstances(), changeLog(), core(), createAttribute(type, value, language), createAttributeFromString(type, valueString, language), createRelation(type, target, inverse), domain(), element(), ensureAttributeValue(type, value, language), ensureRelationTarget(type, target, inverse), estimatedNumberOfInstances(), getCounter(), hasPossibleAttribute(type), hasPossibleRelation(type), icon(size, language), iconAttribute(size, language), idNumber(), idString(), increaseCounter(), inheritedAttribute(type), inheritedAttributeValue(type, language), instances(), internalName(), isAbstract(), isInvalid(), isKindOf(type), kPathEvaluate(pathString), locatorString(locatorTypes), modificationNumber(), name(language), numberOfInstances(), possibleProperties(filter), primaryCore(), properties(filter), relation(type), relations(type), relationTarget(type), relationTargets(type), remove(), removeProperties(filter), removeSupertype(), render(context, keyFilter, detailFilter), renderJSON(context, excludedKeys, detailFilter), renderTemplate(template, entity, conversion, variables), schemaReportOn(), setAttributeFromString(type, valueString, language), setAttributeValue(type, value, language), setCanCreateExtensions(canCreate), setCanCreateInstances(canCreate), setCounter(counterValue), setInternalName(name), setName(name, language), setRelationTarget(type, target, inverse), subtypes(), supertypes(), type(), typeDomain(), updateMapping()