ParticipantDeclaration (Common API)

Overview - Common API - Client API - Admin API - Runtime API

ParticipantDeclaration

Class representing the definition of a Participant.

Details

  • Extends ClassDeclaration

  • Module common

See also

Method Summary

Name Returns Description
constructor void Create an ParticipantDeclaration
getSystemType string Returns the base system type for Participants from the system namespace
isRelationshipTarget boolean Returns true if this class can be pointed to by a relationship

Inherited Method Summary

Supertype Name Returns Description
ClassDeclaration getIdentifierFieldName string Returns the name of the identifying field for this class
ClassDeclaration _resolveSuperType ClassDeclaration Resolve the super type on this class and store it as an internal property
ClassDeclaration isEnum boolean Returns true if this class is an enumeration
ClassDeclaration isConcept boolean Returns true if this class is the definition of a concept
ClassDeclaration isEvent boolean Returns true if this class is the definition of an event
ClassDeclaration isSystemRelationshipTarget boolean Returns true if this class can be pointed to by a relationship in a system model
ClassDeclaration isSystemType boolean Returns true is this type is in the system namespace
ClassDeclaration isSystemCoreType boolean Returns true if this class is a system core type - both in the system namespace, and also one of the system core types (Asset, Participant, etc)
ClassDeclaration getName string Returns the short name of a class
ClassDeclaration getNamespace String Return the namespace of this class
ClassDeclaration getFullyQualifiedName string Returns the fully qualified name of this class
ClassDeclaration isAbstract boolean Returns true if this class is declared as abstract in the model file
ClassDeclaration getOwnProperty Property Returns the field with a given name or null if it does not exist
ClassDeclaration getOwnProperties Property[] Returns the fields directly defined by this class
ClassDeclaration getSuperType string Returns the FQN of the super type for this class or null if this class does not have a super type
ClassDeclaration getSuperTypeDeclaration ClassDeclaration Get the super type class declaration for this class
ClassDeclaration getAssignableClassDeclarations ClassDeclaration[] Get the class declarations for all subclasses of this class, including this class
ClassDeclaration getAllSuperTypeDeclarations ClassDeclaration[] Get all the super-type declarations for this type
ClassDeclaration getProperty Property Returns the property with a given name or null if it does not exist
ClassDeclaration getProperties Property[] Returns the properties defined in this class and all super classes
ClassDeclaration getNestedProperty Property Get a nested property using a dotted property path
ClassDeclaration toString String Returns the string representation of this class

Method Details

new ParticipantDeclaration()

Create an ParticipantDeclaration.

Parameters

Name Type Mandatory Description
modelFile ModelFile Yes the ModelFile for this class
ast Object Yes The AST created by the parser

isRelationshipTarget

boolean isRelationshipTarget( )

Returns true if this class can be pointed to by a relationship

Returns

boolean - true if the class may be pointed to by a relationship

Parameters

No parameters

getSystemType

string getSystemType( )

Returns the base system type for Participants from the system namespace

Returns

string - the short name of the base system type

Parameters

No parameters

Inherited methods

_resolveSuperType

ClassDeclaration _resolveSuperType( )

Inherited from: ClassDeclaration

Resolve the super type on this class and store it as an internal property.

Returns

ClassDeclaration - The super type, or null if non specified.

Parameters

No parameters

isAbstract

boolean isAbstract( )

Inherited from: ClassDeclaration

Returns true if this class is declared as abstract in the model file

Returns

boolean - true if the class is abstract

Parameters

No parameters

isEnum

boolean isEnum( )

Inherited from: ClassDeclaration

Returns true if this class is an enumeration.

Returns

boolean - true if the class is an enumerated type

Parameters

No parameters

isConcept

boolean isConcept( )

Inherited from: ClassDeclaration

Returns true if this class is the definition of a concept.

Returns

boolean - true if the class is a concept

Parameters

No parameters

isEvent

boolean isEvent( )

Inherited from: ClassDeclaration

Returns true if this class is the definition of an event.

Returns

boolean - true if the class is an event

Parameters

No parameters

isSystemRelationshipTarget

boolean isSystemRelationshipTarget( )

Inherited from: ClassDeclaration

Returns true if this class can be pointed to by a relationship in a system model

Returns

boolean - true if the class may be pointed to by a relationship

Parameters

No parameters

isSystemType

boolean isSystemType( )

Inherited from: ClassDeclaration

Returns true is this type is in the system namespace

Returns

boolean - true if the class may be pointed to by a relationship

Parameters

No parameters

isSystemCoreType

boolean isSystemCoreType( )

Inherited from: ClassDeclaration

Returns true if this class is a system core type - both in the system namespace, and also one of the system core types (Asset, Participant, etc).

Returns

boolean - true if the class may be pointed to by a relationship

Parameters

No parameters

getName

string getName( )

Inherited from: ClassDeclaration

Returns the short name of a class. This name does not include the namespace from the owning ModelFile.

Returns

string - the short name of this class

Parameters

No parameters

getNamespace

String getNamespace( )

Inherited from: ClassDeclaration

Return the namespace of this class.

Returns

String - namespace - a namespace.

Parameters

No parameters

getFullyQualifiedName

string getFullyQualifiedName( )

Inherited from: ClassDeclaration

Returns the fully qualified name of this class. The name will include the namespace if present.

Returns

string - the fully-qualified name of this class

Parameters

No parameters

getIdentifierFieldName

string getIdentifierFieldName( )

Inherited from: ClassDeclaration

Returns the name of the identifying field for this class. Note that the identifying field may come from a super type.

Returns

string - the name of the id field for this class

Parameters

No parameters

getOwnProperty

Property getOwnProperty( string name )

Inherited from: ClassDeclaration

Returns the field with a given name or null if it does not exist. The field must be directly owned by this class -- the super-type is not introspected.

Returns

Property - the field definition or null if it does not exist.

Parameters

Name Type Mandatory Description
name string Yes the name of the field

getOwnProperties

Property[] getOwnProperties( )

Inherited from: ClassDeclaration

Returns the fields directly defined by this class.

Returns

Property - the array of fields

Parameters

No parameters

getSuperType

string getSuperType( )

Inherited from: ClassDeclaration

Returns the FQN of the super type for this class or null if this class does not have a super type.

Returns

string - the FQN name of the super type or null

Parameters

No parameters

getSuperTypeDeclaration

ClassDeclaration getSuperTypeDeclaration( )

Inherited from: ClassDeclaration

Get the super type class declaration for this class.

Returns

ClassDeclaration - the super type declaration, or null if there is no super type.

Parameters

No parameters

getAssignableClassDeclarations

ClassDeclaration[] getAssignableClassDeclarations( )

Inherited from: ClassDeclaration

Get the class declarations for all subclasses of this class, including this class.

Returns

ClassDeclaration - subclass declarations.

Parameters

No parameters

getAllSuperTypeDeclarations

ClassDeclaration[] getAllSuperTypeDeclarations( )

Inherited from: ClassDeclaration

Get all the super-type declarations for this type.

Returns

ClassDeclaration - super-type declarations.

Parameters

No parameters

getProperty

Property getProperty( string name )

Inherited from: ClassDeclaration

Returns the property with a given name or null if it does not exist. Fields defined in super-types are also introspected.

Returns

Property - the field, or null if it does not exist

Parameters

Name Type Mandatory Description
name string Yes the name of the field

getProperties

Property[] getProperties( )

Inherited from: ClassDeclaration

Returns the properties defined in this class and all super classes.

Returns

Property - the array of fields

Parameters

No parameters

getNestedProperty

Property getNestedProperty( string propertypath )

Inherited from: ClassDeclaration

Get a nested property using a dotted property path

Returns

Property - the property

Parameters

Name Type Mandatory Description
propertyPath string Yes The property name or name with nested structure e.g a.b.c

toString

String toString( )

Inherited from: ClassDeclaration

Returns the string representation of this class

Returns

String - the string representation of the class

Parameters

No parameters